website: fix asset pipeline JS, move grunt into website/ instead of source/
This commit is contained in:
parent
429812b818
commit
263db8ead6
|
@ -8,3 +8,5 @@ config/y.go
|
|||
config/y.output
|
||||
vendor/
|
||||
website/.vagrant
|
||||
website/build
|
||||
website/node_modules
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
// jshint node:true
|
||||
module.exports = function(grunt) {
|
||||
|
||||
// Load plugins here
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-recess');
|
||||
|
||||
// Configuration goes here
|
||||
grunt.initConfig({
|
||||
|
||||
less: {
|
||||
development:{
|
||||
files: {
|
||||
"source/stylesheets/main.css": "source/stylesheets/main.less"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
watch: {
|
||||
less: {
|
||||
files: 'source/stylesheets/*.less',
|
||||
tasks: ['less']
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// CSS Compliation task
|
||||
grunt.registerTask('default', ['watch']);
|
||||
|
||||
};
|
|
@ -18,3 +18,7 @@ configure :build do
|
|||
activate :minify_html
|
||||
activate :minify_javascript
|
||||
end
|
||||
|
||||
configure :development do
|
||||
set :debug_assets, true
|
||||
end
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
// jshint node:true
|
||||
module.exports = function(grunt) {
|
||||
|
||||
// Load plugins here
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-recess');
|
||||
|
||||
// Configuration goes here
|
||||
grunt.initConfig({
|
||||
|
||||
less: {
|
||||
development:{
|
||||
files: {
|
||||
"stylesheets/main.css": "stylesheets/main.less"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
concat: {
|
||||
options: {
|
||||
separator: ';'
|
||||
},
|
||||
site: {
|
||||
src: [
|
||||
'javascripts/app/app.js',
|
||||
'javascripts/app/util.js',
|
||||
'javascripts/app/homepage.js'
|
||||
],
|
||||
dest: 'javascripts/app/deploy/site.js'
|
||||
},
|
||||
},
|
||||
|
||||
uglify: {
|
||||
app: {
|
||||
files: {
|
||||
'javascripts/app/deploy/site.min.js': ['javascripts/app/deploy/site.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
less: {
|
||||
files: 'stylesheets/*.less',
|
||||
tasks: ['less']
|
||||
},
|
||||
js: {
|
||||
files: 'javascripts/app/*.js',
|
||||
tasks: ['concat', 'uglify']
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// JS distribution task.
|
||||
grunt.registerTask('dist-js', ['concat', 'uglify']);
|
||||
|
||||
// Full distribution task.
|
||||
grunt.registerTask('dist', ['dist-js']);
|
||||
grunt.registerTask('default', ['watch']);
|
||||
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
//= require "lib/jquery-2.0.3.min"
|
||||
//= require "lib/bootstrap.min"
|
||||
//= require "lib/String.substitute"
|
||||
//= require "lib/Vector"
|
||||
//= require "lib/Function.prototype.bind"
|
||||
//= require "lib/Base"
|
||||
//= require "lib/Chainable"
|
||||
//= require "lib/dbg"
|
||||
//= require "respond.min"
|
||||
//= require "html5shiv"
|
||||
//= require "docs"
|
||||
//= require "app/Logo"
|
||||
//= require "app/Grid"
|
||||
//= require "app/Engine"
|
||||
//= require "app/Engine.Particle"
|
||||
//= require "app/Engine.Particle.Fixed"
|
||||
//= require "app/Engine.Point"
|
||||
//= require "app/Engine.Point.Puller"
|
||||
//= require "app/Engine.Polygon"
|
||||
//= require "app/Engine.Polygon.Puller"
|
||||
//= require "app/Engine.Shape"
|
||||
//= require "app/Engine.Shape.Puller"
|
||||
//= require "app/Engine.Typewriter"
|
||||
//= require "app/Init"
|
|
@ -21,28 +21,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/javascripts/lib/jquery-2.0.3.min.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/docs.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/dbg.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/Function.prototype.bind.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/Base.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/String.substitute.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/Vector.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/lib/Chainable.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Logo.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Grid.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Particle.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Particle.Fixed.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Point.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Point.Puller.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Polygon.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Polygon.Puller.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Shape.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Shape.Puller.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Engine.Typewriter.js"></script>
|
||||
<script type="text/javascript" src="/javascripts/app/Init.js"></script>
|
||||
<%= javascript_include_tag "all" %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue