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

Commit c8f75ce

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

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

.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: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,41 @@
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",
2826
"format": "prettier --semi false --write '{src,test}/**/*.js'",
2927
"release": "npm run build && npm test && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
3028
},
3129
"babel": {
3230
"presets": [
33-
"env"
34-
],
35-
"plugins": [
3631
[
37-
"transform-react-jsx",
32+
"@babel/preset-env",
3833
{
39-
"pragma": "h"
34+
"forceAllTransforms": true
4035
}
4136
]
37+
],
38+
"plugins": [
39+
"@babel/plugin-transform-runtime"
4240
]
4341
},
4442
"jest": {
4543
"testURL": "http://localhost"
4644
},
4745
"devDependencies": {
46+
"@babel/core": "^7.2.2",
47+
"@babel/plugin-transform-runtime": "^7.2.0",
48+
"@babel/preset-env": "^7.2.3",
4849
"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",
50+
"hyperapp": "github:jorgebucaran/hyperapp#V2",
5251
"jest": "^22.4.3",
53-
"path-to-regexp": "^2.4.0",
52+
"parcel-bundler": "^1.11.0",
5453
"prettier": "^1.11.1",
55-
"rollup": "^0.57.1",
56-
"uglify-js": "^3.3.16",
5754
"typescript": "2.8.1"
5855
},
56+
"dependencies": {
57+
"path-to-regexp": "^2.4.0"
58+
},
5959
"peerDependencies": {
6060
"hyperapp": "2.0.0"
6161
}

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)