Skip to content

Commit da28cd5

Browse files
authored
Merge pull request #470 from pmndrs/dev
Version 6.30.2
2 parents f8ed906 + 30e36e8 commit da28cd5

File tree

15 files changed

+1032
-896
lines changed

15 files changed

+1032
-896
lines changed

esbuild.mjs

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { createRequire } from "module";
22
import { glsl } from "esbuild-plugin-glsl";
3-
import tsPaths from "esbuild-ts-paths";
43
import glob from "tiny-glob";
54
import esbuild from "esbuild";
65

76
const require = createRequire(import.meta.url);
87
const pkg = require("./package");
98

109
const minify = process.argv.includes("-m");
11-
const watch = process.argv.includes("-w");
12-
const plugins = [glsl({ minify }), tsPaths()];
10+
const plugins = [glsl({ minify })];
1311
const external = ["three", "spatial-controls", "tweakpane"];
1412

1513
const date = new Date();
@@ -20,42 +18,29 @@ const banner = `/**
2018
* @license ${pkg.license}
2119
*/`;
2220

23-
await esbuild.build({
21+
const workers = {
2422
entryPoints: await glob("src/**/worker.js"),
2523
outExtension: { ".js": ".txt" },
2624
outdir: "tmp",
2725
target: "es6",
2826
logLevel: "info",
2927
format: "iife",
3028
bundle: true,
31-
minify,
32-
watch
33-
}).catch(() => process.exit(1));
29+
minify
30+
};
3431

35-
await esbuild.build({
32+
const demo = {
3633
entryPoints: ["demo/src/index.js"],
3734
outdir: "public/demo",
3835
target: "es6",
3936
logLevel: "info",
4037
format: "iife",
4138
bundle: true,
4239
plugins,
43-
minify,
44-
watch
45-
}).catch(() => process.exit(1));
46-
47-
await esbuild.build({
48-
entryPoints: ["manual/assets/js/libs/vendor.js"],
49-
outdir: "manual/assets/js/dist/libs",
50-
globalName: "VENDOR",
51-
target: "es6",
52-
logLevel: "info",
53-
format: "iife",
54-
bundle: true,
5540
minify
56-
}).catch(() => process.exit(1));
41+
};
5742

58-
await esbuild.build({
43+
const manual = {
5944
entryPoints: ["manual/assets/js/src/index.js"]
6045
.concat(await glob("manual/assets/js/src/demos/*.js")),
6146
outdir: "manual/assets/js/dist",
@@ -65,9 +50,36 @@ await esbuild.build({
6550
bundle: true,
6651
external,
6752
plugins,
68-
minify,
69-
watch
70-
}).catch(() => process.exit(1));
53+
minify
54+
};
55+
56+
await esbuild.build({
57+
entryPoints: ["manual/assets/js/libs/vendor.js"],
58+
outdir: "manual/assets/js/dist/libs",
59+
globalName: "VENDOR",
60+
target: "es6",
61+
logLevel: "info",
62+
format: "iife",
63+
bundle: true,
64+
minify
65+
});
66+
67+
if(process.argv.includes("-w")) {
68+
69+
const ctxWorkers = await esbuild.context(workers);
70+
const ctxDemo = await esbuild.context(demo);
71+
const ctxManual = await esbuild.context(manual);
72+
await ctxWorkers.watch();
73+
await ctxDemo.watch();
74+
await ctxManual.watch();
75+
76+
} else {
77+
78+
await esbuild.build(workers);
79+
await esbuild.build(demo);
80+
await esbuild.build(manual);
81+
82+
}
7183

7284
await esbuild.build({
7385
entryPoints: ["src/index.js"],
@@ -79,7 +91,7 @@ await esbuild.build({
7991
bundle: true,
8092
external,
8193
plugins
82-
}).catch(() => process.exit(1));
94+
});
8395

8496
await esbuild.build({
8597
entryPoints: ["src/index.js"],
@@ -91,11 +103,11 @@ await esbuild.build({
91103
bundle: true,
92104
external,
93105
plugins
94-
}).catch(() => process.exit(1));
106+
});
95107

96108
// @todo Remove in next major release.
97109
const globalName = pkg.name.replace(/-/g, "").toUpperCase();
98-
const requireShim = `if(typeof window==="object"&&!window.require)window.require=()=>window.THREE;`;
110+
const requireShim = "if(typeof window===\"object\"&&!window.require)window.require=()=>window.THREE;";
99111
const footer = `if(typeof module==="object"&&module.exports)module.exports=${globalName};`;
100112

101113
await esbuild.build({
@@ -110,7 +122,7 @@ await esbuild.build({
110122
globalName,
111123
external,
112124
plugins
113-
}).catch(() => process.exit(1));
125+
});
114126

115127
await esbuild.build({
116128
entryPoints: ["src/index.js"],
@@ -125,4 +137,4 @@ await esbuild.build({
125137
external,
126138
plugins,
127139
minify
128-
}).catch(() => process.exit(1));
140+
});

manual/.stylelintrc.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,18 @@
99
"scss/operator-no-newline-after": null,
1010
"order/properties-alphabetical-order": true,
1111
"color-function-notation": null,
12-
"color-hex-case": "upper",
1312
"color-hex-length": null,
1413
"color-named": null,
1514
"declaration-empty-line-before": null,
16-
"function-parentheses-space-inside": null,
17-
"indentation": "tab",
18-
"max-line-length": 120,
1915
"max-nesting-depth": null,
2016
"no-descending-specificity": null,
2117
"no-empty-source": null,
2218
"no-invalid-position-at-import-rule": null,
23-
"number-no-trailing-zeros": null,
2419
"rule-empty-line-before": null,
2520
"selector-class-pattern": null,
26-
"selector-list-comma-newline-after": null,
2721
"selector-max-compound-selectors": null,
2822
"selector-max-id": null,
2923
"selector-no-qualifying-type": null,
30-
"shorthand-property-no-redundant-values": null,
31-
"string-quotes": "double"
24+
"shorthand-property-no-redundant-values": null
3225
}
3326
}

manual/assets/css/src/screen/default/layout/_progress.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22

33
.progress {
44
align-items: center;
5-
bottom: 0;
65
display: flex;
76
flex-direction: column;
7+
inset: 0 0 0 0;
88
justify-content: center;
9-
left: 0;
109
pointer-events: none;
1110
position: absolute;
12-
right: 0;
13-
top: 0;
1411
user-select: none;
1512
z-index: layers.$foreground;
1613
}

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"name": "postprocessing",
3-
"version": "6.30.1",
3+
"version": "6.30.2",
44
"description": "A post processing library that provides the means to implement image filter effects for three.js.",
55
"homepage": "https://github.com/pmndrs/postprocessing",
6+
"sideEffects": false,
7+
"license": "Zlib",
68
"main": "build/postprocessing.js",
79
"module": "build/postprocessing.esm.js",
10+
"types": "types/postprocessing.d.ts",
811
"exports": {
912
".": {
13+
"types": "./types/postprocessing.d.ts",
1014
"import": "./build/postprocessing.esm.js",
11-
"require": "./build/postprocessing.js",
12-
"types": "./types/postprocessing.d.ts"
15+
"require": "./build/postprocessing.js"
1316
},
1417
"./module": {
15-
"import": "./build/postprocessing.mjs",
16-
"types": "./types/postprocessing.d.ts"
18+
"types": "./types/postprocessing.d.ts",
19+
"import": "./build/postprocessing.mjs"
1720
}
1821
},
19-
"types": "types/postprocessing.d.ts",
20-
"sideEffects": false,
21-
"license": "Zlib",
2222
"keywords": [
2323
"rendering",
2424
"image",
@@ -86,7 +86,7 @@
8686
"extends": "aether"
8787
},
8888
"peerDependencies": {
89-
"three": ">= 0.138.0 < 0.151.0"
89+
"three": ">= 0.138.0 < 0.152.0"
9090
},
9191
"devDependencies": {
9292
"@tweakpane/core": "1.x.x",
@@ -99,9 +99,8 @@
9999
"cssnano": "5.x.x",
100100
"dat.gui": "0.x.x",
101101
"del-cli": "5.x.x",
102-
"esbuild": "0.16.x",
102+
"esbuild": "0.17.x",
103103
"esbuild-plugin-glsl": "1.x.x",
104-
"esbuild-ts-paths": "1.x.x",
105104
"esdoc": "1.x.x",
106105
"esdoc-importpath-plugin": "1.x.x",
107106
"esdoc-standard-plugin": "1.x.x",

0 commit comments

Comments
 (0)