react-static: use mkYarnPackage

This commit is contained in:
Robert Schütz 2023-08-21 21:29:07 -07:00
parent ac3d200056
commit e42ad74457
6 changed files with 212 additions and 1827 deletions

View File

@ -84,6 +84,7 @@ mapAliases {
mdctl-cli = self."@medable/mdctl-cli"; # added 2023-08-21
node-inspector = throw "node-inspector was removed because it was broken"; # added 2023-08-21
inherit (pkgs) npm-check-updates; # added 2023-08-22
inherit (pkgs) react-static; # added 2023-08-21
readability-cli = pkgs.readability-cli; # Added 2023-06-12
reveal-md = pkgs.reveal-md; # added 2023-07-31
inherit (pkgs) rtlcss; # added 2023-08-29

View File

@ -233,7 +233,6 @@
, "pyright"
, "quicktype"
, "react-native-cli"
, "react-static"
, "react-tools"
, "redoc-cli"
, "remod-cli"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
{ lib
, mkYarnPackage
, fetchFromGitHub
, fetchYarnDeps
}:
mkYarnPackage rec {
pname = "react-static";
version = "7.6.2";
src = fetchFromGitHub {
owner = "react-static";
repo = "react-static";
rev = "v${version}";
hash = "sha256-dlYmD0vgEqWxYf7E0VYstZMAuNDGvQP7xDgHo/wmlUs=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-SNnJPUzv+l2HXfA6NKYpJvn/DCX3a42JQ3N0+XYKbd8=";
};
buildPhase = ''
runHook preBuild
yarn --cwd deps/react-static/packages/react-static --offline build
runHook postBuild
'';
doDist = false;
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/node_modules"
mv deps/react-static/packages/react-static "$out/lib/node_modules"
mv node_modules "$out/lib/node_modules/react-static"
ln -s "$out/lib/node_modules/react-static/bin" "$out"
runHook postInstall
'';
meta = {
changelog = "https://github.com/react-static/react-static/blob/${src.rev}/CHANGELOG.md";
description = "A progressive static site generator for React";
homepage = "https://github.com/react-static/react-static";
license = lib.licenses.mit;
mainProgram = "react-static";
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -0,0 +1,154 @@
{
"name": "react-static",
"description": "A progressive static site generator for React",
"version": "7.6.2",
"license": "MIT",
"repository": "https://github.com/react-static/react-static",
"main": "lib/index.js",
"types": "src/index.d.ts",
"engines": {
"node": ">=8.9.0"
},
"bin": {
"react-static": "./bin/react-static"
},
"scripts": {
"prebuild": "rimraf lib",
"build": "cross-env REACT_STATIC_INTERNAL=true babel src --out-dir lib --ignore \"**/__tests__/*\" --ignore \"**/__mocks__/*\" --source-maps inline",
"watch": "yarn build --watch",
"watch:link": "onchange './lib/**/*' -- yalc push --changed",
"start": "yarn watch",
"test": "yarn format && yarn lint && yarn unitTest",
"lint": "eslint src",
"format": "prettier README.md {src,templates/*/src}/**/*.js --write",
"unitTest": "cross-env NODE_ENV=test yarn jest ./src",
"unitTestWatch": "cross-env NODE_ENV=test yarn jest src --watch",
"preversion": "yarn build && yarn test",
"publishLink": "echo '{{event}} to {{changed}}' && yalc publish"
},
"peerDependencies": {
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-hot-loader": "^4.12.11"
},
"dependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-export-default-from": "^7.5.2",
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-transform-destructuring": "^7.5.0",
"@babel/plugin-transform-modules-commonjs": "^7.5.0",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@babel/preset-stage-0": "^7.0.0",
"@babel/register": "^7.5.5",
"@babel/runtime": "^7.5.5",
"@reach/router": "^1.3.1",
"autoprefixer": "^9.7.4",
"axios": "^0.21.1",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "^8.0.6",
"babel-plugin-macros": "^2.6.1",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"babel-plugin-universal-import": "^4.0.0",
"case-sensitive-paths-webpack-plugin": "^2.2.0",
"chalk": "^2.4.2",
"chokidar": "^3.0.2",
"circular-dependency-plugin": "^5.2.0",
"cors": "^2.8.5",
"css-loader": "^2.1.1",
"download-git-repo": "^2.0.0",
"extract-css-chunks-webpack-plugin": "^4.6.0",
"file-loader": "3.0.1",
"fs-extra": "^7.0.1",
"git-promise": "^1.0.0",
"glob": "^7.1.4",
"gunzip-maybe": "^1.4.1",
"html-webpack-plugin": "^3.2.0",
"inquirer": "^6.5.1",
"inquirer-autocomplete-prompt": "^1.0.1",
"intersection-observer": "^0.7.0",
"jsesc": "^2.5.2",
"match-sorter": "^3.1.1",
"minimist": "^1.2.0",
"mutation-observer": "^1.0.3",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"portfinder": "^1.0.21",
"postcss-flexbugs-fixes": "^4.1.0",
"postcss-loader": "^3.0.0",
"pretty-error": "^2.1.1",
"progress": "^2.0.3",
"prop-types": "^15.7.2",
"raf": "^3.4.1",
"raw-loader": "^3.1.0",
"react-helmet": "^6.1.0",
"react-universal-component": "^4.0.0",
"resolve-from": "^5.0.0",
"serve": "^11.1.0",
"shorthash": "^0.0.2",
"slash": "^2.0.0",
"socket.io": "^2.2.0",
"socket.io-client": "^2.2.0",
"style-loader": "0.23.1",
"swimmer": "^1.4.0",
"tar-fs": "^2.0.0",
"terser-webpack-plugin": "^1.4.1",
"upath": "^1.1.2",
"url-loader": "^2.1.0",
"webpack": "^4.39.2",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-dev-server": "^3.8.0",
"webpack-flush-chunks": "^2.0.3",
"webpack-node-externals": "^1.7.2"
},
"devDependencies": {
"@types/react": "^16.9.1",
"@types/react-helmet": "^6.1.0",
"babel-jest": "^24.8.0",
"cors": "^2.8.5",
"cross-env": "^5.2.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.4.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-config-react-tools": "^1.1.7",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"express": "^4.17.1",
"husky": "^3.0.3",
"jest": "^24.8.0",
"lerna": "^3.16.4",
"onchange": "^6.0.0",
"prettier": "1.18.2",
"react": "^16.9.0",
"react-dev-utils": "^9.0.3",
"react-dom": "^16.9.0",
"react-hot-loader": "^4.12.11",
"rimraf": "^2.7.0",
"webpack-hot-middleware": "^2.25.0"
},
"jest": {
"verbose": true,
"moduleDirectories": [
"node_modules",
"src"
],
"testRegex": "(/__tests__/.*\\.(test))\\.jsx?$",
"moduleNameMapper": {
"static.config.js$": "<rootDir>/src/static/__mocks__/static.config.js.mock.js"
},
"setupFiles": [
"<rootDir>/setupTests.js"
],
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
},
"gitHead": "875004e6e75d36043382b8ec8bba27a766c1a83a"
}

View File

@ -20059,6 +20059,8 @@ with pkgs;
rdocker = callPackage ../development/tools/rdocker { };
react-static = callPackage ../development/tools/react-static { };
redis-dump = callPackage ../development/tools/redis-dump { };
redis-plus-plus = callPackage ../development/libraries/redis-plus-plus { };