Commit 587e1793 authored by 邓晓峰's avatar 邓晓峰

feat: ci add lint checkout workflow

parent 30374c50
...@@ -7,6 +7,7 @@ before_script: ...@@ -7,6 +7,7 @@ before_script:
stages: stages:
- install - install
- lint
- package - package
- push - push
...@@ -25,12 +26,22 @@ install: ...@@ -25,12 +26,22 @@ install:
- $NPM_INSTALL == "true" - $NPM_INSTALL == "true"
when: manual when: manual
lint:
stage: lint
script:
- npm run lint
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
only:
- master
when: manual
package: package:
stage: package stage: package
script: script:
- echo "${CI_PROJECT_DIR}" - echo "${CI_PROJECT_DIR}"
- npm run build -- --releasepath=../CivWebPublish2021 - npm run build --releasepath=../CivWebPublish2021
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
......
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
'styled-components', 'styled-components',
'@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-class-properties',
'@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-dynamic-import',
['import', { libraryName: 'antd', style: true }] ['import', { libraryName: 'antd', style: true }],
], ],
env: { env: {
production: { production: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment