[refactor] migrate from yarn to bun

parent 9740c437
......@@ -2,75 +2,57 @@
"name": "Gargantext",
"version": "0.0.6.9.9.9.9.1",
"scripts": {
"generate-purs-packages-nix": "./nix/generate-purs-packages.nix",
"generate-psc-packages-nix": "./nix/generate-packages-json.bash",
"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": "bun css-themes",
"css-themes": "bun css-default-theme && bun css-dark-theme && bun css-darkster-theme && bun css-greyson-theme && bun css-herbie-theme && bun css-monotony-theme",
"css-default-theme": "sass src/sass/themes/default.scss:dist/styles/bootstrap-default.css",
"css-dark-theme": "cp node_modules/bootstrap-dark/src/bootstrap-dark.css dist/styles/bootstrap-dark.css",
"css-darkster-theme": "sass src/sass/themes/darkster.scss:dist/styles/bootstrap-darkster.css",
"css-greyson-theme": "sass src/sass/themes/greyson.scss:dist/styles/bootstrap-greyson.css",
"css-herbie-theme": "sass src/sass/themes/herbie.scss:dist/styles/bootstrap-herbie.css",
"css-monotony-theme": "sass src/sass/themes/monotony.scss:dist/styles/bootstrap-monotony.css",
"css-npm": "npm run css-themes-npm",
"css-themes-npm": "npm run css-default-theme && npm run css-dark-theme && npm run css-darkster-theme && npm run css-greyson-theme && npm run css-herbie-theme && npm run css-monotony-theme",
"docs": "pulp docs -- --format html",
"repl": "pulp repl",
"clean": "rm -Rf output node_modules",
"clean-js": "rm -Rf node_modules",
"clean-ps": "rm -Rf output",
"docs": "bun spago docs",
"server": "serve -l 8008 dist",
"server-ssl": "ssl-serve --ssl dist",
"build": "spago bundle-app --main Main --to dist/bundle.js",
"prod": "yarn prod:compile && yarn prod:dce && yarn prod:bundle && yarn prod:pack",
"prod:compile": "pulp build -- -g corefn",
"prod:dce": "zephyr -f Main.main",
"prod:bundle": "pulp browserify --skip-compile -o dce-output -t app.js",
"prod:pack": "parcel build index.html -d prod --public-url . --no-source-maps",
"test-pulp": "pulp test",
"test": "gauge run specs/"
"server-ssl": "ssl-serve --ssl dist"
},
"dependencies": {
"@fontsource/crete-round": "^5.0.12",
"@fontsource/montserrat": "^5.0.17",
"@fontsource/crete-round": "~5.0.12",
"@fontsource/montserrat": "~5.0.17",
"@fontsource/mulish": "^5.0.16",
"@fontsource/nunito": "^5.0.17",
"@fontsource/open-sans": "^5.0.25",
"@fontsource/oswald": "^5.0.18",
"@popperjs/core": "^2.9.2",
"@urql/core": "^2.3.3",
"aes-js": "^3.1.1",
"base-x": "^3.0.2",
"bootstrap": "^4.6.0",
"bootstrap-dark": "^1.0.3",
"buffer": "^6.0.3",
"create-react-class": "^15.6.3",
"crypto": "^1.0.1",
"d3": "^7.6.1",
"echarts": "^5.1.2",
"echarts-for-react": "^3.0.1",
"esbuild": "^0.15.7",
"graphology": "^0.25.1",
"graphology-communities-louvain": "^2.0.1",
"graphology-layout-forceatlas2": "^0.9.2",
"graphology-layout-noverlap": "^0.4.2",
"graphology-operators": "^1.6.0",
"graphql": "^15.6.1",
"graphql-ws": "^5.5.0",
"highlightjs": "^9.16.2",
"immer": "^9.0.5",
"isomorphic-unfetch": "^3.1.0",
"markdown-it": "^13.0.1",
"prop-types": "^15.6.2",
"pullstate": "^1.20.6",
"react-awesome-popover": "^6.1.1",
"react-bootstrap": "^1.5.2",
"react-dom": "^17.0.2",
"react-tooltip": "^4.2.8",
"secp256k1": "^4.0.2",
"sigma": "^2.4.0",
"spago": "^0.93.29",
"twgl.js": "^5.0.4",
"@fontsource/open-sans": "~5.0.25",
"@fontsource/oswald": "~5.0.18",
"@popperjs/core": "~2.9.2",
"@urql/core": "~2.3.3",
"aes-js": "~3.1.1",
"base-x": "~3.0.2",
"bootstrap": "~4.6.0",
"bootstrap-dark": "~1.0.3",
"buffer": "~6.0.3",
"create-react-class": "~15.6.3",
"crypto": "~1.0.1",
"d3": "~7.6.1",
"echarts": "~5.1.2",
"echarts-for-react": "~3.0.1",
"graphology": "~0.25.1",
"graphology-communities-louvain": "~2.0.1",
"graphology-layout-forceatlas2": "~0.9.2",
"graphology-layout-noverlap": "~0.4.2",
"graphology-operators": "~1.6.0",
"graphql": "~15.6.1",
"graphql-ws": "~5.5.0",
"highlightjs": "~9.16.2",
"immer": "~9.0.5",
"isomorphic-unfetch": "~3.1.0",
"markdown-it": "~13.0.1",
"prop-types": "~15.6.2",
"pullstate": "~1.20.6",
"react-awesome-popover": "~6.1.1",
"react-bootstrap": "~1.5.2",
"react-dom": "~17.0.2",
"react-tooltip": "~4.2.8",
"secp256k1": "~4.0.2",
"sigma": "~2.4.0",
"twgl.js": "~5.0.4",
"uuid": "8.3.2"
},
"devDependencies": {
......@@ -78,10 +60,12 @@
"@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.12.7",
"@getgauge/cli": "^1.4.0",
"esbuild": "^0.15.7",
"parcel": "^2.8.2",
"react-testing-library": "^8.0.1",
"sass": "^1.35.2",
"serve": "^12.0.0",
"spago": "^0.93.29",
"ssl-serve": "^6.5.8",
"taiko": "latest",
"vscode-languageserver": "^7.0.0",
......
......@@ -16,7 +16,8 @@ let
set -e
echo "Installing JS Dependencies"
yarn
#yarn
bun install
echo "Compiling"
#build-purs
......@@ -26,7 +27,7 @@ let
#browserify
# 0.15
spago bundle-app --main Main --to dist/bundle.js
bun spago bundle --module Main --outfile dist/bundle.js
'';
build-suggestions = pkgs.writeShellScriptBin "build-suggestions" ''
......@@ -34,11 +35,13 @@ let
set -e
echo "Installing JS Dependencies"
yarn
#yarn
bun install
rm -rf ./output
echo "Compiling"
bun spago build
#build-purs
#spago build
#echo "Bundling"
......@@ -46,7 +49,7 @@ let
#browserify
# 0.15
spago bundle-app --main Main --to dist/bundle.js --purs-args "--json-errors" | jq -r '.warnings | map(select(.errorCode | test("UnusedDctorExplicitImport|UnusedDctorImport|UnusedDeclaration|UnusedExplicitImport|UnusedImport|UnusedName|UnusedTypeVar"))) | map(select(.filename | test("^.spago") | not)) | map("[\(.filename)::\(.position.startLine)] \(.message)\n \(.suggestion)") | join("\n----------\n")'
bun spago bundle --module Main --outfile dist/bundle.js --purs-args "--json-errors" | jq -r '.warnings | map(select(.errorCode | test("UnusedDctorExplicitImport|UnusedDctorImport|UnusedDeclaration|UnusedExplicitImport|UnusedImport|UnusedName|UnusedTypeVar"))) | map(select(.filename | test("^.spago") | not)) | map("[\(.filename)::\(.position.startLine)] \(.message)\n \(.suggestion)") | join("\n----------\n")'
'';
......@@ -54,7 +57,8 @@ let
#!/usr/bin/env bash
set -e
yarn css
#yarn css
bun css
'';
......@@ -62,7 +66,8 @@ let
#!/usr/bin/env bash
set -e
yarn server
#yarn server
bun server
'';
......@@ -71,33 +76,18 @@ let
set -e
echo "Build watch"
spago build -w --then browserify
bun spago build -w --then browserify
'';
build-zephyr = pkgs.writeShellScriptBin "build-zephyr" ''
#!/usr/bin/env bash
set -e
spago build --purs-args '--codegen corefn,js'
bun spago build --purs-args '--codegen corefn,js'
zephyr -f Main.main
browserify-zephyr
'';
browserify = pkgs.writeShellScriptBin "browserify" ''
#!/usr/bin/env bash
set -e
pulp browserify --skip-compile -t dist/bundle.js --src-path output
'';
browserify-zephyr = pkgs.writeShellScriptBin "browserify-zephyr" ''
#!/usr/bin/env bash
set -e
pulp browserify --skip-compile -t dist/bundle.js -o dce-output
#purs bundle -o dist/bundle.js -m Main dce-output/**/*.js
'';
minify-bundle = pkgs.writeShellScriptBin "minify-bundle" ''
#!/usr/bin/env bash
set -e
......@@ -108,7 +98,7 @@ let
repl = pkgs.writeShellScriptBin "repl" ''
#!/usr/bin/env bash
spago repl
bun spago repl
'';
test-ps = pkgs.writeShellScriptBin "test-ps" ''
......@@ -116,11 +106,11 @@ let
set -e
echo "Compiling"
yarn
bun install
#spago build
#build-purs
echo "Testing"
spago -v -x test.dhall test --main Test.Main
bun spago test
# spago -x test.dhall bundle-app --main Test.Main --to dist/test-bundle.js --platform node
# pulp browserify --skip-compile -t dist/bundle.js --src-path output
# pulp test --src-path output --test-path output
......@@ -147,13 +137,12 @@ pkgs.mkShell {
#pkgs.nodePackages.purescript-language-server
#pkgs.python # needed for msgpack etc
#nodejs_20_3_1
pkgs.pulp
#pkgs.pulp
#pkgs.spago
pkgs.yarn
#pkgs.yarn
pkgs.bun
# scripts
browserify
browserify-zephyr
build-css
build-purs
build-suggestions
......
This diff is collapsed.
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