Skip to content

Commit

Permalink
build(examples): add build:webpack script aliases & config
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 16, 2020
1 parent 312fa4a commit 5ebe268
Show file tree
Hide file tree
Showing 33 changed files with 432 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/bitmap-font/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --public-url ./ --no-source-maps --no-cache --detailed-report --experimental-scope-hoisting",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/bitmap-font/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
1 change: 1 addition & 0 deletions examples/canvas-dial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/canvas-dial/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
5 changes: 3 additions & 2 deletions examples/commit-table-ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"prep": "yarn clean && mkdir -p out && cp commits.json out",
"build-static": "tsc && node build/server/static.js",
"build": "yarn prep && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "tsc && node build/server/index.js"
},
"devDependencies": {
Expand All @@ -18,7 +19,7 @@
"typescript": "^3.9.7"
},
"dependencies": {
"express": "^4.16.3",
"express": "^4.17.1",
"@thi.ng/api": "latest",
"@thi.ng/associative": "latest",
"@thi.ng/cache": "latest",
Expand All @@ -27,7 +28,7 @@
"@thi.ng/rstream": "latest",
"@thi.ng/transducers": "latest",
"@thi.ng/transducers-hdom": "latest",
"@types/express": "^4.16.0"
"@types/express": "^4.17.7"
},
"browserslist": [
"last 3 Chrome versions"
Expand Down
23 changes: 23 additions & 0 deletions examples/commit-table-ssr/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/client/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out",
},
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" },
},
{ test: /\.ts$/, use: "ts-loader" },
],
},
node: {
process: false,
},
};
1 change: 1 addition & 0 deletions examples/gesture-analysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/gesture-analysis/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
23 changes: 23 additions & 0 deletions examples/hdom-canvas-particles/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
1 change: 1 addition & 0 deletions examples/hdom-dropdown-fuzzy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/hdom-dropdown-fuzzy/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
1 change: 1 addition & 0 deletions examples/hdom-dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/hdom-dropdown/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
23 changes: 23 additions & 0 deletions examples/hdom-vscroller/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
1 change: 1 addition & 0 deletions examples/hmr-basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/hmr-basics/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
3 changes: 2 additions & 1 deletion examples/mandelbrot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && yarn build:worker && parcel build index.html -d out --public-url ./ --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report",
"build:worker": "parcel build src/worker.ts -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --experimental-scope-hoisting",
"build:worker": "../../node_modules/.bin/webpack --config webpack.worker.js --mode production",
"build:webpack": "yarn build:worker && ../../node_modules/.bin/webpack --mode production",
"start": "yarn build:worker && parcel index.html -d out -p 8080 --open"
},
"devDependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/mandelbrot/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
23 changes: 23 additions & 0 deletions examples/mandelbrot/webpack.worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/worker.ts",
output: {
filename: "worker.js",
path: __dirname + "/out",
},
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" },
},
{ test: /\.ts$/, use: "ts-loader" },
],
},
node: {
process: false,
},
};
1 change: 1 addition & 0 deletions examples/router-basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"clean": "rm -rf .cache build out",
"prep": "yarn clean && mkdir -p out && cp -R assets out",
"build": "yarn prep && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "yarn prep && parcel index.html -p 8080 --open -d out"
},
"dependencies": {
Expand Down
23 changes: 23 additions & 0 deletions examples/router-basics/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
entry: "./src/index.ts",
output: {
filename: "bundle.[hash].js",
path: __dirname + "/out"
},
resolve: {
extensions: [".ts", ".js"]
},
module: {
rules: [
{
test: /\.(png|jpg|gif)$/,
loader: "file-loader",
options: { name: "[path][hash].[ext]" }
},
{ test: /\.ts$/, use: "ts-loader" }
]
},
node: {
process: false
}
};
1 change: 1 addition & 0 deletions examples/rstream-dataflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"clean": "rm -rf .cache build out",
"build": "yarn clean && parcel build index.html -d out --no-source-maps --no-cache --experimental-scope-hoisting --detailed-report --public-url ./",
"build:webpack": "../../node_modules/.bin/webpack --mode production",
"start": "parcel index.html -p 8080 --open --no-cache"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 5ebe268

Please sign in to comment.