Last active
August 29, 2015 14:00
-
-
Save iWader/f7168ce0a7183fd2ad45 to your computer and use it in GitHub Desktop.
Getting started with Grunt.js - http://blog.iwader.co.uk/getting-started-with-grunt-js/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
less: { | |
dist: { | |
files: { | |
'public/assets/css/app.min.css': [ | |
'public/assets/less/app.less' | |
], | |
'public/assets/css/vendor/bootstrap.min.css': [ | |
'public/assets/less/vendor/bootstrap/bootstrap.less' | |
] | |
}, | |
options: { | |
compress: true | |
} | |
} | |
}, | |
watch: { | |
less: { | |
files: [ | |
'public/assets/less/*.less', | |
'public/assets/less/vendor/bootstrap/*.less' | |
], | |
tasks: ['less'] | |
} | |
} | |
}); | |
// Load the grunt plugins | |
grunt.loadNpmTasks('grunt-contrib-less'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
// Default tasks Grunt should run | |
grunt.registerTask('default', ['less']); | |
// Tasks Grunt should run under the dev command | |
grunt.registerTask('dev', [ | |
'watch' | |
]); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-project-name", | |
"version": "0.0.1", | |
"devDependencies": { | |
"grunt": "~0.4.2", | |
"grunt-contrib-less": "~0.11.0", | |
"grunt-contrib-watch": "~0.5.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment