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

Commit

Permalink
Merge pull request #8 from lelivrescolaire/fix/es5
Browse files Browse the repository at this point in the history
Fix/es5
  • Loading branch information
arncet authored Nov 20, 2020
2 parents 442ca5c + 10b3f5c commit afcbfa1
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
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"
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

0 comments on commit afcbfa1

Please sign in to comment.