Skip to content

Commit

Permalink
[feat] Gruntfile for dist
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Aug 6, 2019
1 parent ca519ed commit b6cd2cb
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions GruntFile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
module.exports = function (grunt) {

require('matchdep').filterAll("grunt-*").forEach(grunt.loadNpmTasks);

grunt.initConfig({

copy: {
js: {
expand: true,
cwd: './',
src: 'justgage.js',
dest: 'dist/'
}
},

// jshint: {
// files: [
// 'Gruntfile.js',
// 'src/js/*.js'
// ],

// options: {
// globals: {
// console: true
// }
// }
// },

uglify: {
options: {
mangle: true,
compress: {
sequences: true,
dead_code: true,
conditionals: true,
booleans: true,
unused: true,
if_return: true,
join_vars: true,
drop_console: true
},
sourceMap: true,
sourceMapName: 'dist/justgage.min.js.map',
preserveComments: 'some'
},
js: {
files: {
'dist/justgage.min.js': ['./justgage.js']
}
}
}
});

grunt.registerTask('build', [
// 'jshint',
'copy',
'uglify',
]);
};

0 comments on commit b6cd2cb

Please sign in to comment.