Skip to content
This repository was archived by the owner on Apr 6, 2025. It is now read-only.

Commit 2fa325d

Browse files
committed
Chore: Parcel added
Removed Rollup because it requires configuration and usage of multiple plugins (resolver, commonjs)
1 parent 215cb52 commit 2fa325d

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ coverage
1515

1616
# Dist
1717
*.gz
18+
.cache
1819
dist/

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,38 @@
2121
],
2222
"scripts": {
2323
"test": "jest --coverage --no-cache&& tsc -p test/ts",
24-
"build": "npm run bundle && npm run minify",
25-
"bundle": "rollup -i src/index.js -o dist/router.js -f umd -mn hyperappRouter -g hyperapp:hyperapp",
26-
"minify": "uglifyjs dist/router.js -o dist/router.js -mc pure_funcs=['Object.defineProperty'] --source-map includeSources,url=router.js.map",
24+
"build": "parcel build ./src/index.js --out-dir dist --out-file router.js --global hyperappRouter --no-autoinstall",
2725
"prepublish": "npm run build",
26+
"prepare": "npm run build",
2827
"format": "prettier --semi false --write '{src,test}/**/*.js'",
2928
"release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
3029
},
3130
"babel": {
3231
"presets": [
33-
"env"
34-
],
35-
"plugins": [
3632
[
37-
"transform-react-jsx",
33+
"@babel/preset-env",
3834
{
39-
"pragma": "h"
35+
"forceAllTransforms": true
4036
}
4137
]
38+
],
39+
"plugins": [
40+
"@babel/plugin-transform-runtime"
4241
]
4342
},
4443
"jest": {
4544
"testURL": "http://localhost"
4645
},
4746
"devDependencies": {
47+
"@babel/core": "^7.2.2",
48+
"@babel/plugin-transform-runtime": "^7.2.0",
49+
"@babel/preset-env": "^7.2.3",
4850
"babel-jest": "^22.4.3",
49-
"babel-plugin-transform-react-jsx": "^6.24.1",
50-
"babel-preset-env": "^1.6.1",
51-
"hyperapp": "^2.0.0",
51+
"hyperapp": "github:jorgebucaran/hyperapp#V2",
5252
"jest": "^22.4.3",
53+
"parcel-bundler": "^1.11.0",
5354
"path-to-regexp": "^2.4.0",
5455
"prettier": "^1.11.1",
55-
"rollup": "^0.57.1",
56-
"uglify-js": "^3.3.16",
5756
"typescript": "2.8.1"
5857
},
5958
"peerDependencies": {

src/Route.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const Route = (context, child) => {
2626
context,
2727
path,
2828
url
29-
}}, (props, ...args) => Route.call(this, {
29+
}}, (props, ...args) => Route.call(undefined, {
3030
...context, ...props,
3131
render: props.render || undefined,
3232
path: path + (props.path || ''),

0 commit comments

Comments
 (0)