Skip to content

Commit

Permalink
Cleanup for use as a dep (#20)
Browse files Browse the repository at this point in the history
- node_modules directory structure is non-deterministic, just call the binaries for tsc and standardx in "scripts".
- Add a postinstall build step to compile typescript automatically
- Given that we no longer keep built/ in git, remove that documentation.
  • Loading branch information
ShivanKaul authored May 12, 2023
1 parent 4c013d8 commit cf3e86a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ pagegraph-crawl
===

Command line tool for crawling with PageGraph. It does not include a
PageGraph enabled build though; you'll need to bring your own or
wait a few days until we start providing our own.
PageGraph enabled build though; you can point it at the latest Nightly
version of Brave.

Usage
---
Expand All @@ -20,7 +20,7 @@ Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
-b BINARY, --binary BINARY
Path to the PageGraph enabled build of Brave.
Path to the PageGraph-enabled build of Brave.
-o OUTPUT, --output OUTPUT
Path to write graphs to.
-u URL [URL ...], --url URL [URL ...]
Expand All @@ -39,9 +39,3 @@ Optional arguments:
--debug {none,debug,verbose}
Print debugging information. Default: none.
```

Developing
---
If you're editing / developing please make sure things `npm run lint` cleanly,
and `num run build` before pushing, to make sure `./built` stays in sync
with `./src`.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "pagegraph-crawl",
"version": "1.0.0",
"description": "",
"description": "CLI for crawling with PageGraph.",
"main": "built/crawl.js",
"scripts": {
"lint": "node ./node_modules/standardx/bin/cmd.js src/**/*.ts src/*.ts",
"lint:fix": "node ./node_modules/standardx/bin/cmd.js --fix src/**/*.ts src/*.ts",
"build": "node ./node_modules/typescript/bin/tsc",
"lint": "standardx src/**/*.ts src/*.ts",
"lint:fix": "standardx --fix src/**/*.ts src/*.ts",
"build": "tsc",
"postinstall": "npm run build",
"crawl": "node ./built/run.js"
},
"type": "module",
Expand Down

0 comments on commit cf3e86a

Please sign in to comment.