Skip to content

Commit

Permalink
feat: update to webpack5 (#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen authored Feb 13, 2024
1 parent 6ae3cda commit 4715340
Show file tree
Hide file tree
Showing 8 changed files with 689 additions and 1,038 deletions.
53 changes: 30 additions & 23 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,21 @@ name: Node.js CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:

build-windows:
runs-on: windows-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: node --unhandled-rejections=strict src/cli.js
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20
- run: yarn
- run: node --unhandled-rejections=strict src/cli.js

build-ubuntu:
runs-on: ubuntu-latest
Expand All @@ -35,10 +29,23 @@ jobs:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: node --unhandled-rejections=strict src/cli.js
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn build
- run: node --unhandled-rejections=strict src/cli.js

build-macOS:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20
- run: yarn
- run: yarn build
- run: node --unhandled-rejections=strict src/cli.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
!__tests__/packages/**/node_modules
.DS_Store
.idea/
dist/
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: yarn install && yarn run build
command: yarn run start


5 changes: 2 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
environment:
nodejs_version: '8'
nodejs_version: '16'

install:
- ps: Install-Product node $env:nodejs_version x64
- npm install
- yarn

test_script:
- node --version
- npm --version
- choco install ffmpeg
- choco install r.project -version 3.6.0
- set RPATH=C:\Program Files\R\R-3.6.0\bin\x64
Expand Down
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"pkg": "^4.5.1",
"prettier": "^1.19.1",
"prettier-eslint-cli": "^4.1.1",
"webpack": "^4.29.6",
"webpack-cli": "^3.1.2",
"webpack": "^5.90.1",
"webpack-cli": "^5.1.4",
"which": "^1.2.14",
"yamlify-object": "^0.5.1"
},
Expand Down
6 changes: 2 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ module.exports = {
externals: [/envinfo$/],
plugins: [
new webpack.BannerPlugin({
banner: `#!/usr/bin/env node
"use strict"`,
banner: `#!/usr/bin/env node\n`,
raw: true,
include: 'cli',
}),
new webpack.DefinePlugin({
'global.__VERSION__': JSON.stringify(packageJson.version),
}),
new webpack.IgnorePlugin(/spawn-sync/),
],
};
};
Loading

0 comments on commit 4715340

Please sign in to comment.