Skip to content

Commit 1f0502c

Browse files
committed
feat: update project name and references to ripgrep-napi in CI configuration, README, and package files
1 parent 87fa2a9 commit 1f0502c

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22
env:
33
DEBUG: napi:*
4-
APP_NAME: package-template
4+
APP_NAME: ripgrep-napi
55
MACOSX_DEPLOYMENT_TARGET: '10.13'
66
CARGO_INCREMENTAL: '1'
77
permissions:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `@napi-rs/package-template`
1+
# `@napi-rs/ripgrep-napi`
22

3-
![https://github.com/napi-rs/package-template/actions](https://github.com/napi-rs/package-template/workflows/CI/badge.svg)
3+
![https://github.com/napi-rs/ripgrep-napi/actions](https://github.com/napi-rs/ripgrep-napi/workflows/CI/badge.svg)
44

55
> Template project for writing node packages with napi-rs.
66
@@ -14,14 +14,14 @@
1414
## Install this test package
1515

1616
```
17-
pnpm add @napi-rs/package-template
17+
pnpm add @napi-rs/ripgrep-napi
1818
```
1919

2020
## Usage
2121

2222
### Build
2323

24-
After `pnpm build` command, you can see `package-template.[darwin|win32|linux].node` file in project root. This is the native addon built from [lib.rs](./src/lib.rs).
24+
After `pnpm build` command, you can see `ripgrep-napi.[darwin|win32|linux].node` file in project root. This is the native addon built from [lib.rs](./src/lib.rs).
2525

2626
### Test
2727

@@ -41,7 +41,7 @@ The other problem is how to deliver prebuild `binary` to users. Downloading it i
4141

4242
In this package, we choose a better way to solve this problem. We release different `npm packages` for different platforms. And add it to `optionalDependencies` before releasing the `Major` package to npm.
4343

44-
`NPM` will choose which native package should download from `registry` automatically. You can see [npm](./npm) dir for details. And you can also run `pnpm add @napi-rs/package-template` to see how it works.
44+
`NPM` will choose which native package should download from `registry` automatically. You can see [npm](./npm) dir for details. And you can also run `pnpm add @napi-rs/ripgrep-napi` to see how it works.
4545

4646
## Develop requirements
4747

package-template.wasi-browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const __wasi = new __WASI({
1111
version: 'preview1',
1212
})
1313

14-
const __wasmUrl = new URL('./package-template.wasm32-wasi.wasm', import.meta.url).href
14+
const __wasmUrl = new URL('./ripgrep-napi.wasm32-wasi.wasm', import.meta.url).href
1515
const __emnapiContext = __emnapiGetDefaultContext()
1616

1717

package-template.wasi.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ const __sharedMemory = new WebAssembly.Memory({
3232
shared: true,
3333
})
3434

35-
let __wasmFilePath = __nodePath.join(__dirname, 'package-template.wasm32-wasi.wasm')
36-
const __wasmDebugFilePath = __nodePath.join(__dirname, 'package-template.wasm32-wasi.debug.wasm')
35+
let __wasmFilePath = __nodePath.join(__dirname, 'ripgrep-napi.wasm32-wasi.wasm')
36+
const __wasmDebugFilePath = __nodePath.join(__dirname, 'ripgrep-napi.wasm32-wasi.debug.wasm')
3737

3838
if (__nodeFs.existsSync(__wasmDebugFilePath)) {
3939
__wasmFilePath = __wasmDebugFilePath
4040
} else if (!__nodeFs.existsSync(__wasmFilePath)) {
4141
try {
4242
__wasmFilePath = __nodePath.resolve('@mcpc-tech/ripgrep-napi-wasm32-wasi')
4343
} catch {
44-
throw new Error('Cannot find package-template.wasm32-wasi.wasm file, and @mcpc-tech/ripgrep-napi-wasm32-wasi package is not installed.')
44+
throw new Error('Cannot find ripgrep-napi.wasm32-wasi.wasm file, and @mcpc-tech/ripgrep-napi-wasm32-wasi package is not installed.')
4545
}
4646
}
4747

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "@mcpc-tech/ripgrep-napi",
3-
"version": "0.0.2",
3+
"version": "0.0.1",
44
"description": "Template project for writing node package with napi-rs",
55
"main": "index.js",
66
"types": "index.d.ts",
77
"browser": "browser.js",
88
"repository": {
9-
"url": "git+ssh://git@github.com/napi-rs/package-template-pnpm.git",
9+
"url": "git+ssh://git@github.com/napi-rs/ripgrep-napi-pnpm.git",
1010
"type": "git"
1111
},
1212
"license": "MIT",
@@ -21,9 +21,7 @@
2121
"files": [
2222
"index.d.ts",
2323
"index.js",
24-
"browser.js",
25-
"*.node",
26-
"*.wasm"
24+
"browser.js"
2725
],
2826
"napi": {
2927
"binaryName": "ripgrep-napi",

0 commit comments

Comments
 (0)