Skip to content

Commit

Permalink
Merge pull request #502 from pmndrs/dev
Browse files Browse the repository at this point in the history
Version 6.32.0
  • Loading branch information
vanruesc authored Jun 17, 2023
2 parents a368e9d + 99cda7c commit e3370c5
Show file tree
Hide file tree
Showing 122 changed files with 471 additions and 507 deletions.
45 changes: 23 additions & 22 deletions esbuild.mjs → esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ const banner = `/**
*/`;

const workers = {
entryPoints: await glob("src/**/worker.js"),
entryPoints: await glob("./src/**/worker.js"),
outExtension: { ".js": ".txt" },
outdir: "tmp",
target: "es6",
outdir: "./tmp",
target: "es2019",
logLevel: "info",
format: "iife",
bundle: true,
minify
};

const demo = {
entryPoints: ["demo/src/index.js"],
outdir: "public/demo",
entryPoints: ["./demo/src/index.js"],
outdir: "./public/demo",
target: "es6",
logLevel: "info",
format: "iife",
Expand All @@ -41,9 +41,9 @@ const demo = {
};

const manual = {
entryPoints: ["manual/assets/js/src/index.js"]
.concat(await glob("manual/assets/js/src/demos/*.js")),
outdir: "manual/assets/js/dist",
entryPoints: ["./manual/assets/js/src/index.js"]
.concat(await glob("./manual/assets/js/src/demos/*.js")),
outdir: "./manual/assets/js/dist",
logLevel: "info",
format: "iife",
target: "es6",
Expand All @@ -54,8 +54,8 @@ const manual = {
};

await esbuild.build({
entryPoints: ["manual/assets/js/libs/vendor.js"],
outdir: "manual/assets/js/dist/libs",
entryPoints: ["./manual/assets/js/libs/vendor.js"],
outdir: "./manual/assets/js/dist/libs",
globalName: "VENDOR",
target: "es6",
logLevel: "info",
Expand All @@ -82,8 +82,8 @@ if(process.argv.includes("-w")) {
}

await esbuild.build({
entryPoints: ["src/index.js"],
outfile: `build/${pkg.name}.esm.js`,
entryPoints: ["./src/index.js"],
outfile: "./build/index.js",
banner: { js: banner },
logLevel: "info",
format: "esm",
Expand All @@ -93,45 +93,46 @@ await esbuild.build({
plugins
});

// @todo Remove in next major release.

await esbuild.build({
entryPoints: ["src/index.js"],
outfile: `build/${pkg.name}.mjs`,
entryPoints: ["./src/index.js"],
outfile: "./build/index.cjs",
banner: { js: banner },
logLevel: "info",
format: "esm",
format: "cjs",
target: "es2019",
bundle: true,
external,
plugins
});

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

await esbuild.build({
entryPoints: ["src/index.js"],
outfile: `build/${pkg.name}.js`,
entryPoints: ["./src/index.js"],
outfile: `./build/${pkg.name}.js`,
banner: { js: `${banner}\n${requireShim}` },
footer: { js: footer },
logLevel: "info",
format: "iife",
target: "es6",
target: "es2019",
bundle: true,
globalName,
external,
plugins
});

await esbuild.build({
entryPoints: ["src/index.js"],
outfile: `build/${pkg.name}.min.js`,
entryPoints: ["./src/index.js"],
outfile: `./build/${pkg.name}.min.js`,
banner: { js: `${banner}\n${requireShim}` },
footer: { js: footer },
logLevel: "info",
format: "iife",
target: "es6",
target: "es2019",
bundle: true,
globalName,
external,
Expand Down
35 changes: 16 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
{
"name": "postprocessing",
"version": "6.31.2",
"description": "A post processing library that provides the means to implement image filter effects for three.js.",
"version": "6.32.0",
"description": "A post processing library for three.js.",
"homepage": "https://github.com/pmndrs/postprocessing",
"sideEffects": false,
"license": "Zlib",
"main": "build/postprocessing.js",
"module": "build/postprocessing.esm.js",
"types": "types/postprocessing.d.ts",
"type": "module",
"sideEffects": false,
"main": "./build/index.cjs",
"module": "./build/index.js",
"types": "./types/index.d.ts",
"exports": {
".": {
"types": "./types/postprocessing.d.ts",
"import": "./build/postprocessing.esm.js",
"require": "./build/postprocessing.js"
},
"./module": {
"types": "./types/postprocessing.d.ts",
"import": "./build/postprocessing.mjs"
"types": "./types/index.d.ts",
"import": "./build/index.js",
"require": "./build/index.cjs"
}
},
"keywords": [
Expand Down Expand Up @@ -46,17 +43,17 @@
"url": "https://github.com/pmndrs/postprocessing/issues"
},
"files": [
"build",
"types"
"./build",
"./types"
],
"engines": {
"node": ">= 0.13.2"
},
"scripts": {
"ava": "ava",
"build:css": "sass --no-source-map -I manual/assets/css/src/values manual/assets/css/src:manual/assets/css/dist",
"build:js": "node esbuild.mjs",
"build:js:min": "node esbuild.mjs -m",
"build:js": "node esbuild",
"build:js:min": "node esbuild -m",
"clean": "del-cli build tmp manual/resources manual/assets/**/dist public",
"copy": "copyfiles -u 2 \"demo/static/**/*\" public/demo",
"deploy": "run-s copy postcss hugo gzip",
Expand All @@ -74,12 +71,12 @@
"watch": "run-p watch:* start",
"watch:css": "sass --no-source-map -I manual/assets/css/src/values manual/assets/css/src:manual/assets/css/dist -w",
"watch:eslint": "esw -w --ext .js --color src demo/src manual/assets/js/src",
"watch:js": "node esbuild.mjs -w"
"watch:js": "node esbuild -w"
},
"ava": {
"failFast": true,
"files": [
"test/**/*"
"./test/**/*"
]
},
"eslintConfig": {
Expand Down
Loading

0 comments on commit e3370c5

Please sign in to comment.