Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit ca8c069

Browse files
authored
Dev/remove ncc (#73)
* Remove ncc dependency * bump version
1 parent e834b85 commit ca8c069

5 files changed

Lines changed: 12 additions & 69 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ jobs:
3131
registry-url: https://registry.npmjs.org/
3232
- run: npm ci
3333
- run: npm run build
34-
- run: npm run build-singularity
35-
- run: npm run build-singularity-retrieve
36-
- run: npm run build-singularity-prepare
3734
- run: npm publish
3835
env:
3936
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

README.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ singularity-prepare -h
2525
git clone https://github.com/tech-greedy/singularity.git
2626
cd singularity
2727
npm ci
28-
npm run build-singularity
29-
npm run build-singularity-retrieve
30-
npm run build-singularity-prepare
28+
npm run build
3129
npm link
32-
npx singularity-prepare
30+
npx singularity -h
3331
```
3432
## 2. Build Dependency
3533
By default, npm will pull the pre-built binaries for dependencies. You can choose to build it from source and override the one pulled by npm.
@@ -233,32 +231,6 @@ Worker to scan the dataset, make plan and generate Car file and CIDs
233231
#### enabled, num_workers
234232
Whether to enable the worker and how many worker instances. As a rule of thumb, use `min(cpu_cores / 2.5, io_MBps / 50)`
235233

236-
# Build from source
237-
## This project
238-
You can transpile this project with npm
239-
```shell
240-
# Make sure you have npm v16 installed, i.e. via nvm (https://github.com/nvm-sh/nvm)
241-
git clone https://github.com/tech-greedy/singularity.git
242-
cd singularity
243-
npm ci
244-
npm run build-singularity
245-
npm run build-singularity-retrieve
246-
npm run build-singularity-prepare
247-
npm link
248-
singularity -h
249-
```
250-
The dependency of this project can be built from source
251-
## go-generate-car
252-
```shell
253-
# Make sure you have go v1.17+ installed
254-
git clone https://github.com/tech-greedy/go-generate-car.git
255-
cd go-generate-car
256-
make
257-
```
258-
Then copy the generated binary to override the existing one from the PATH for your node environment, i.e.
259-
* singularity installed globally `/home/user/.nvm/versions/node/v16.15.0/bin`
260-
* singularity cloned locally `./node_modules/.bin`
261-
262234
# FAQ
263235
### Does it work in Windows
264236
Only Deal Preparation works and Indexing works in Windows.

package-lock.json

Lines changed: 5 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
{
22
"name": "@techgreedy/singularity",
3-
"version": "0.0.16",
3+
"version": "0.0.17",
44
"description": "Large scale client tool with capabilities on onboard PB-scale data to Filecoin network",
55
"main": "dist/source/start.js",
66
"types": "dist/source/start.d.ts",
77
"scripts": {
88
"build": "tsc && copyfiles \"config/**/*.toml\" dist",
9-
"build-singularity": "ncc build src/singularity.ts -m -o dist/ncc/singularity --target es2020 && copyfiles \"config/**/*.toml\" dist/ncc/singularity",
10-
"build-singularity-retrieve": "ncc build src/singularity-retrieve.ts -m -o dist/ncc/singularity-retrieve --target es2020 && copyfiles \"config/**/*.toml\" dist/ncc/singularity-retrieve",
11-
"build-singularity-prepare": "ncc build src/singularity-prepare.ts -m -o dist/ncc/singularity-prepare --target es2020 && copyfiles \"config/**/*.toml\" dist/ncc/singularity-prepare",
129
"postbuild": "chmod +x dist/src/singularity.js",
1310
"init": "ts-node src/singularity.ts init",
1411
"start": "nodemon src/singularity.ts daemon",
@@ -44,7 +41,6 @@
4441
"@types/typescript": "^2.0.0",
4542
"@typescript-eslint/eslint-plugin": "^5.15.0",
4643
"@typescript-eslint/parser": "^5.15.0",
47-
"@vercel/ncc": "^0.34.0",
4844
"copyfiles": "^2.4.1",
4945
"eslint": "^7.32.0",
5046
"eslint-config-standard": "^16.0.3",
@@ -97,12 +93,9 @@
9793
"dist"
9894
],
9995
"bin": {
100-
"singularity": "dist/ncc/singularity/index.js",
101-
"singularity-retrieve": "dist/ncc/singularity-retrieve/index.js",
102-
"singularity-prepare": "dist/ncc/singularity-prepare/index.js",
103-
"singularity-generic": "dist/src/singularity.js",
104-
"singularity-retrieve-generic": "dist/src/singularity-retrieve.js",
105-
"singularity-prepare-generic": "dist/src/singularity-prepare.js"
96+
"singularity": "dist/src/singularity.js",
97+
"singularity-retrieve": "dist/src/singularity-retrieve.js",
98+
"singularity-prepare": "dist/src/singularity-prepare.js"
10699
},
107100
"nyc": {
108101
"extends": "@istanbuljs/nyc-config-typescript",

singularity-prepare.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ singularity-prepare -h
2323
git clone https://github.com/tech-greedy/singularity.git
2424
cd singularity
2525
npm ci
26-
npm run build-singularity-prepare
26+
npm run build
2727
npx singularity-prepare
2828
```
2929
## 2. Build Dependency

0 commit comments

Comments
 (0)