Created
June 4, 2014 09:18
-
-
Save martinrusev/3c0357d5ff1f091c8811 to your computer and use it in GitHub Desktop.
Example grunt file
This file contains hidden or 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
| module.exports = function (grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| compass: { | |
| dist: { | |
| options: { | |
| sassDir: 'static/sass', | |
| cssDir: 'static/css' | |
| } | |
| } | |
| }, | |
| concat: { | |
| css: { | |
| src: [ | |
| 'static/css/screen.css', | |
| 'static/css/chart.css', | |
| 'static/css/menu.css', | |
| 'static/css/select2.css', | |
| 'static/css/jquery-ui.css' | |
| ], | |
| dest: 'static/css/app.css' | |
| }, | |
| }, | |
| cssmin: { | |
| css: { | |
| src: 'static/css/app.css', | |
| dest: 'static/css/app.min.css' | |
| } | |
| }, | |
| uglify: { | |
| js: { | |
| files: { | |
| 'combined.js': ['combined.js'] | |
| } | |
| } | |
| }, | |
| watch: { | |
| src: { | |
| files: ['static/sass/*'], | |
| tasks: ['compass'], | |
| }, | |
| scripts: { | |
| files: ['static/css/*'], | |
| tasks: ['concat:css','cssmin:css'], | |
| options: { | |
| spawn: false, | |
| }, | |
| }, | |
| }, | |
| }); | |
| grunt.loadNpmTasks('grunt-notify'); | |
| grunt.loadNpmTasks('grunt-contrib-concat'); | |
| grunt.loadNpmTasks('grunt-contrib-compass'); | |
| grunt.loadNpmTasks('grunt-contrib-uglify'); | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| grunt.loadNpmTasks('grunt-contrib-cssmin'); | |
| grunt.registerTask('default', ['watch']); | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment