Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
a6a0d12c
Commit
a6a0d12c
authored
Sep 28, 2022
by
杨思琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 发布包更新
parent
1e5a321b
Pipeline
#61169
waiting for manual action with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
3 deletions
+38
-3
.gitlab-ci.yml
.gitlab-ci.yml
+14
-0
build.js
internals/webpack/build.js
+2
-3
install.js
internals/webpack/install.js
+21
-0
package.json
package.json
+1
-0
No files found.
.gitlab-ci.yml
View file @
a6a0d12c
...
...
@@ -10,10 +10,24 @@ before_script:
-
'
git
config
core.autocrlf
false'
stages
:
-
refresh
-
install
-
package
-
push
refresh
:
stage
:
refresh
tags
:
-
civ_base
script
:
-
git pull origin master
-
npm run refresh
only
:
refs
:
-
master
variables
:
-
$NPM_INSTALL == "true"
when
:
manual
install
:
stage
:
install
...
...
internals/webpack/build.js
View file @
a6a0d12c
const
rm
=
require
(
'rimraf'
);
const
path
=
require
(
'path'
);
const
webpack
=
require
(
'webpack'
);
const
chalk
=
require
(
'chalk'
);
const
ora
=
require
(
'ora'
)
const
ora
=
require
(
'ora'
)
;
const
pkg
=
require
(
'../../package.json'
);
const
webpackConfig
=
require
(
'./webpack.prod.babel'
)
const
webpackConfig
=
require
(
'./webpack.prod.babel'
)
;
const
argv
=
require
(
'../../server/argv'
);
const
spinner
=
ora
(
'building for production...'
);
const
{
printFileSizes
}
=
require
(
'./buildDevUtil'
);
...
...
internals/webpack/install.js
0 → 100644
View file @
a6a0d12c
const
{
execSync
}
=
require
(
'child_process'
);
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
function
findFile
(
dir
,
findStr
)
{
if
(
!
fs
.
existsSync
(
dir
))
return
false
;
fs
.
readdirSync
(
dir
).
forEach
(
fileName
=>
{
findStr
.
forEach
(
module
=>
{
if
(
fileName
.
indexOf
(
module
.
dir
)
!==
-
1
)
{
module
.
component
.
forEach
(
compo
=>
{
execSync
(
`npm uninstall
${
compo
}
`
);
execSync
(
`npm install
${
compo
}
`
);
});
}
});
});
}
findFile
(
path
.
resolve
(
process
.
cwd
(),
'node_modules'
),
[
{
dir
:
'@wisdom-utils'
,
component
:
[
'@wisdom-utils/components'
,
'@wisdom-utils/runtime'
,
'@wisdom-utils/utils'
]
},
]);
package.json
View file @
a6a0d12c
...
...
@@ -19,6 +19,7 @@
"analyze"
:
"cross-env ANALYZE=1 npm run build"
,
"npmcheckversion"
:
"node ./internals/scripts/npmcheckversion.js"
,
"preinstall"
:
"yarn run npmcheckversion && npx force-resolutions"
,
"refresh"
:
"node ./internals/webpack/install.js --registry=https://g.civnet.cn:4873"
,
"build"
:
"cross-env NODE_ENV=production node --max_old_space_size=4096 internals/webpack/build.js"
,
"build:clean"
:
"rimraf ./build"
,
"openapi"
:
"cross-env NODE_ENV=development yarn server/openapi/run.js"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment