Skip to content

Commit 5ff8ed7

Browse files
authored
Use Parcel 2 for the example page (Andarist#295)
* Migrate to Parcel 2 * Tweak docs:build script * Attempt to use parcel@2.0.0-nightly.454 * Move docs-related scripts to the example dir
1 parent 613c59d commit 5ff8ed7

File tree

4 files changed

+3038
-3465
lines changed

4 files changed

+3038
-3465
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ example/.nojekyll
55
dist
66
node_modules
77
.cache
8+
.parcel-cache

example/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"dev": "parcel ./index.html --open",
5+
"build": "parcel build ./index.html --dist-dir ./dist --public-url ."
6+
}
7+
}

package.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@
2121
"./dist/react-textarea-autosize.esm.js": "./dist/react-textarea-autosize.browser.esm.js"
2222
},
2323
"sideEffects": false,
24-
"files": ["dist"],
24+
"files": [
25+
"dist"
26+
],
2527
"author": "Andrey Popp <8mayday@gmail.com> (httsps://andreypopp.com/)",
2628
"contributors": [
2729
"Mateusz Burzyński <mateuszburzynski@gmail.com> (https://github.com/Andarist)"
2830
],
2931
"scripts": {
3032
"prebuild": "npm run clean",
3133
"build": "preconstruct build",
32-
"docs:dev": "parcel example/index.html --out-dir example/dist --open",
33-
"docs:build": "parcel build example/index.html --out-dir example/dist",
34-
"docs:publish": "npm run docs:build && cd example/dist && git init && git commit --allow-empty -m 'update docs' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update docs' && git push git@github.com:Andarist/react-textarea-autosize gh-pages --force",
34+
"docs:dev": "npm run dev --prefix example",
35+
"docs:build": "npm run build --prefix example",
36+
"docs:publish": "npm run docs:build && cd ./example/dist && git init && git commit --allow-empty -m 'update docs' && git checkout -b gh-pages && touch .nojekyll && git add . && git commit -am 'update docs' && git push git@github.com:Andarist/react-textarea-autosize gh-pages --force",
3537
"clean": "rimraf dist",
3638
"lint": "eslint --ext .js,.ts,.tsx src",
3739
"prepare": "npm run build",
@@ -50,18 +52,19 @@
5052
"use-latest": "^1.0.0"
5153
},
5254
"devDependencies": {
53-
"@babel/core": "^7.10.2",
54-
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
55-
"@babel/plugin-transform-runtime": "^7.10.1",
56-
"@babel/preset-env": "^7.10.2",
57-
"@babel/preset-react": "^7.10.1",
58-
"@babel/preset-typescript": "^7.10.1",
55+
"@babel/core": "^7.10.4",
56+
"@babel/plugin-proposal-object-rest-spread": "^7.10.4",
57+
"@babel/plugin-transform-runtime": "^7.10.4",
58+
"@babel/preset-env": "^7.10.4",
59+
"@babel/preset-react": "^7.10.4",
60+
"@babel/preset-typescript": "^7.10.4",
5961
"@changesets/changelog-github": "^0.2.6",
6062
"@changesets/cli": "^2.8.0",
6163
"@preconstruct/cli": "^1.1.14",
6264
"@testing-library/jest-dom": "^5.9.0",
6365
"@testing-library/react": "^10.1.0",
6466
"@types/react": "^16.9.35",
67+
"@types/react-dom": "^16.9.8",
6568
"@typescript-eslint/eslint-plugin": "^3.1.0",
6669
"@typescript-eslint/parser": "^3.1.0",
6770
"babel-eslint": "11.0.0-beta.2",
@@ -74,7 +77,7 @@
7477
"husky": "^4.2.5",
7578
"jest": "^26.0.1",
7679
"lint-staged": "^10.2.8",
77-
"parcel-bundler": "^1.12.4",
80+
"parcel": "2.0.0-nightly.454",
7881
"prettier": "^2.0.5",
7982
"react": "^16.13.1",
8083
"react-dom": "^16.13.1",

0 commit comments

Comments
 (0)