chore: build formula-parser with father

This commit is contained in:
zyc9012 2022-04-25 16:44:06 +08:00
parent cf92b6d670
commit 392efbe8b3
2 changed files with 15 additions and 11 deletions

View File

@ -0,0 +1,6 @@
export default {
target: 'browser',
cjs: { type: "babel", lazy: true },
esm: { type: "babel" },
disableTypeCheck: false,
};

View File

@ -1,24 +1,22 @@
{ {
"name": "@fortune-sheet/formula-parser", "name": "@fortune-sheet/formula-parser",
"version": "0.2.2", "version": "0.2.3",
"description": "Formula parser", "description": "Formula parser",
"main": "./src/index.js", "main": "lib/index.js",
"jsdelivr": "dist/formula-parser.min.js", "module": "es/index.js",
"unpkg": "dist/formula-parser.min.js", "files": [
"es",
"lib"
],
"scripts": { "scripts": {
"clean": "rimraf tmp coverage", "clean": "rimraf tmp coverage",
"lint": "eslint src test", "lint": "eslint src test",
"check": "npm run lint && npm run test", "check": "npm run lint && npm run test",
"test": "cross-env BABEL_ENV=commonjs jest", "test": "cross-env BABEL_ENV=commonjs jest",
"coverage": "cross-env BABEL_ENV=commonjs jest --coverage", "coverage": "cross-env BABEL_ENV=commonjs jest --coverage",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min", "build": "father-build",
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir tmp",
"build:es": "cross-env BABEL_ENV=es babel src --out-file-extension .mjs --out-dir tmp",
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack",
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack",
"generate-parser": "cd src/grammar-parser && jison grammar-parser.jison", "generate-parser": "cd src/grammar-parser && jison grammar-parser.jison",
"release": "generate-release", "release": "generate-release"
"postbuild": "node ./scripts/prepare-package"
}, },
"keywords": [ "keywords": [
"formula", "formula",