Skip to content

Commit

Permalink
examples: made useful for users (non library maintener)
Browse files Browse the repository at this point in the history
  • Loading branch information
koichik committed Jul 16, 2022
1 parent 9a2a8ac commit aaba17a
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 3,560 deletions.
3 changes: 3 additions & 0 deletions examples/history-sync-json/.gitignore
Expand Up @@ -33,3 +33,6 @@ yarn-error.log*

# typescript
*.tsbuildinfo

# yarn
yarn.lock
5 changes: 0 additions & 5 deletions examples/history-sync-json/README.md
Expand Up @@ -3,11 +3,6 @@
Example of `RecoilHistorySyncJSONNext`.

```bash
# build library on ../.. (i.e. recoil-sync-next root directory)
yarn inst
yarn build

# run example application
cd examples/history-sync-json
yarn dev
```
4 changes: 4 additions & 0 deletions examples/history-sync-json/package-copy.sh
Expand Up @@ -4,12 +4,16 @@ echo "[recoil-sync-next] copy to current directory..."

CURRENT=`pwd`
cd ../../
yarn clean-build
yarn pack --filename recoil-sync-next-local.tgz

cd $CURRENT/node_modules
rm -Rf recoil-sync-next/
tar zxf ../../../recoil-sync-next-local.tgz
mv package/ recoil-sync-next/

cd ..
rm -Rf .next/

echo "[recoil-sync-next] copy success!"
exit $?
30 changes: 16 additions & 14 deletions examples/history-sync-json/package.json
Expand Up @@ -4,29 +4,31 @@
"private": true,
"scripts": {
"inst": "yarn install",
"predev": "./package-copy.sh",
"dev": "next dev",
"prebuild": "./package-copy.sh",
"build": "next build",
"start": "next start",
"lint:eslint": "next lint",
"lint:tsc": "tsc --noEmit -p tsconfig.json",
"lint-fix:eslint": "next lint --fix",
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write"
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
},
"dependencies": {
"next": "12.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"recoil": "0.7.4",
"recoil-sync": "0.1.0"
"next": "^12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"recoil": "^0.7.4",
"recoil-sync": "^0.1.0",
"recoil-sync-next": "latest"
},
"devDependencies": {
"@types/node": "18.0.3",
"@types/react": "18.0.15",
"@types/react-dom": "18.0.6",
"eslint": "8.19.0",
"eslint-config-next": "12.2.2",
"typescript": "4.7.4"
"@types/node": "^18.0.3",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"typescript": "^4.7.4"
}
}
1,761 changes: 0 additions & 1,761 deletions examples/history-sync-json/yarn.lock

This file was deleted.

3 changes: 3 additions & 0 deletions examples/url-sync-json/.gitignore
Expand Up @@ -33,3 +33,6 @@ yarn-error.log*

# typescript
*.tsbuildinfo

# yarn
yarn.lock
5 changes: 0 additions & 5 deletions examples/url-sync-json/README.md
Expand Up @@ -3,11 +3,6 @@
Example of `RecoilURLSyncJSONNext`.

```bash
# build library on ../.. (i.e. recoil-sync-next root directory)
yarn inst
yarn build

# run example application
cd examples/url-sync-json
yarn dev
```
4 changes: 4 additions & 0 deletions examples/url-sync-json/package-copy.sh
Expand Up @@ -4,12 +4,16 @@ echo "[recoil-sync-next] copy to current directory..."

CURRENT=`pwd`
cd ../../
yarn clean-build
yarn pack --filename recoil-sync-next-local.tgz

cd $CURRENT/node_modules
rm -Rf recoil-sync-next/
tar zxf ../../../recoil-sync-next-local.tgz
mv package/ recoil-sync-next/

cd ..
rm -Rf .next/

echo "[recoil-sync-next] copy success!"
exit $?
30 changes: 16 additions & 14 deletions examples/url-sync-json/package.json
Expand Up @@ -4,29 +4,31 @@
"private": true,
"scripts": {
"inst": "yarn install",
"predev": "./package-copy.sh",
"dev": "next dev",
"prebuild": "./package-copy.sh",
"build": "next build",
"start": "next start",
"lint:eslint": "next lint",
"lint:tsc": "tsc --noEmit -p tsconfig.json",
"lint-fix:eslint": "next lint --fix",
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write"
"lint-fix:prettier": "prettier \"{pages,src,styles}/**/*.{ts,tsx,css}\" --write",
"local-build": "yarn run local-copy && yarn run build",
"local-dev": "yarn run local-copy && yarn run dev",
"local-copy": "./package-copy.sh"
},
"dependencies": {
"next": "12.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"recoil": "0.7.4",
"recoil-sync": "0.1.0"
"next": "^12.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"recoil": "^0.7.4",
"recoil-sync": "^0.1.0",
"recoil-sync-next": "latest"
},
"devDependencies": {
"@types/node": "18.0.3",
"@types/react": "18.0.15",
"@types/react-dom": "18.0.6",
"eslint": "8.19.0",
"eslint-config-next": "12.2.2",
"typescript": "4.7.4"
"@types/node": "^18.0.3",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"eslint": "^8.19.0",
"eslint-config-next": "^12.2.2",
"typescript": "^4.7.4"
}
}

0 comments on commit aaba17a

Please sign in to comment.