Skip to content

Commit

Permalink
Partially revert "Stop publishing all-in-one bundle. There's a CDN fo…
Browse files Browse the repository at this point in the history
…r that"

Keep the bundle around for compatibility reasons, until we solve #12, and bump the major version.

This reverts commit 2571b79.
  • Loading branch information
cburgmer committed Jun 4, 2017
1 parent 9418169 commit 98d8c21
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ module.exports = function (grunt) {
debug: true
}
}
},
allinone: {
src: 'src/inline.js',
dest: 'build/<%= pkg.name %>.allinone.js',
options: {
browserifyOptions: {
standalone: '<%= pkg.name %>'
}
}
},
allinoneNoCssom: {
src: 'src/inline.js',
dest: 'build/<%= pkg.name %>.allinone.nocssom.js',
options: {
browserifyOptions: {
standalone: '<%= pkg.name %>'
},
exclude: ['cssom']
}
}
},
clean: {
Expand Down Expand Up @@ -108,6 +127,39 @@ module.exports = function (grunt) {
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
allinone: {
options: {
banner:'/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* <%= pkg.homepage %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= pkg.license %> */\n' +
'/* Integrated dependencies:\n' +
' * url (MIT License),\n' +
' * CSSOM.js (MIT License),\n' +
' * css-font-face-src (BSD License) */\n'
},
files: {
'dist/<%= pkg.name %>.allinone.js': ['build/<%= pkg.name %>.allinone.js']
}
},
allinoneNoCssom: {
options: {
banner:'/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* <%= pkg.homepage %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= pkg.license %> */\n' +
'/* Integrated dependencies:\n' +
' * url (MIT License),\n' +
' * css-font-face-src (BSD License) */\n'
},
files: {
'dist/<%= pkg.name %>.allinone.nocssom.js': ['build/<%= pkg.name %>.allinone.nocssom.js']
}
}
},
watch: {
karma: {
files: [
Expand Down Expand Up @@ -236,7 +288,10 @@ module.exports = function (grunt) {

grunt.registerTask('build', [
'exec:bundle',
'concat:dist'
'concat:dist',
'browserify:allinone',
'browserify:allinoneNoCssom',
'uglify'
]);

grunt.registerTask('default', [
Expand Down

0 comments on commit 98d8c21

Please sign in to comment.