Skip to content

Commit

Permalink
Replacing custom tokenizer logic with the one from excel-formula-toke…
Browse files Browse the repository at this point in the history
…nizer

- Also fixes joshbtn#83
  • Loading branch information
jlaramie committed Jan 1, 2022
1 parent f1e4545 commit 5ff3e59
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 591 deletions.
33 changes: 26 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var gulp = require('gulp'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
concat = require('gulp-concat'),
webpack = require('webpack-stream'),
del = require('del'),
fs = require('fs.extra'),
paths = {
Expand Down Expand Up @@ -33,16 +34,34 @@ gulp.task('update_bs_fonts', function(){

gulp.task('libs', gulp.series('update_jquery', 'update_bs_js', 'update_bs_css', 'update_bs_fonts'));

gulp.task('scripts', function() {
gulp.task('script-concat', function() {
return gulp.src(paths.scripts)
.pipe(concat('core.js'))
.pipe(concat('excel-formula.js'))
.pipe(gulp.dest('dist'))
.pipe(rename({suffix: '.min'}))
.pipe(uglify())
.pipe(gulp.dest('dist'))
.pipe(webpack({
mode: 'production',
output: {
filename: 'excel-formula.js',
},
optimization: {
minimize: false
}
}))
.pipe(gulp.dest('dist'))
});

gulp.task('script-minify', function() {
return gulp.src(paths.scripts)
.pipe(webpack({
mode: 'production',
output: {
filename: 'excel-formula.js',
}
}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('dist'))
});

gulp.task('scripts', gulp.series(['script-concat', 'script-minify']))

gulp.task('site', function() {
return gulp.src(paths.siteScripts)
.pipe(concat('page.js'))
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
"repository": {
"url": "git://github.com/joshatjben/excelFormulaUtilitiesJS.git"
},
"keyword": [
"excel",
"formula",
"convert"
],
"keyword": ["excel", "formula", "convert"],
"scripts": {
"build": "gulp",
"test": "mocha & qunit -t ./test/browser/ExcelFormulaUtilities.test.js -d ./src/core.js -c ./src/ExcelFormulaUtilities.js & qunit -c ./dist/excel-formula.min.js -t ./test/browser/ExcelFormulaUtilities.test.js & qunit -c ./dist/excel-formula.js -t ./test/browser/ExcelFormulaUtilities.test.js"
Expand All @@ -41,10 +37,13 @@
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.4.1",
"mocha": "^9.1.3",
"qunit": "~0.7.7"
"qunit": "~0.7.7",
"webpack": "^5.65.0",
"webpack-stream": "^7.0.0"
},
"dependencies": {
"bootstrap": "^4.1.3",
"excel-formula-tokenizer": "jlaramie/excel-formula-tokenizer#compatibility_updates",
"jquery": "^3.2.1"
}
}
Loading

0 comments on commit 5ff3e59

Please sign in to comment.