nodejs: Add instructions around building and chmod on pre-commit.
parent
07a05d6a04
commit
0aaa1ebc38
|
@ -49,6 +49,7 @@ cp validate.cjs "$BUILD"/bs.nodejs
|
||||||
# Explicitly set permissions on all copied files.
|
# Explicitly set permissions on all copied files.
|
||||||
find "$BUILD" -type f -execdir chmod 644 {} +
|
find "$BUILD" -type f -execdir chmod 644 {} +
|
||||||
find "$BUILD" -type d -execdir chmod 755 {} +
|
find "$BUILD" -type d -execdir chmod 755 {} +
|
||||||
|
chmod 755 "$BUILD"/.githooks/pre-commit
|
||||||
|
|
||||||
# Validate the provided name is usable.
|
# Validate the provided name is usable.
|
||||||
nix develop "$BUILD" --command bash -c \
|
nix develop "$BUILD" --command bash -c \
|
||||||
|
|
|
@ -9,6 +9,20 @@ run via:
|
||||||
$ nix develop
|
$ nix develop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
If you make changes to the `package-lock.json` file, you'll need to update the
|
||||||
|
`npmDepsHash` value in `flake.nix`. The easiest way to discover this value is
|
||||||
|
by running the following:
|
||||||
|
```bash
|
||||||
|
$ prefetch-npm-deps package-lock.json
|
||||||
|
```
|
||||||
|
Alternatively, you can set the value of `npmDepsHash` to `lib.fakeHash` and run:
|
||||||
|
```bash
|
||||||
|
$ nix build
|
||||||
|
```
|
||||||
|
Nix will complain with the has value it actually expected.
|
||||||
|
|
||||||
## Language Server
|
## Language Server
|
||||||
|
|
||||||
The [typescript-language-server](https://github.com/typescript-language-server/typescript-language-server)
|
The [typescript-language-server](https://github.com/typescript-language-server/typescript-language-server)
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
npmDepsHash = "<SHA_256>";
|
npmDepsHash = "<SHA_256>";
|
||||||
|
# npmDepsHash = pkgs.lib.fakeHash;
|
||||||
|
|
||||||
# Needed to properly invoke npm run build.
|
# Needed to properly invoke npm run build.
|
||||||
nativeBuildInputs = [ pkgs.typescript ];
|
nativeBuildInputs = [ pkgs.typescript ];
|
||||||
|
|
Loading…
Reference in New Issue