mirror of
https://github.com/ruilisi/fortune-sheet.git
synced 2025-01-05 10:27:04 +08:00
chore: refine build
This commit is contained in:
parent
392efbe8b3
commit
361aedebf5
@ -9,12 +9,12 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "yarn storybook",
|
||||
"build": "mv packages/react/tsconfig.build.json packages/react/tsconfig.json && father-build && mv packages/react/tsconfig.json packages/react/tsconfig.build.json",
|
||||
"build": "node ./scripts/build",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook",
|
||||
"tsc": "tsc --noEmit",
|
||||
"lint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./packages",
|
||||
"postinstall": "patch-package",
|
||||
"postinstall": "patch-package && lerna run build --scope=@fortune-sheet/formula-parser",
|
||||
"publish": "lerna publish --registry 'https://registry.npmjs.org'",
|
||||
"test": "jest",
|
||||
"coverage": "jest --coverage"
|
||||
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "es2015",
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"removeComments": true,
|
||||
"moduleResolution": "node",
|
||||
"noLib": false,
|
||||
"jsx": "react",
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es5", "dom"],
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist", "lib"]
|
||||
}
|
@ -11,6 +11,7 @@ import {
|
||||
escapeScriptTag,
|
||||
valueShowEs,
|
||||
updateCell,
|
||||
createRangeHightlight,
|
||||
} from "@fortune-sheet/core";
|
||||
import React, {
|
||||
useContext,
|
||||
@ -25,7 +26,6 @@ import WorkbookContext from "../../context";
|
||||
import ContentEditable from "./ContentEditable";
|
||||
import FormulaSearch from "./FormulaSearch";
|
||||
import FormulaHint from "./FormulaHint";
|
||||
import { createRangeHightlight } from "../../../../core/src/modules/formula";
|
||||
|
||||
const InputBox: React.FC = () => {
|
||||
const { context, setContext, refs } = useContext(WorkbookContext);
|
||||
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "es2015",
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"removeComments": true,
|
||||
"moduleResolution": "node",
|
||||
"noLib": false,
|
||||
"jsx": "react",
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es5", "dom"],
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["node_modules", "**/*.test.ts", "**/*.spec.ts", "dist", "lib"]
|
||||
}
|
23
scripts/build.js
Normal file
23
scripts/build.js
Normal file
@ -0,0 +1,23 @@
|
||||
const fs = require("fs");
|
||||
const { spawnSync } = require("child_process");
|
||||
|
||||
const tsconfig = JSON.parse(fs.readFileSync("tsconfig.json"));
|
||||
|
||||
delete tsconfig.compilerOptions.paths;
|
||||
tsconfig.include = ["./src"];
|
||||
tsconfig.exclude = [
|
||||
"node_modules",
|
||||
"**/*.test.ts",
|
||||
"**/*.spec.ts",
|
||||
"dist",
|
||||
"lib",
|
||||
];
|
||||
|
||||
const tsconfigJson = JSON.stringify(tsconfig);
|
||||
fs.writeFileSync("packages/core/tsconfig.json", tsconfigJson);
|
||||
fs.writeFileSync("packages/react/tsconfig.json", tsconfigJson);
|
||||
|
||||
spawnSync("father-build", { stdio: "inherit" });
|
||||
|
||||
fs.rmSync("packages/core/tsconfig.json");
|
||||
fs.rmSync("packages/react/tsconfig.json");
|
Loading…
Reference in New Issue
Block a user