Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: made useful for users (non library maintener) #50

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/history-sync-json/.gitignore
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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",
koichik marked this conversation as resolved.
Show resolved Hide resolved
"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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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"
}
}