Commit a0fc0f27 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[nix] move spago to nix, upgrade packages in package.json and some cleanup

parent ca976a1f
...@@ -215,7 +215,7 @@ runtime or `devDependencies` if it is not. ...@@ -215,7 +215,7 @@ runtime or `devDependencies` if it is not.
#### Add a purescript dependency? #### Add a purescript dependency?
Add it to `psc-package.json` without the `purescript-` prefix. Add it to `spago.dhall` (or run `spago install ...`).
If is not in the package set, you will need to read the next section. If is not in the package set, you will need to read the next section.
...@@ -225,18 +225,6 @@ You need to add an entry to the relevant map in ...@@ -225,18 +225,6 @@ You need to add an entry to the relevant map in
`packages.dhall`. There are comments in the file explaining how it `packages.dhall`. There are comments in the file explaining how it
works. It's written in dhall, so you can use comments and such. works. It's written in dhall, so you can use comments and such.
You will then need to rebuild the package set:
```shell
yarn rebuild-set # or darn rebuild-set
```
#### Upgrade the base package set local is based on to latest?
```shell
yarn rebase-set && yarn rebuild-set # or darn rebase-set && darn rebuild-set
```
## Theory Introduction ## Theory Introduction
Making sense of out text isn't actually that hard, but it does require Making sense of out text isn't actually that hard, but it does require
......
...@@ -4,11 +4,6 @@ ...@@ -4,11 +4,6 @@
"scripts": { "scripts": {
"generate-purs-packages-nix": "./nix/generate-purs-packages.nix", "generate-purs-packages-nix": "./nix/generate-purs-packages.nix",
"generate-psc-packages-nix": "./nix/generate-packages-json.bash", "generate-psc-packages-nix": "./nix/generate-packages-json.bash",
"rebase-set": "spago upgrade-set && yarn generate-psc-packages-nix",
"rebuild-set": "yarn generate-psc-packages-nix",
"install-ps": "psc-package install",
"compile": "pulp build",
"build": "pulp browserify -t dist/bundle.js",
"css": "sass src/sass/sass.sass:dist/styles/sass.css && yarn css-themes", "css": "sass src/sass/sass.sass:dist/styles/sass.css && yarn css-themes",
"css-themes": "yarn css-default-theme && yarn css-dark-theme && yarn css-darkster-theme && yarn css-greyson-theme && yarn css-herbie-theme && yarn css-monotony-theme", "css-themes": "yarn css-default-theme && yarn css-dark-theme && yarn css-darkster-theme && yarn css-greyson-theme && yarn css-herbie-theme && yarn css-monotony-theme",
"css-default-theme": "sass src/sass/bootstrap/default.sass:dist/styles/bootstrap-default.css", "css-default-theme": "sass src/sass/bootstrap/default.sass:dist/styles/bootstrap-default.css",
...@@ -34,13 +29,13 @@ ...@@ -34,13 +29,13 @@
"@popperjs/core": "^2.9.2", "@popperjs/core": "^2.9.2",
"aes-js": "^3.1.1", "aes-js": "^3.1.1",
"base-x": "^3.0.2", "base-x": "^3.0.2",
"bootstrap": "^5.0.1", "bootstrap": "^5.0.2",
"bootstrap-dark": "^1.0.3", "bootstrap-dark": "^1.0.3",
"create-react-class": "^15.6.3", "create-react-class": "^15.6.3",
"echarts": "^5.1.2", "echarts": "^5.1.2",
"echarts-for-react": "^3.0.1", "echarts-for-react": "^3.0.1",
"highlightjs": "^9.16.2", "highlightjs": "^9.16.2",
"immer": "^9.0.3", "immer": "^9.0.5",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"pullstate": "^1.20.6", "pullstate": "^1.20.6",
"react": "^17.0.2", "react": "^17.0.2",
...@@ -55,17 +50,13 @@ ...@@ -55,17 +50,13 @@
"@babel/core": "^7.12.9", "@babel/core": "^7.12.9",
"@babel/preset-react": "^7.12.7", "@babel/preset-react": "^7.12.7",
"parcel": "^2.0.0-beta.2", "parcel": "^2.0.0-beta.2",
"psc-package": "^4.0.1",
"pulp": "^15.0.0",
"react-testing-library": "^8.0.1", "react-testing-library": "^8.0.1",
"sass": "^1.23.7", "sass": "^1.35.2",
"serve": "^12.0.0", "serve": "^12.0.0",
"spago": "^0.20.3",
"vscode-languageserver": "^7.0.0", "vscode-languageserver": "^7.0.0",
"xhr2": "^0.2.1" "xhr2": "^0.2.1"
}, },
"optionalDependencies": { "optionalDependencies": {
"purescript": "^0.14.3",
"purescript-language-server": "^0.15.2" "purescript-language-server": "^0.15.2"
} }
} }
...@@ -18,8 +18,8 @@ let ...@@ -18,8 +18,8 @@ let
echo "Compiling" echo "Compiling"
#build-purs #build-purs
echo "Bundling" echo "Bundling"
#yarn pulp browserify --skip-compile -t dist/bundle.js --src-path output #pulp browserify --skip-compile -t dist/bundle.js --src-path output
yarn spago build spago build
browserify browserify
''; '';
...@@ -28,20 +28,20 @@ let ...@@ -28,20 +28,20 @@ let
set -e set -e
echo "Build watch" echo "Build watch"
yarn spago build -w --then browserify spago build -w --then browserify
''; '';
browserify = pkgs.writeShellScriptBin "browserify" '' browserify = pkgs.writeShellScriptBin "browserify" ''
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
yarn pulp browserify --skip-compile -t dist/bundle.js --src-path output pulp browserify --skip-compile -t dist/bundle.js --src-path output
''; '';
repl = pkgs.writeShellScriptBin "repl" '' repl = pkgs.writeShellScriptBin "repl" ''
#!/usr/bin/env bash #!/usr/bin/env bash
yarn pulp repl pulp repl
''; '';
test-ps = pkgs.writeShellScriptBin "test-ps" '' test-ps = pkgs.writeShellScriptBin "test-ps" ''
...@@ -51,8 +51,8 @@ let ...@@ -51,8 +51,8 @@ let
echo "Compiling" echo "Compiling"
build-purs build-purs
echo "Testing" echo "Testing"
# yarn pulp browserify --skip-compile -t dist/bundle.js --src-path output # pulp browserify --skip-compile -t dist/bundle.js --src-path output
# yarn pulp test --src-path output --test-path output # pulp test --src-path output --test-path output
NODE_PATH=output node -e "require('Test.Main').main();" NODE_PATH=output node -e "require('Test.Main').main();"
''; '';
in in
...@@ -66,6 +66,7 @@ pkgs.mkShell { ...@@ -66,6 +66,7 @@ pkgs.mkShell {
build-watch build-watch
build build
repl repl
pkgs.pulp
pkgs.spago pkgs.spago
pkgs.yarn pkgs.yarn
test-ps test-ps
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment