Integrate previously external templates into this repository #12
11
flake.nix
11
flake.nix
|
@ -34,17 +34,6 @@
|
||||||
yj
|
yj
|
||||||
]
|
]
|
||||||
++ old.buildInputs;
|
++ old.buildInputs;
|
||||||
|
|
||||||
shellHook =
|
|
||||||
''
|
|
||||||
# Update package.json
|
|
||||||
if [ -e ./package.json ]; then
|
|
||||||
unlink ./package.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat ./package.yaml | yj > ./package.json
|
|
||||||
''
|
|
||||||
+ old.shellHook;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
server = nixpkgs.legacyPackages.${system}.mkShell {
|
server = nixpkgs.legacyPackages.${system}.mkShell {
|
||||||
|
|
10
templates/.envrc
Normal file
10
templates/.envrc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
nix_direnv_watch_file package-lock.json
|
||||||
|
use flake ..#templates
|
||||||
|
|
||||||
|
# Update package.json
|
||||||
|
if ! cmp --silent .checksum-package.yaml <(sha256sum package.yaml); then
|
||||||
|
echo "Updating package.json"
|
||||||
|
unlink ./package.json
|
||||||
|
yj < ./package.yaml > ./package.json
|
||||||
|
sha256sum package.yaml > .checksum-package.yaml
|
||||||
|
fi
|
1
templates/.gitignore
vendored
1
templates/.gitignore
vendored
|
@ -3,3 +3,4 @@ dist/
|
||||||
node_modules/
|
node_modules/
|
||||||
package.json
|
package.json
|
||||||
result
|
result
|
||||||
|
.checksum-package.yaml
|
||||||
|
|
Loading…
Reference in a new issue