Skip to content

Commit

Permalink
build(examples): update all examples to use parcel instead of webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 7, 2018
1 parent b1ef187 commit 316ad6a
Show file tree
Hide file tree
Showing 144 changed files with 507 additions and 776 deletions.
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you want to [contribute](../CONTRIBUTING.md) an example, please get in touch
| 8 | [hdom-basics](./hdom-basics) | Hello world | hdom, hiccup | basic |
| 9 | [hdom-benchmark](./hdom-benchmark) | hdom rendering perf / stress test, FPS counter | hdom, rstream, transducers | intermediate |
| 10 | [hdom-theme-adr-0003](./hdom-theme-adr-0003) | hdom themed components proposal | hdom | intermediate |
| 11 | [hmr-basics](./hmr-basics) | hdom & webpack hot module replacement | hdom, memoize | basic |
| 11 | [hmr-basics](./hmr-basics) | hdom & hot module replacement | hdom, memoize | basic |
| 12 | [hydrate-basics](./hydrate-basics) | hiccup / hdom DOM hydration | hiccup, hdom | intermediate |
| 13 | [interceptor-basics](./interceptor-basics) | Event handling w/ interceptors and side effects | atom, hdom, interceptors | intermediate |
| 14 | [json-components](./json-components) | JSON->component transformation, live editor | hdom, transducers | intermediate |
Expand Down
2 changes: 2 additions & 0 deletions examples/async-effect/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
2 changes: 1 addition & 1 deletion examples/async-effect/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h1>async side effect handling</h1>
<a href="https://github.com/thi-ng/umbrella/blob/master/examples/async-effect/src/index.ts">Source</a>
</p>
<div id="app"></div>
<script type="text/javascript" src="bundle.js"></script>
<script type="text/javascript" src="src/index.ts"></script>
</body>

</html>
19 changes: 12 additions & 7 deletions examples/async-effect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@
"author": "Karsten Schmidt <k+npm@thi.ng>",
"license": "Apache-2.0",
"scripts": {
"build": "webpack --mode production --display-reasons --display-modules",
"start": "webpack-dev-server --open --mode development --devtool inline-source-map"
"prepare": "mkdir -p out && cp foo.json out",
"build": "yarn prepare && parcel build index.html -d out --no-source-maps --no-cache --detailed-report",
"start": "yarn prepare && parcel index.html -p 8080 --open -d out"
},
"devDependencies": {
"ts-loader": "^4.4.2",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
"parcel-bundler": "^1.9.7",
"terser": "^3.8.2",
"typescript": "^3.0.1"
},
"dependencies": {
"@thi.ng/api": "latest",
"@thi.ng/atom": "latest",
"@thi.ng/hdom": "latest",
"@thi.ng/interceptors": "latest"
},
"browserslist": [
"last 3 Chrome versions"
],
"browser": {
"process": false
}
}
4 changes: 2 additions & 2 deletions examples/async-effect/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "build",
"sourceMap": true
"outDir": ".",
"target": "es6"
},
"include": [
"./src/**/*.ts"
Expand Down
18 changes: 0 additions & 18 deletions examples/async-effect/webpack.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions examples/canvas-dial/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
2 changes: 1 addition & 1 deletion examples/canvas-dial/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<body>
<div id="app"></div>
<script type="text/javascript" src="bundle.js"></script>
<script type="text/javascript" src="src/index.ts"></script>
</body>

</html>
18 changes: 11 additions & 7 deletions examples/canvas-dial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
"author": "Karsten Schmidt <k+npm@thi.ng>",
"license": "Apache-2.0",
"scripts": {
"build": "webpack --mode production --display-reasons --display-modules",
"start": "webpack-dev-server --open --mode development --devtool inline-source-map"
"build": "parcel build index.html -d out --no-source-maps --no-cache --detailed-report",
"start": "parcel index.html -p 8080 --open"
},
"devDependencies": {
"ts-loader": "^4.4.2",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
"parcel-bundler": "^1.9.7",
"terser": "^3.8.2",
"typescript": "^3.0.1"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand All @@ -24,5 +22,11 @@
"@thi.ng/rstream-gestures": "latest",
"@thi.ng/strings": "latest",
"@thi.ng/transducers": "latest"
},
"browserslist": [
"last 3 Chrome versions"
],
"browser": {
"process": false
}
}
5 changes: 3 additions & 2 deletions examples/canvas-dial/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "."
"outDir": ".",
"target": "es6"
},
"include": [
"./src/**/*.ts"
]
}
}
18 changes: 0 additions & 18 deletions examples/canvas-dial/webpack.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions examples/cellular-automata/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
2 changes: 1 addition & 1 deletion examples/cellular-automata/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<a href="https://github.com/thi-ng/umbrella/tree/master/packages/transducers">@thi.ng/transducers</a> and
<a href="https://github.com/thi-ng/umbrella/tree/master/packages/hdom">@thi.ng/hdom</a>.
</footer>
<script type="text/javascript" src="bundle.js"></script>
<script type="text/javascript" src="src/index.ts"></script>
</body>

</html>
18 changes: 11 additions & 7 deletions examples/cellular-automata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@
"author": "Karsten Schmidt <k+npm@thi.ng>",
"license": "Apache-2.0",
"scripts": {
"build": "webpack --mode production --display-reasons --display-modules",
"start": "webpack-dev-server --open --mode development --devtool inline-source-map"
"build": "parcel build index.html -d out --no-source-maps --no-cache --detailed-report",
"start": "parcel index.html -p 8080 --open"
},
"devDependencies": {
"ts-loader": "^4.4.2",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
"parcel-bundler": "^1.9.7",
"terser": "^3.8.2",
"typescript": "^3.0.1"
},
"dependencies": {
"@thi.ng/api": "latest",
"@thi.ng/hdom": "latest",
"@thi.ng/hdom-components": "latest",
"@thi.ng/transducers": "latest"
},
"browserslist": [
"last 3 Chrome versions"
],
"browser": {
"process": false
}
}
4 changes: 2 additions & 2 deletions examples/cellular-automata/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "build",
"sourceMap": true
"outDir": ".",
"target": "es6"
},
"include": [
"./src/**/*.ts"
Expand Down
18 changes: 0 additions & 18 deletions examples/cellular-automata/webpack.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions examples/commit-table-ssr/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
20 changes: 12 additions & 8 deletions examples/commit-table-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
"license": "Apache-2.0",
"scripts": {
"build-static": "tsc && node build/server/static.js",
"build-client": "webpack --mode production --display-reasons --display-modules",
"dev": "tsc && node build/server/index.js",
"dev-client": "yarn build-client && yarn dev"
"build": "parcel build index.html -d out --no-source-maps --no-cache --detailed-report",
"start-server": "tsc && node build/server/index.js",
"start": "yarn build-client && yarn start-server"
},
"devDependencies": {
"ts-loader": "^4.4.2",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
"parcel-bundler": "^1.9.7",
"terser": "^3.8.2",
"typescript": "^3.0.1"
},
"dependencies": {
"express": "^4.16.3",
Expand All @@ -27,5 +25,11 @@
"@thi.ng/transducers": "latest",
"@thi.ng/transducers-hdom": "latest",
"@types/express": "^4.16.0"
},
"browserslist": [
"last 3 Chrome versions"
],
"browser": {
"process": false
}
}
3 changes: 2 additions & 1 deletion examples/commit-table-ssr/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "build"
"outDir": "build",
"target": "es6"
},
"include": [
"./src/**/*.ts"
Expand Down
2 changes: 2 additions & 0 deletions examples/crypto-chart/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
2 changes: 1 addition & 1 deletion examples/crypto-chart/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<body>
<div id="app"></div>
<script type="text/javascript" src="bundle.js"></script>
<script type="text/javascript" src="src/index.ts"></script>
</body>

</html>
18 changes: 11 additions & 7 deletions examples/crypto-chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
"author": "Karsten Schmidt <k+npm@thi.ng>",
"license": "Apache-2.0",
"scripts": {
"build": "webpack --mode production --display-reasons --display-modules",
"start": "webpack-dev-server --open --mode development --devtool inline-source-map"
"build": "parcel build index.html -d out --no-source-maps --no-cache --detailed-report",
"start": "parcel index.html -p 8080 --open"
},
"devDependencies": {
"ts-loader": "^4.4.2",
"typescript": "^3.0.1",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
"parcel-bundler": "^1.9.7",
"terser": "^3.8.2",
"typescript": "^3.0.1"
},
"dependencies": {
"@thi.ng/api": "latest",
Expand All @@ -25,5 +23,11 @@
"@thi.ng/strings": "latest",
"@thi.ng/transducers": "latest",
"@thi.ng/transducers-stats": "latest"
},
"browserslist": [
"last 3 Chrome versions"
],
"browser": {
"process": false
}
}
5 changes: 3 additions & 2 deletions examples/crypto-chart/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "."
"outDir": ".",
"target": "es6"
},
"include": [
"./src/**/*.ts"
]
}
}
18 changes: 0 additions & 18 deletions examples/crypto-chart/webpack.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions examples/dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.cache
out
node_modules
yarn.lock
*.js
Loading

0 comments on commit 316ad6a

Please sign in to comment.