Files
yoga/Gruntfile.js
Colin Eberhardt ffa64f6fd3 Added a grunt build
This copies Layout.js to a dist folder, minifies and source-maps.
2015-08-11 13:49:52 +01:00

47 lines
932 B
JavaScript

'use strict';
module.exports = function(grunt) {
grunt.initConfig({
paths: {
distFolder: 'dist',
srcFolder: 'src'
},
clean: ['<%= paths.distFolder %>'],
copy: {
main: {
expand: true,
src: ['<%= paths.srcFolder %>/Layout.js'],
dest: '<%= paths.distFolder %>',
rename: function(dest, src) {
return dest + '/css-layout.js';
}
}
},
uglify: {
options: {
sourceMap: true,
sourceMapIncludeSources: true
},
main: {
files: {
'<%= paths.distFolder %>/css-layout.min.js': ['<%= paths.srcFolder %>/Layout.js']
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('build', ['clean', 'copy', 'uglify']);
grunt.registerTask('default', ['build']);
};