Last active
May 29, 2020 19:24
-
-
Save yorickvP/a3b4cbea87fa8f528d96062e0013252b to your computer and use it in GitHub Desktop.
nix-reason-react-starter-build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
nix-npm-buildpackage = pkgs.callPackage (builtins.fetchTarball "https://github.com/yorickvp/nix-npm-buildpackage/archive/yorickvp/packageOverrides.tar.gz") {}; | |
in | |
nix-npm-buildpackage.buildNpmPackage { | |
src = ./.; | |
installJavascript = false; | |
packageOverrides = { | |
bs-platform = pkgs.bs-platform; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "reason-react-starter", | |
"version": "0.1.0", | |
"scripts": { | |
"build": "bsb -make-world", | |
"start": "bsb -make-world -w -ws _ ", | |
"clean": "bsb -clean-world", | |
"webpack": "webpack -w", | |
"webpack:production": "NODE_ENV=production webpack", | |
"server": "webpack-dev-server", | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"prepublish": "bsb -make-world && NODE_ENV=production webpack" | |
}, | |
"keywords": [ | |
"BuckleScript", | |
"ReasonReact", | |
"reason-react" | |
], | |
"files": ["/build"], | |
"author": "", | |
"license": "MIT", | |
"dependencies": { | |
}, | |
"devDependencies": { | |
"@glennsl/bs-json": "^5.0.2", | |
"bs-fetch": "^0.5.2", | |
"bulma": "^0.8.2", | |
"moment": "^2.26.0", | |
"moment-locales-webpack-plugin": "^1.2.0", | |
"react": "^16.8.1", | |
"react-dom": "^16.8.1", | |
"reason-react": ">=0.7.1", | |
"bs-platform": "^7.3.2", | |
"webpack": "^4.0.1", | |
"webpack-cli": "^3.1.1", | |
"webpack-dev-server": "^3.1.8", | |
"html-webpack-plugin": "^3.2.0", | |
"style-loader": "^1.0.0", | |
"css-loader": "^3.2.0" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
pkgs = import <nixpkgs> {}; | |
in | |
pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
nodejs | |
yarn | |
bs-platform | |
ocamlPackages.reason | |
]; | |
shellHook = '' | |
mkdir -p node_modules | |
rm -rf node_modules/bs-platform | |
ln -s ${pkgs.bs-platform} node_modules/bs-platform | |
echo "run npm install && npm start, run npm run server in other term" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment