Created
October 1, 2015 06:02
-
-
Save banesto/76d26f20b5e36abb783a to your computer and use it in GitHub Desktop.
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'), | |
sass: { | |
options: { | |
includePaths: ['bower_components/foundation/scss'] | |
}, | |
dist: { | |
options: { | |
outputStyle: 'compressed', | |
sourceMap: true, | |
}, | |
files: { | |
'styles/app.css': '_src/scss/app.scss', | |
} | |
} | |
}, | |
// -------------------------------------- | |
// Concatenate Configuration | |
// -------------------------------------- | |
concat: { | |
options: { | |
separator: ';' | |
}, | |
script: { | |
src: [ | |
'bower_components/foundation/js/foundation/foundation.js', | |
'bower_components/foundation/js/foundation/foundation.topbar.js', | |
'bower_components/foundation/js/foundation/foundation.interchange.js', | |
'_src/js/common.js' | |
], | |
dest: 'js/script.js' | |
}, | |
modernizr: { | |
src: [ | |
'bower_components/foundation/js/vendor/modernizr.js', | |
// 'develop/js/custom.modernizr.js' | |
], | |
dest: 'js/modernizr.js' | |
}, | |
maskedinput: { | |
src: [ | |
'bower_components/jquery.maskedinput/dist/jquery.maskedinput.js', | |
], | |
dest: 'js/jquery.maskedinput.js' | |
} | |
}, | |
// -------------------------------------- | |
// Uglify Configuration | |
// -------------------------------------- | |
uglify: { | |
dist: { | |
files: { | |
'js/jquery.min.js': ['bower_components/jquery/dist/jquery.js'], | |
'js/jquery.maskedinput.min.js': ['js/jquery.maskedinput.js'], | |
'js/modernizr.min.js': ['js/modernizr.js'], | |
'js/script.min.js': ['js/script.js'] | |
} | |
} | |
}, | |
watch: { | |
grunt: { | |
options: { | |
reload: true | |
}, | |
files: ['Gruntfile.js'], | |
tasks: ['default'] | |
}, | |
sass: { | |
files: '_src/scss/**/*.scss', | |
tasks: ['sass'] | |
}, | |
script: { | |
files: '_src/js/**/*.js', | |
tasks: ['buildJs'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.registerTask('buildCss', ['sass']); | |
grunt.registerTask('buildJs', ['concat', 'uglify']); | |
grunt.registerTask('default', ['buildCss', 'buildJs', 'watch']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment