2021-03-23 10:58:45 +11:00
|
|
|
module.exports = function(grunt){
|
|
|
|
|
2021-03-23 12:03:26 +11:00
|
|
|
const sass = require('node-sass');
|
|
|
|
// require('load-grunt-tasks')(grunt);
|
|
|
|
|
2021-03-23 10:58:45 +11:00
|
|
|
// Configuration
|
|
|
|
grunt.initConfig({
|
|
|
|
// pass in options to plugin, references to file, etc.
|
|
|
|
|
2021-03-23 11:28:46 +11:00
|
|
|
concat: {
|
|
|
|
js: {
|
|
|
|
src: ['js/*.js'],
|
|
|
|
dest: 'build/scripts.js'
|
|
|
|
},
|
|
|
|
css: {
|
2021-03-23 12:03:26 +11:00
|
|
|
src: ['css/reset.css', 'css/bootstrap.css', 'css/styles.css'],
|
2021-03-23 11:28:46 +11:00
|
|
|
dest: 'build/styles.js'
|
|
|
|
}
|
2021-03-23 12:03:26 +11:00
|
|
|
},
|
|
|
|
|
|
|
|
sass: {
|
|
|
|
options: {
|
|
|
|
implementation: sass,
|
|
|
|
sourceMap: true
|
|
|
|
},
|
|
|
|
dist: {
|
|
|
|
files: {
|
|
|
|
'css/sass/styles.scss': 'css/styles.css'
|
|
|
|
}
|
|
|
|
}
|
2021-03-23 12:17:53 +11:00
|
|
|
},
|
|
|
|
|
|
|
|
uglify: {
|
|
|
|
build: {
|
|
|
|
files: [{
|
|
|
|
src: 'build/scripts.js',
|
|
|
|
dest: 'build/scripts.js'
|
|
|
|
}]
|
|
|
|
}
|
2021-03-23 11:28:46 +11:00
|
|
|
}
|
2021-03-23 10:58:45 +11:00
|
|
|
});
|
|
|
|
|
|
|
|
// Load plugins
|
2021-03-23 11:28:46 +11:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-concat')
|
2021-03-23 12:03:26 +11:00
|
|
|
grunt.loadNpmTasks('grunt-sass');
|
2021-03-23 12:17:53 +11:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
2021-03-23 10:58:45 +11:00
|
|
|
|
|
|
|
// Register tasks
|
2021-03-23 11:28:46 +11:00
|
|
|
grunt.registerTask('concat-js', ['concat:js']);
|
|
|
|
grunt.registerTask('concat-css', ['concat:css']);
|
2021-03-23 10:58:45 +11:00
|
|
|
|
|
|
|
}
|