Skip to content

Commit

Permalink
chore: Fix links in Readme, standardize scripts between projects and …
Browse files Browse the repository at this point in the history
…repos (#11)

* Update links in Readme

* Standardize scripts between packages and repos
  • Loading branch information
spautz committed Jun 29, 2020
1 parent 32bbbea commit 0f6f9b9
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 97 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -19,7 +19,7 @@ state, as if you never left.

- [React Router Hibernate](./packages/react-router-hibernate/) works per-route, if you're using
[React Router](https://reacttraining.com/react-router/) (v5)
- [React Hibernate](./packages/react-hibernate-core/) works for any React subtree
- [React Hibernate](./packages/react-hibernate/) works for any React subtree
- [React Pauseable Containers](./packages/react-pauseable-containers/) improve performances by freezing all updates
to hibernated subtrees

Expand All @@ -39,7 +39,7 @@ just a quick, easy way to get "good enough" coverage for the common cases.

## Packages

**[react-hibernate](./packages/react-hibernate-core/)**
**[react-hibernate](./packages/react-hibernate/)**

[![npm version](https://img.shields.io/npm/v/react-hibernate.svg)](https://www.npmjs.com/package/react-hibernate)
[![gzip size](https://img.shields.io/bundlephobia/minzip/react-hibernate)](https://bundlephobia.com/result?p=react-hibernate@latest)
Expand Down
51 changes: 26 additions & 25 deletions package.json
Expand Up @@ -14,36 +14,37 @@
"author": "Steven Pautz <spautz@gmail.com>",
"sideEffects": false,
"scripts": {
"____ BASE COMMANDS _________________________________________________": "",
"build:all": "lerna exec yon build",
"clean": "rimraf storybook-static/ && rimraf node_modules/.cache/ && yon test:clean",
"clean:all": "yon clean && lerna exec yon clean",
"prepare:all": "lerna exec yon prepare",
"release:changelog": "standard-version --skip.commit --skip.tag --release-as ",
"release:tag": "standard-version --sign --skip.changelog --release-as ",
"test": "jest --coverage",
"test:clean": "rimraf coverage/ && lerna exec yon test:clean",
"test:watch": "jest --coverage --watch",
"test:report": "jest --coverage --coverageReporters=text-lcov | coveralls",
"____ LIFECYCLE HOOKS _______________________________________________": "",
"prepare": "lerna bootstrap --ignore-scripts && yon packages:prepare",
"prepublishOnly": "yon checkup && yon packages:build",
"prerelease": "yon clean",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"clean": "rimraf storybook-static/ && rimraf node_modules/.cache/ && yon test:clean && yon packages:clean",
"checkup": "yon format:checkup && yon run types && yon run lint",
"dev": "yon run format && yon run types && yon run lint",
"ci": "yon run checkup && yon run packages:checkup && yon run test:report && yon run build-storybook",
"all": "yon clean && yon run packages:build && yon run dev && yon run test && yon run build-storybook",
"____ BATCH COMMANDS FOR PACKAGES ___________________________________": "",
"packages:prepare": "lerna exec yon prepare",
"packages:build": "lerna exec yon build",
"packages:checkup": "lerna exec yon checkup",
"packages:clean": "lerna exec yon clean",
"packages:dev": "lerna exec yon dev",
"packages:all": "lerna exec yon all",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"format": "prettier --write \"**/*.*\"",
"format:checkup": "prettier --list-different \"**/*.*\"",
"lint": "eslint \"**/*.{js,jsx,json,ts,tsx}\"",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"types": "tsc --noEmit --p tsconfig.json --jsx react",
"____ HOOKS _________________________________________________________": "",
"prepare": "lerna bootstrap --ignore-scripts && yon prepare:all",
"prepublishOnly": "yon checkup:all && yon build:all",
"prerelease": "yon clean:all",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon clean:all && yon run dev && yon run test:coverage && yon run build-storybook",
"dev:all": "yon dev && lerna exec yon dev",
"checkup:all": "yon checkup && lerna exec yon checkup",
"all:all": "yon all && lerna exec yon all",
"ci": "yon run checkup:all && yon run test:report && yon run build:all && yon run build-storybook"
"release:changelog": "standard-version --skip.commit --skip.tag --release-as ",
"release:tag": "standard-version --sign --skip.changelog --release-as ",
"test": "jest --coverage",
"test:clean": "rimraf coverage/",
"test:report": "jest --coverage --coverageReporters=text-lcov | coveralls",
"test:watch": "jest --coverage --watch",
"types": "tsc --noEmit --p tsconfig.json --jsx react"
},
"dependencies": {},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/dev-helpers/README.md
@@ -1,3 +1,5 @@
# React-Hibernate-Dev-Helpers

A set of helpers used to [React-Hibernate](../../)'s demos and tests. This is an internal package.
A set of helpers used to demonstrate [React Hibernate](https://github.com/spautz/react-hibernate).

![private](https://img.shields.io/badge/npm-private-red.svg)
24 changes: 12 additions & 12 deletions packages/dev-helpers/package.json
Expand Up @@ -27,7 +27,17 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"____ BASE COMMANDS _________________________________________________": "",
"____ LIFECYCLE HOOKS _______________________________________________": "",
"prepare": "yon build",
"prebuild": "yon clean",
"prerelease": "yon clean",
"prepublishOnly": "yon checkup && yon build",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"build": "microbundle build --jsx React.createElement",
"build:watch": "microbundle watch --jsx React.createElement",
"clean": "rimraf dist/ node_modules/.cache/ && yon test:clean",
Expand All @@ -37,17 +47,7 @@
"test": "echo \"@TODO: tests for dev-helpers\"",
"test:clean": "rimraf coverage-local/",
"test:watch": "echo \"@TODO: tests for dev-helpers\"",
"types": "tsc --noEmit --p tsconfig.json --jsx react",
"____ HOOKS _________________________________________________________": "",
"prepare": "yon build",
"prebuild": "yon clean",
"prerelease": "yon clean",
"prepublishOnly": "yon checkup && yon build",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build"
"types": "tsc --noEmit --p tsconfig.json --jsx react"
},
"dependencies": {
"@material-ui/core": "^4.9.4",
Expand Down
4 changes: 3 additions & 1 deletion packages/react-hibernate/README.md
Expand Up @@ -4,12 +4,14 @@

Restore previously-unmounted subtrees -- state and all -- on remount.

Part of [React Hibernate](https://github.com/spautz/react-hibernate)

[![npm version](https://img.shields.io/npm/v/react-hibernate.svg)](https://www.npmjs.com/package/react-hibernate)
[![gzip size](https://img.shields.io/bundlephobia/minzip/react-hibernate)](https://bundlephobia.com/result?p=react-hibernate@latest)

## Core Package

This package provides the main functionality for [React-Hibernate](../../).
This package provides the main functionality for [React Hibernate](https://github.com/spautz/react-hibernate).

## Roadmap

Expand Down
24 changes: 12 additions & 12 deletions packages/react-hibernate/package.json
Expand Up @@ -26,7 +26,17 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"____ BASE COMMANDS _________________________________________________": "",
"____ LIFECYCLE HOOKS _______________________________________________": "",
"prepare": "yon build",
"prebuild": "yon clean",
"prerelease": "yon clean",
"prepublishOnly": "yon checkup && yon build",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"build": "microbundle build --jsx React.createElement",
"build:watch": "microbundle watch --jsx React.createElement",
"clean": "rimraf dist/ node_modules/.cache/ && yon test:clean",
Expand All @@ -36,17 +46,7 @@
"test": "echo \"@TODO: tests for react-hibernate\"",
"test:clean": "rimraf coverage-local/",
"test:watch": "echo \"@TODO: tests for react-hibernate\"",
"types": "tsc --noEmit --p tsconfig.json --jsx react",
"____ HOOKS _________________________________________________________": "",
"prepare": "yon build",
"prebuild": "yon clean",
"prerelease": "yon clean",
"prepublishOnly": "yon checkup && yon build",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build"
"types": "tsc --noEmit --p tsconfig.json --jsx react"
},
"dependencies": {
"limited-cache": "^0.5.0",
Expand Down
13 changes: 7 additions & 6 deletions packages/react-pauseable-containers/README.md
Expand Up @@ -4,7 +4,7 @@

Prevent subtrees from rerendering when their parent changes, or when certain context values change.

Part of [React-Hibernate](../../)
Part of [React Hibernate](https://github.com/spautz/react-hibernate)

[![npm version](https://img.shields.io/npm/v/react-pauseable-containers.svg)](https://www.npmjs.com/package/react-pauseable-containers)
[![gzip size](https://img.shields.io/bundlephobia/minzip/react-pauseable-containers)](https://bundlephobia.com/result?p=react-pauseable-containers@latest)
Expand All @@ -29,10 +29,11 @@ This is essentially just a typescript-friendly version of [react-static-containe

Prevents subscribed components from rerendering when the redux state changes, or the return value from `useSelector`.

This currently causes an extra rerender when the `shouldUpdate` prop changes.

## How to use this

With [React-Hibernate](../../) or [React-Router-Hibernate](../react-router-hibernate/), passing one of these
components -- or a new component composed from several of them together -- can prevent hibernating subtrees from
updating.
With [React-Hibernate](../react-hibernate) or [React-Router-Hibernate](../react-router-hibernate/), using one of these
components -- or a new component composed from several of them together -- can prevent subtrees from updating while
they're hibernating, to avoid needless work.

These can also be used on their own to prevent updates in components that are still mounted, such as the background
screen behind a modal or dialog, or inactive tabs or panes when using a wizard, accordion, or tabs widget.
24 changes: 12 additions & 12 deletions packages/react-pauseable-containers/package.json
Expand Up @@ -26,7 +26,17 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"____ BASE COMMANDS _________________________________________________": "",
"____ LIFECYCLE HOOKS _______________________________________________": "",
"prepare": "yon run build",
"prebuild": "yon run clean",
"prerelease": "yon run clean",
"prepublishOnly": "yon run checkup && yon run build",
"pretest": "yon run test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"build": "microbundle build --jsx React.createElement",
"build:watch": "microbundle watch --jsx React.createElement",
"clean": "rimraf dist/ node_modules/.cache/ && yon run test:clean",
Expand All @@ -38,17 +48,7 @@
"test": "echo \"@TODO: tests for pauseable-containers\"",
"test:clean": "rimraf coverage-local/",
"test:watch": "echo \"@TODO: tests for pauseable-containers\"",
"types": "tsc --noEmit --p tsconfig.json --jsx react",
"____ HOOKS _________________________________________________________": "",
"prepare": "yon run build",
"prebuild": "yon run clean",
"prerelease": "yon run clean",
"prepublishOnly": "yon run checkup && yon run build",
"pretest": "yon run test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build"
"types": "tsc --noEmit --p tsconfig.json --jsx react"
},
"dependencies": {},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-hibernate/README.md
Expand Up @@ -4,7 +4,7 @@

A react-router Switch which can leave inactive routes mounted-but-inactive until you navigate back.

Part of [React-Hibernate](../../)
Part of [React Hibernate](https://github.com/spautz/react-hibernate)

[![npm version](https://img.shields.io/npm/v/react-router-hibernate.svg)](https://www.npmjs.com/package/react-router-hibernate)
[![gzip size](https://img.shields.io/bundlephobia/minzip/react-router-hibernate)](https://bundlephobia.com/result?p=react-router-hibernate@latest)
Expand Down
24 changes: 12 additions & 12 deletions packages/react-router-hibernate/package.json
Expand Up @@ -26,7 +26,17 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"____ BASE COMMANDS _________________________________________________": "",
"____ LIFECYCLE HOOKS _______________________________________________": "",
"prepare": "yon build",
"prebuild": "yon clean",
"prerelease": "yon clean",
"prepublishOnly": "yon checkup && yon build",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"build": "microbundle build --jsx React.createElement",
"build:watch": "microbundle watch --jsx React.createElement",
"clean": "rimraf dist/ node_modules/.cache/ && yon test:clean",
Expand All @@ -38,17 +48,7 @@
"test": "jest --coverage",
"test:clean": "rimraf coverage-local/",
"test:watch": "jest --coverage --watch",
"types": "tsc --noEmit --p tsconfig.json --jsx react",
"____ HOOKS _________________________________________________________": "",
"prepare": "yon build",
"prebuild": "yon clean",
"prerelease": "yon clean",
"prepublishOnly": "yon checkup && yon build",
"pretest": "yon test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build"
"types": "tsc --noEmit --p tsconfig.json --jsx react"
},
"dependencies": {
"limited-cache": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/redux-pauseable-store/README.md
Expand Up @@ -4,7 +4,7 @@

Derive one redux store from another, then pause it.

Part of [React Hibernate](../../)
Part of [React Hibernate](https://github.com/spautz/react-hibernate)

[![npm version](https://img.shields.io/npm/v/redux-pauseable-store.svg)](https://www.npmjs.com/package/redux-pauseable-store)
[![gzip size](https://img.shields.io/bundlephobia/minzip/redux-pauseable-store)](https://bundlephobia.com/result?p=redux-pauseable-store@latest)
Expand Down
24 changes: 12 additions & 12 deletions packages/redux-pauseable-store/package.json
Expand Up @@ -26,7 +26,17 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"____ BASE COMMANDS _________________________________________________": "",
"____ LIFECYCLE HOOKS _______________________________________________": "",
"prepare": "yon run build",
"prebuild": "yon run clean",
"prerelease": "yon run clean",
"prepublishOnly": "yon run checkup && yon run build",
"pretest": "yon run test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"build": "microbundle build --jsx React.createElement",
"build:watch": "microbundle watch --jsx React.createElement",
"clean": "rimraf dist/ node_modules/.cache/ && yon run test:clean",
Expand All @@ -38,17 +48,7 @@
"test": "jest --coverage",
"test:clean": "rimraf coverage-local/",
"test:watch": "jest --coverage --watch",
"types": "tsc --noEmit --p tsconfig.json --jsx react",
"____ HOOKS _________________________________________________________": "",
"prepare": "yon run build",
"prebuild": "yon run clean",
"prerelease": "yon run clean",
"prepublishOnly": "yon run checkup && yon run build",
"pretest": "yon run test:clean",
"____ INTEGRATION ___________________________________________________": "",
"dev": "yon run format && yon run types && yon run lint",
"checkup": "yon format:checkup && yon run types && yon run lint",
"all": "yon run dev && yon run test && yon run build"
"types": "tsc --noEmit --p tsconfig.json --jsx react"
},
"dependencies": {},
"devDependencies": {},
Expand Down

0 comments on commit 0f6f9b9

Please sign in to comment.