fix(cli): incorrect new project template content

This commit is contained in:
forehal 2023-04-07 14:58:12 +08:00
parent c3b49f0ca6
commit 7fcd68f14d
No known key found for this signature in database
2 changed files with 10 additions and 11 deletions

View file

@ -71,7 +71,7 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y sudo apt-get install gcc-arm-linux-gnueabihf -y
build: | build: |
yarn build --platform --target armv7-unknown-linux-gnueabihf yarn build --platform --target armv7-unknown-linux-gnueabihf --cross-compile
arm-linux-gnueabihf-strip *.node arm-linux-gnueabihf-strip *.node
- host: ubuntu-latest - host: ubuntu-latest
target: 'aarch64-linux-android' target: 'aarch64-linux-android'
@ -237,7 +237,7 @@ jobs:
target: 'x86_64-apple-darwin' target: 'x86_64-apple-darwin'
- host: windows-latest - host: windows-latest
target: 'x86_64-pc-windows-msvc' target: 'x86_64-pc-windows-msvc'
node: ['14', '16', '18'] node: ['16', '18']
runs-on: \${{ matrix.settings.host }} runs-on: \${{ matrix.settings.host }}
steps: steps:
@ -273,7 +273,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['14', '16', '18'] node: ['16', '18']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -309,7 +309,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['14', '16', '18'] node: ['16', '18']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -347,7 +347,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['14', '16', '18'] node: ['16', '18']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -433,7 +433,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['14', '16', '18'] node: ['16', '18']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -493,15 +493,15 @@ jobs:
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: bindings-x86_64-apple-darwin name: bindings-x86_64-apple-darwin
path: artifacts path: .
- name: Download macOS arm64 artifact - name: Download macOS arm64 artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: bindings-aarch64-apple-darwin name: bindings-aarch64-apple-darwin
path: artifacts path: .
- name: Combine binaries - name: Combine binaries
run: yarn universal run: yarn napi universalize
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View file

@ -29,12 +29,11 @@ export const createPackageJson = ({
] ]
}, },
"scripts": { "scripts": {
"test": "yarn build:debug --platform && node -e \\"assert(require('.').sum(1, 2) === 3)\\"", "test": "node -e \\"assert(require('.').sum(1, 2) === 3)\\"",
"build": "napi build --release --platform --strip", "build": "napi build --release --platform --strip",
"build:debug": "napi build", "build:debug": "napi build",
"prepublishOnly": "napi prepublish -t npm", "prepublishOnly": "napi prepublish -t npm",
"artifacts": "napi artifacts", "artifacts": "napi artifacts",
"universal": "napi universal",
"version": "napi version" "version": "napi version"
}, },
"devDependencies": { "devDependencies": {