From 98d8c213a9fca6b4b6a041c8de7e9672a6a5d257 Mon Sep 17 00:00:00 2001 From: Christoph Burgmer Date: Sun, 4 Jun 2017 18:07:18 +0200 Subject: [PATCH] Partially revert "Stop publishing all-in-one bundle. There's a CDN for that" Keep the bundle around for compatibility reasons, until we solve #12, and bump the major version. This reverts commit 2571b79078e3b5d2795797d1dfaaa0e7822e020b. --- Gruntfile.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3ed14af..505e6ce 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -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: { @@ -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: [ @@ -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', [