Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Nov 21, 2020
1 parent f09616f commit ef4c7f7
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ jobs:

build-win32-ia686:
runs-on: windows-latest
env:
CARGO_PROFILE_RELEASE_OPT_LEVEL: 1
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ mimalloc = {version = "0.1"}
napi-build = {git = "https://github.com/napi-rs/napi-rs", branch = "rust-codegen-win32"}

[profile.release]
opt-level = 's'
lto = true
42 changes: 10 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,8 @@
"main": "index.js",
"repository": "git@github.com:napi-rs/package-template.git",
"license": "MIT",
"keywords": [
"napi-rs",
"NAPI",
"N-API",
"Rust",
"node-addon",
"node-addon-api"
],
"files": [
"index.d.ts",
"index.js"
],
"keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
"files": ["index.d.ts", "index.js"],
"napi": {
"name": "package-template",
"triples": {
Expand Down Expand Up @@ -59,6 +49,7 @@
"ava": "^3.13.0",
"benny": "^3.6.15",
"chalk": "^4.1.0",
"cross-env": "^7.0.2",
"eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
Expand All @@ -75,27 +66,14 @@
"@node-rs/helper": "^1.0.0-alpha.1"
},
"lint-staged": {
"*.@(js|ts|tsx)": [
"prettier --write",
"eslint -c .eslintrc.yml --fix"
],
"*.@(yml|yaml)": [
"prettier --parser yaml --write"
],
"*.md": [
"prettier --parser markdown --write"
],
"*.json": [
"prettier --parser json --write"
]
"*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
"*.@(yml|yaml)": ["prettier --parser yaml --write"],
"*.md": ["prettier --parser markdown --write"],
"*.json": ["prettier --parser json --write"]
},
"ava": {
"require": [
"ts-node/register/transpile-only"
],
"extensions": [
"ts"
],
"require": ["ts-node/register/transpile-only"],
"extensions": ["ts"],
"environmentVariables": {
"TS_NODE_PROJECT": "./tsconfig.json"
}
Expand All @@ -113,4 +91,4 @@
"pre-commit": "lint-staged"
}
}
}
}
5 changes: 2 additions & 3 deletions simple-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const { exec } = require('child_process')
const { stderr } = require('process')

exec(`node -e "console.log(require('./index.js'))"`, (err, stdout, stderr) => {
console.info(stdout)
console.info(stderr)
if (err) {
console.error(err)
process.exit(1)
}
console.info(stdout)
console.info(stderr)
})
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,13 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"

cross-env@^7.0.2:
version "7.0.2"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.2.tgz#bd5ed31339a93a3418ac4f3ca9ca3403082ae5f9"
integrity sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand All @@ -953,7 +960,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
shebang-command "^1.2.0"
which "^1.2.9"

cross-spawn@^7.0.0, cross-spawn@^7.0.2:
cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
Expand Down

0 comments on commit ef4c7f7

Please sign in to comment.