-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use rollup to decrease build size
- Loading branch information
1 parent
19c74ed
commit 2f81cc4
Showing
12 changed files
with
312 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,7 @@ $RECYCLE.BIN/ | |
|
||
# Artifacts | ||
lib | ||
dist | ||
coverage | ||
*.tsbuildinfo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import pkg from "./package.json"; | ||
|
||
export default [ | ||
// browser-friendly UMD build | ||
{ | ||
input: "lib/index.js", | ||
output: { | ||
name: "RSQLAst", | ||
file: pkg.browser, | ||
format: "umd", | ||
}, | ||
plugins: [resolve(), commonjs()], | ||
}, | ||
// CommonJS (for Node) and ES module (for bundlers) build. | ||
{ | ||
input: "lib/index.js", | ||
output: [ | ||
{ file: pkg.main, format: "cjs" }, | ||
{ file: pkg.module, format: "es" }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import pkg from "./package.json"; | ||
|
||
export default [ | ||
// browser-friendly UMD build | ||
{ | ||
input: "lib/index.js", | ||
output: { | ||
name: "RSQLBuilder", | ||
file: pkg.browser, | ||
format: "umd", | ||
}, | ||
plugins: [resolve(), commonjs()], | ||
}, | ||
// CommonJS (for Node) and ES module (for bundlers) build. | ||
{ | ||
input: "lib/index.js", | ||
external: Object.keys(pkg.dependencies), | ||
output: [ | ||
{ file: pkg.main, format: "cjs" }, | ||
{ file: pkg.module, format: "es" }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import pkg from "./package.json"; | ||
|
||
export default [ | ||
// browser-friendly UMD build | ||
{ | ||
input: "lib/index.js", | ||
output: { | ||
name: "RSQLEmitter", | ||
file: pkg.browser, | ||
format: "umd", | ||
}, | ||
plugins: [resolve(), commonjs()], | ||
}, | ||
// CommonJS (for Node) and ES module (for bundlers) build. | ||
{ | ||
input: "lib/index.js", | ||
external: Object.keys(pkg.dependencies), | ||
output: [ | ||
{ file: pkg.main, format: "cjs" }, | ||
{ file: pkg.module, format: "es" }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import pkg from "./package.json"; | ||
|
||
export default [ | ||
// browser-friendly UMD build | ||
{ | ||
input: "lib/index.js", | ||
output: { | ||
name: "RSQLParser", | ||
file: pkg.browser, | ||
format: "umd", | ||
}, | ||
plugins: [resolve(), commonjs()], | ||
}, | ||
// CommonJS (for Node) and ES module (for bundlers) build. | ||
{ | ||
input: "lib/index.js", | ||
external: Object.keys(pkg.dependencies), | ||
output: [ | ||
{ file: pkg.main, format: "cjs" }, | ||
{ file: pkg.module, format: "es" }, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"lib": ["es5", "scripthost"], | ||
"moduleResolution": "node", | ||
"target": "ES5", | ||
"module": "ESNext", | ||
"lib": ["ES5", "ScriptHost"], | ||
"moduleResolution": "Node", | ||
"esModuleInterop": true, | ||
"importHelpers": false, | ||
"skipLibCheck": true, | ||
"skipDefaultLibCheck": true, | ||
"strict": true, | ||
"baseUrl": ".", | ||
"composite": true, | ||
"incremental": true, | ||
"declaration": true | ||
} | ||
} |
Oops, something went wrong.