mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ci: build gulp first
This commit is contained in:
1 parent
b7839bdd9a
commit
d9667fab44
4 files changed
+29
-23
No files matched your search
@@ -44,7 +44,8 @@ jobs:
|
|||||||
yarn
|
yarn
|
||||||
- name: Build And Lint
|
- name: Build And Lint
|
||||||
run: |
|
run: |
|
||||||
parallel --tty -j+0 yarn ::: lint:ci lint:ui:ci build build:ui:production
|
yarn build:ui:gulp
|
||||||
|
parallel --tty -j+0 yarn ::: lint:ci lint:ui:ci build build:ui:production:webpack
|
||||||
- name: Publish
|
- name: Publish
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
run: node build/publish.js
|
run: node build/publish.js
|
||||||
|
|||||||
+3
-2
@@ -6,13 +6,14 @@ const compilerOptionsBase = {
|
|||||||
module: 'commonjs',
|
module: 'commonjs',
|
||||||
esModuleInterop: true,
|
esModuleInterop: true,
|
||||||
moduleResolution: 'node',
|
moduleResolution: 'node',
|
||||||
declaration: true,
|
// declaration: true,
|
||||||
sourceMap: false,
|
sourceMap: false,
|
||||||
composite: true,
|
composite: true,
|
||||||
strictBindCallApply: true,
|
strictBindCallApply: true,
|
||||||
experimentalDecorators: true,
|
experimentalDecorators: true,
|
||||||
emitDecoratorMetadata: true,
|
// emitDecoratorMetadata: true,
|
||||||
noEmit: true,
|
noEmit: true,
|
||||||
|
incremental: true,
|
||||||
};
|
};
|
||||||
const config = {
|
const config = {
|
||||||
compilerOptions: compilerOptionsBase,
|
compilerOptions: compilerOptionsBase,
|
||||||
|
|||||||
+5
-3
@@ -9,9 +9,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build/prepare.js && tsc -b --verbose",
|
"build": "node build/prepare.js && tsc -b --verbose",
|
||||||
"build:watch": "node build/prepare.js && tsc -b --watch",
|
"build:watch": "node build/prepare.js && tsc -b --watch",
|
||||||
"build:ui": "node packages/ui-default/build",
|
"build:ui": "yarn build:ui:gulp && node packages/ui-default/build",
|
||||||
"build:ui:dev": "node --trace-deprecation packages/ui-default/build --dev",
|
"build:ui:gulp": "node packages/ui-default/build --gulp",
|
||||||
"build:ui:production": "node packages/ui-default/build --production",
|
"build:ui:dev": "yarn build:ui:gulp && node --trace-deprecation packages/ui-default/build --dev",
|
||||||
|
"build:ui:production": "yarn build:ui:gulp && node packages/ui-default/build --production",
|
||||||
|
"build:ui:production:webpack": "node packages/ui-default/build --production",
|
||||||
"lint": "eslint packages --ext ts --fix",
|
"lint": "eslint packages --ext ts --fix",
|
||||||
"lint:ci": "eslint packages --ext ts",
|
"lint:ci": "eslint packages --ext ts",
|
||||||
"lint:ui": "yarn workspace @hydrooj/ui-default eslint --ext .js,.ts,.jsx,.tsx . --fix",
|
"lint:ui": "yarn workspace @hydrooj/ui-default eslint --ext .js,.ts,.jsx,.tsx . --fix",
|
||||||
|
|||||||
@@ -86,23 +86,25 @@ async function runGulp() {
|
|||||||
async function main() {
|
async function main() {
|
||||||
const dir = process.cwd();
|
const dir = process.cwd();
|
||||||
process.chdir(root());
|
process.chdir(root());
|
||||||
await runGulp();
|
if (argv.options.gulp) await runGulp();
|
||||||
await runWebpack(argv.options as any);
|
else {
|
||||||
if (fs.existsSync('public/hydro.js')) {
|
await runWebpack(argv.options as any);
|
||||||
fs.copyFileSync('public/hydro.js', `public/hydro-${pkg.version}.js`);
|
if (fs.existsSync('public/hydro.js')) {
|
||||||
}
|
fs.copyFileSync('public/hydro.js', `public/hydro-${pkg.version}.js`);
|
||||||
if (fs.existsSync('public/polyfill.js')) {
|
}
|
||||||
fs.copyFileSync('public/polyfill.js', `public/polyfill-${pkg.version}.js`);
|
if (fs.existsSync('public/polyfill.js')) {
|
||||||
}
|
fs.copyFileSync('public/polyfill.js', `public/polyfill-${pkg.version}.js`);
|
||||||
if (fs.existsSync('public/default.theme.css')) {
|
}
|
||||||
fs.copyFileSync('public/default.theme.css', `public/default-${pkg.version}.theme.css`);
|
if (fs.existsSync('public/default.theme.css')) {
|
||||||
}
|
fs.copyFileSync('public/default.theme.css', `public/default-${pkg.version}.theme.css`);
|
||||||
if (argv.options.production) {
|
}
|
||||||
fs.removeSync('public/vditor/dist/js/mathjax');
|
if (argv.options.production) {
|
||||||
fs.removeSync('public/vditor/dist/js/echarts');
|
fs.removeSync('public/vditor/dist/js/mathjax');
|
||||||
fs.removeSync('public/vditor/dist/js/graphviz');
|
fs.removeSync('public/vditor/dist/js/echarts');
|
||||||
fs.removeSync('public/vditor/dist/js/mermaid');
|
fs.removeSync('public/vditor/dist/js/graphviz');
|
||||||
fs.removeSync('public/vditor/dist/js/abcjs');
|
fs.removeSync('public/vditor/dist/js/mermaid');
|
||||||
|
fs.removeSync('public/vditor/dist/js/abcjs');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
process.chdir(dir);
|
process.chdir(dir);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user