Created
June 16, 2016 03:58
-
-
Save nickmealey/bdc21bc847feb7dd6a2c794c66757341 to your computer and use it in GitHub Desktop.
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
module.exports = function(grunt) { | |
// The order of JS files that get loaded | |
var build_files = ['scripts/app/app.js', | |
'scripts/lib/*.js', | |
'scripts/models/*.js', | |
'scripts/plugins/*.js', | |
'scripts/controllers/*.js' | |
]; | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
scripts: { | |
files: ['scripts/**/*.js'], | |
tasks: ['concat'], | |
options: { | |
spawn: false | |
}, | |
}, | |
css: { | |
files: ['sass/**/*.sass', 'sass/**/*.scss'], | |
tasks: ['sass'] | |
} | |
}, | |
sass: { | |
dist: { | |
options: { | |
sourcemap: 'none' | |
}, | |
files: { | |
'assets/styles.css.liquid' : 'sass/styles.scss' | |
} | |
} | |
}, | |
concat: { | |
options: { | |
banner: '/*! <%= pkg.name %>*/\n', | |
beautfiy: true, | |
process: function(src, filepath) { | |
return '//------ ' + filepath + '\n' + src; | |
} | |
}, | |
build: { | |
src: build_files, | |
dest: 'assets/<%= pkg.name %>.js' | |
} | |
} | |
}); | |
// Default tasks | |
grunt.registerTask('default', ['uglify']); | |
grunt.registerTask('default', ['watch']); | |
// Plugins | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment