Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create ES5 build by using tsc on build directory #6249

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ _site/
.jekyll-metadata
.yarnclean
build/*
build-es5/*
coverage
examples/all-examples.json
examples/compiled/*.png
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
},
"scripts": {
"changelog": "conventional-changelog -p angular",
"build": "yarn build:only",
"build": "yarn build:only && yarn build:es5",
"build:only": "yarn tsc:src && rollup -c",
"postbuild": "terser build/vega-lite.js -cm --source-map content=build/vega-lite.js.map,filename=build/vega-lite.min.js.map -o build/vega-lite.min.js && yarn schema",
"build:es5": "mkdir -p build-es5 && tsc -b tsconfig.build-es5.json",
"postbuild": "terser build/vega-lite.js -cm --source-map content=build/vega-lite.js.map,filename=build/vega-lite.min.js.map -o build/vega-lite.min.js && terser build/vega-lite.js -o build-es5/vega-lite.min.js && yarn schema",
"prebuild:examples": "yarn build:only",
"build:examples": "yarn data && TZ=America/Los_Angeles scripts/build-examples.sh",
"prebuild:examples-full": "yarn build:only",
Expand All @@ -38,7 +39,7 @@
"build:site": "yarn tsc:site && rollup -c site/rollup.config.js",
"build:jekyll": "pushd site && bundle exec jekyll build -q && popd",
"build:versions": "scripts/update-version.sh",
"clean": "find build ! -name 'vega-lite-schema.json' -type f -delete && rm -rf site/data/* && rm -f examples/compiled/*.png && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete",
"clean": "find build ! -name 'vega-lite-schema.json' -type f -delete && rm -rf build-es5 && rm -rf site/data/* && rm -f examples/compiled/*.png && find site/examples ! -name 'index.md' ! -name 'data' -type f -delete",
"predeploy:site": "yarn presite",
"deploy:site": "gh-pages -d site",
"data": "rsync -r node_modules/vega-datasets/data/* site/data",
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.build-es5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./build-es5",
"target": "ES5",
"downlevelIteration": true,
"allowJs": true,
"sourceMap": false
},
"files": ["build/vega-lite.js"]
}