Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Fix/es5 #8

Merged
merged 2 commits into from
Nov 20, 2020
Merged
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
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [["@babel/env", {
"targets": {
"browsers": ["> 0.5%"]
}
}]]
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
babel.babel
TODO.md
examples/basic/index.debug.html

dist/*
# To store secret credentials
*.secret.js

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@
"node": ">=12.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"maintained node versions",
"not dead"
"> 0.5%"
],
"author": "Arno Gourdol <[email protected]>",
"contributors": [
Expand All @@ -84,6 +81,8 @@
"paosder <[email protected]>"
],
"devDependencies": {
"@babel/cli": "7.12.1",
"@babel/preset-env": "7.12.1",
"@babel/types": "^7.12.6",
"@cortex-js/prettier-config": "^1.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
Expand All @@ -93,6 +92,7 @@
"@typescript-eslint/eslint-plugin": "^4.7.0",
"@typescript-eslint/parser": "^4.7.0",
"@typescript-eslint/typescript-estree": "^4.7.0",
"acorn-private-class-elements": "0.2.7",
"autoprefixer": "^9.8.6",
"check-node-version": "^4.0.3",
"cssnano": "^4.1.10",
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const ROLLUP = [
{
format: 'umd',
name: 'MathLive',
file: `${BUILD_DIRECTORY}/mathlive.js`,
file: `${BUILD_DIRECTORY}/mathlive.es6.js`,
sourcemap: !PRODUCTION,
exports: 'named',
},
Expand Down Expand Up @@ -256,7 +256,7 @@ if (PRODUCTION) {
{
format: 'umd',
name: 'MathLive',
file: `${BUILD_DIRECTORY}/mathlive.min.js`,
file: `${BUILD_DIRECTORY}/mathlive.min.es6.js`,
sourcemap: false,
},
],
Expand Down
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ else
printf "\033[32m ● \033[0m Making a \033[33m%s\033[0m build" "$BUILD"
npx rollup --silent --config
echo -e "\033[2K\033[80D\033[32m ✔ \033[33m" $BUILD "\033[0m build done"

printf "\033[32m ● \033[0m Making a \033[33m%s\033[0m build es5 " "$BUILD"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build es6 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non
ie n'aime pas es6

npx babel -o dist/mathlive.js dist/mathlive.es6.js
echo -e "\033[2K\033[80D\033[32m ✔ \033[33m" $BUILD "\033[0m build es5 done"

if [ "$BUILD" = "production" ]; then
# Optimize CSS
Expand Down