Skip to content

Commit

Permalink
Ensure that all node modules are made es5 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbe committed Apr 1, 2020
1 parent b3d6a00 commit c4d7852
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
9 changes: 0 additions & 9 deletions _patch-fast-csv.js

This file was deleted.

17 changes: 14 additions & 3 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,21 @@ module.exports = function(grunt) {
},
],
},
bundle: {
files: [
{
cwd: './build',
expand: true,
src: ['exceljs.bare.js', 'exceljs.js'],
dest: './dist/',
},
],
},
},
browserify: {
bare: {
src: ['./build/lib/exceljs.bare.js'],
dest: './dist/exceljs.bare.js',
dest: './build/exceljs.bare.js',
options: {
browserifyOptions: {
standalone: 'ExcelJS',
Expand All @@ -34,7 +44,7 @@ module.exports = function(grunt) {
},
bundle: {
src: ['./build/lib/exceljs.browser.js'],
dest: './dist/exceljs.js',
dest: './build/exceljs.js',
options: {
browserifyOptions: {
standalone: 'ExcelJS',
Expand All @@ -48,6 +58,7 @@ module.exports = function(grunt) {
},
terser: {
options: {
sourceMap: true,
output: {
preamble: '/*! ExcelJS <%= grunt.template.today("dd-mm-yyyy") %> */\n',
},
Expand Down Expand Up @@ -94,6 +105,6 @@ module.exports = function(grunt) {
},
});

grunt.registerTask('build', ['babel', 'browserify', 'terser', 'copy']);
grunt.registerTask('build', ['babel:dist', 'browserify', 'babel:bundle', 'terser', 'copy']);
grunt.registerTask('ug', ['terser']);
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@
"lint:fix": "prettier-eslint --write $(pwd)'/**/*.js'",
"lint:staged": "lint-staged",
"clean": "rm -rf build/ && rm -rf dist",
"patch:fast-csv": "node _patch-fast-csv.js",
"benchmark": "node --expose-gc benchmark",
"benchmark:debug": "node --expose-gc --inspect-brk --trace-deopt benchmark",
"build": "npm run patch:fast-csv && grunt build",
"build": "grunt build",
"preversion": "npm run clean && npm run build && npm run test:all && npm run test:dist",
"postversion": "git push --no-verify && git push --tags --no-verify"
},
Expand Down

0 comments on commit c4d7852

Please sign in to comment.