Skip to content

Commit

Permalink
Use Parcel 2 for the example page (#295)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Andarist authored Nov 21, 2020
1 parent 613c59d commit 5ff8ed7
Show file tree
Hide file tree
Showing 4 changed files with 3,038 additions and 3,465 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ example/.nojekyll
dist
node_modules
.cache
.parcel-cache
7 changes: 7 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"private": true,
"scripts": {
"dev": "parcel ./index.html --open",
"build": "parcel build ./index.html --dist-dir ./dist --public-url ."
}
}
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@
"./dist/react-textarea-autosize.esm.js": "./dist/react-textarea-autosize.browser.esm.js"
},
"sideEffects": false,
"files": ["dist"],
"files": [
"dist"
],
"author": "Andrey Popp <8mayday@gmail.com> (httsps://andreypopp.com/)",
"contributors": [
"Mateusz Burzyński <mateuszburzynski@gmail.com> (https://github.com/Andarist)"
],
"scripts": {
"prebuild": "npm run clean",
"build": "preconstruct build",
"docs:dev": "parcel example/index.html --out-dir example/dist --open",
"docs:build": "parcel build example/index.html --out-dir example/dist",
"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",
"docs:dev": "npm run dev --prefix example",
"docs:build": "npm run build --prefix example",
"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",
"clean": "rimraf dist",
"lint": "eslint --ext .js,.ts,.tsx src",
"prepare": "npm run build",
Expand All @@ -50,18 +52,19 @@
"use-latest": "^1.0.0"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
"@babel/plugin-transform-runtime": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@babel/preset-react": "^7.10.1",
"@babel/preset-typescript": "^7.10.1",
"@babel/core": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@changesets/changelog-github": "^0.2.6",
"@changesets/cli": "^2.8.0",
"@preconstruct/cli": "^1.1.14",
"@testing-library/jest-dom": "^5.9.0",
"@testing-library/react": "^10.1.0",
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^3.1.0",
"@typescript-eslint/parser": "^3.1.0",
"babel-eslint": "11.0.0-beta.2",
Expand All @@ -74,7 +77,7 @@
"husky": "^4.2.5",
"jest": "^26.0.1",
"lint-staged": "^10.2.8",
"parcel-bundler": "^1.12.4",
"parcel": "2.0.0-nightly.454",
"prettier": "^2.0.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
Expand Down
Loading

0 comments on commit 5ff8ed7

Please sign in to comment.