Skip to content

Commit

Permalink
only minify p5.dom, don't bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
outofambit committed Mar 2, 2019
1 parent 7a31a05 commit b64882a
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 99 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ p5.zip
bower-repo/
p5-website/
.cache/
lib/addons/p5.dom.min.map
21 changes: 6 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,11 @@ module.exports = function(grunt) {

// This minifies the javascript into a single file and adds a banner to the
// front of the file.
uglify: {
options: {
compress: {
global_defs: {
IS_MINIFIED: true
}
},
banner:
'/*! p5.js v<%= pkg.version %> <%= grunt.template.today("mmmm dd, yyyy") %> */ '
},
dist: {
terser: {
options: {},
dom: {
files: {
'lib/p5.min.js': 'lib/p5.pre-min.js',
'lib/addons/p5.dom.min.js': 'lib/addons/p5.dom.js'
'lib/addons/p5.dom.min.js': ['lib/addons/p5.dom.js']
}
}
},
Expand Down Expand Up @@ -444,7 +435,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-terser');
grunt.loadNpmTasks('grunt-minjson');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-newer');
Expand All @@ -454,7 +445,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');

// Create the multitasks.
grunt.registerTask('build', ['build-p5', 'parcel-dom']);
grunt.registerTask('build', ['build-p5', 'terser:dom']);
grunt.registerTask('build-p5', ['parcel', 'parcel:min']);
grunt.registerTask('lint-no-fix', [
'yui', // required for eslint-samples
Expand Down
Loading

0 comments on commit b64882a

Please sign in to comment.