Skip to content

Commit

Permalink
修改code lint时机
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Sep 8, 2023
1 parent 2454738 commit 7845d65
Show file tree
Hide file tree
Showing 10 changed files with 319 additions and 83 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/beta-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@ on:
- beta

jobs:
CheckCode:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache file
uses: actions/cache@v3
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: |
npm ci
- name: Lint src code
run: npm run lint
# CheckCode:
# name: Lint Code
# runs-on: ubuntu-latest
# steps:
# - name: Check out git repository
# uses: actions/checkout@v3

# - name: Install Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '16'

# - name: Cache file
# uses: actions/cache@v3
# with:
# path: |
# node_modules
# $HOME/.cache/electron
# $HOME/.cache/electron-builder
# $HOME/.npm/_prebuilds
# key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-

# - name: Install Dependencies
# run: |
# npm ci

# - name: Lint src code
# run: npm run lint

Windows:
name: Windows
runs-on: windows-latest
needs: CheckCode
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
Mac:
name: Mac
runs-on: macos-latest
needs: CheckCode
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
Linux:
name: Linux
runs-on: ubuntu-latest
needs: CheckCode
# needs: CheckCode
steps:
- name: Install package
run: sudo apt-get update && sudo apt-get install -y rpm libarchive-tools
Expand Down
66 changes: 33 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@ on:
- master

jobs:
CheckCode:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache file
uses: actions/cache@v3
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: |
npm ci
- name: Lint src code
run: npm run lint
# CheckCode:
# name: Lint Code
# runs-on: ubuntu-latest
# steps:
# - name: Check out git repository
# uses: actions/checkout@v3

# - name: Install Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '16'

# - name: Cache file
# uses: actions/cache@v3
# with:
# path: |
# node_modules
# $HOME/.cache/electron
# $HOME/.cache/electron-builder
# $HOME/.npm/_prebuilds
# key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-

# - name: Install Dependencies
# run: |
# npm ci

# - name: Lint src code
# run: npm run lint

Windows:
name: Windows
runs-on: windows-latest
needs: CheckCode
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
Mac:
name: Mac
runs-on: macos-latest
needs: CheckCode
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
Linux:
name: Linux
runs-on: ubuntu-latest
needs: CheckCode
# needs: CheckCode
steps:
- name: Install package
run: sudo apt-get update && sudo apt-get install -y rpm libarchive-tools
Expand Down
5 changes: 0 additions & 5 deletions build-config/renderer-lyric/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ module.exports = {
},
module: {
rules: [
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down
9 changes: 9 additions & 0 deletions build-config/renderer-lyric/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ module.exports = merge(baseConfig, {
externals: [
// ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
Expand Down
5 changes: 0 additions & 5 deletions build-config/renderer-scripts/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ module.exports = {
},
module: {
rules: [
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down
9 changes: 9 additions & 0 deletions build-config/renderer-scripts/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ module.exports = merge(baseConfig, {
externals: [
// ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
Expand Down
5 changes: 0 additions & 5 deletions build-config/renderer/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ module.exports = {
},
module: {
rules: [
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down
9 changes: 9 additions & 0 deletions build-config/renderer/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ module.exports = merge(baseConfig, {
externals: [
// ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
Expand Down
Loading

0 comments on commit 7845d65

Please sign in to comment.