mirror of
https://github.com/klinecharts/KLineChart.git
synced 2024-11-25 16:22:43 +08:00
ci: upgrade rollup
This commit is contained in:
parent
755cb573a1
commit
bbef07d50d
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 21
|
||||
- run: npm install
|
||||
- run: npm run lint
|
||||
- run: npm run build
|
||||
|
2
.github/workflows/deploy-docs.yml
vendored
2
.github/workflows/deploy-docs.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 21
|
||||
- run: npm install
|
||||
- run: npm run docs:build
|
||||
- uses: peaceiris/actions-gh-pages@v3
|
||||
|
4
.github/workflows/npm-publish.yml
vendored
4
.github/workflows/npm-publish.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 21
|
||||
- run: npm install && npm run build
|
||||
|
||||
publish-npm:
|
||||
@ -21,7 +21,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 21
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- run: npm install && npm run build
|
||||
- run: npm publish
|
||||
|
18
package.json
18
package.json
@ -49,18 +49,18 @@
|
||||
"docs:deploy": "npm run docs:build && gh-pages -d website"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/standalone": "^7.23.2",
|
||||
"@docsearch/css": "^3.3.3",
|
||||
"@docsearch/js": "^3.3.3",
|
||||
"@rollup/plugin-commonjs": "^23.0.2",
|
||||
"@rollup/plugin-eslint": "^9.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-replace": "^5.0.1",
|
||||
"@rollup/plugin-terser": "^0.1.0",
|
||||
"@rollup/plugin-typescript": "^9.0.2",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-eslint": "^9.0.5",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@rollup/plugin-typescript": "^11.1.5",
|
||||
"@stackblitz/sdk": "^1.9.0",
|
||||
"@types/node": "^18.15.10",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
@ -78,8 +78,8 @@
|
||||
"gh-pages": "^2.2.0",
|
||||
"husky": "^8.0.1",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"rollup": "^3.2.5",
|
||||
"rollup-plugin-filesize": "^9.1.2",
|
||||
"rollup": "^4.7.0",
|
||||
"rollup-plugin-filesize": "^10.0.0",
|
||||
"rollup-plugin-progress": "^1.1.2",
|
||||
"tslib": "^2.5.0",
|
||||
"typescript": "^4.8.3",
|
||||
|
@ -14,18 +14,17 @@ async function build() {
|
||||
const input = inputConfig(env);
|
||||
|
||||
try {
|
||||
const startTime = new Date().getTime()
|
||||
const bundle = await rollup.rollup(input);
|
||||
|
||||
console.log('\n\nFile info: ');
|
||||
|
||||
const output = outputConfig(env, fileName);
|
||||
|
||||
await bundle.write(output);
|
||||
|
||||
console.log(chalk.green(`\nCompiled ${fileName} successfully.\n`));
|
||||
console.log(chalk.green(`\n✔️ Compiled ${fileName} successfully.\n`));
|
||||
console.log(`Done in ${((new Date().getTime() - startTime) / 1000 / 60).toFixed(2)}s.\n`)
|
||||
} catch (err) {
|
||||
console.log(`\n\n${chalk.red(err)}\n`);
|
||||
console.log(chalk.red(`Failed to compile ${fileName}.\n`));
|
||||
console.log(chalk.red(`✖️ Failed to compile ${fileName}.\n`));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ function clean () {
|
||||
eachFiles(buildDir);
|
||||
deleteFiles(buildDir);
|
||||
|
||||
console.log(chalk.green('\n\nClean successfully.\n'));
|
||||
console.log(chalk.green('\n\n✔️ Clean successfully.\n'));
|
||||
}
|
||||
|
||||
clean();
|
||||
|
Loading…
Reference in New Issue
Block a user