forked from foliojs/fontkit
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite build steps to produce lib and es modules
- Loading branch information
Showing
7 changed files
with
139 additions
and
47 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
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 @@ | ||
module.exports = (api) => { | ||
api.cache(true); | ||
|
||
const { MODULE_TYPE } = process.env; | ||
|
||
// MODULE_TYPE = 'commonjs' | 'es6' | ||
const modules = MODULE_TYPE === 'commonjs' ? 'commonjs' : false; | ||
|
||
return { | ||
presets: [['@babel/preset-env', { modules }]], | ||
plugins: [ | ||
['@babel/plugin-proposal-decorators', { legacy: true }], | ||
['@babel/plugin-proposal-class-properties'] | ||
], | ||
env: { | ||
test: { | ||
presets: [['@babel/preset-env', { modules: 'commonjs' }]], | ||
}, | ||
cover: { | ||
plugins: ['istanbul'] | ||
} | ||
} | ||
}; | ||
} |
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 |
---|---|---|
|
@@ -2,35 +2,27 @@ | |
"name": "fontkit", | ||
"version": "1.7.7", | ||
"description": "An advanced font engine for Node and the browser", | ||
"keywords": [ | ||
"opentype", | ||
"font", | ||
"typography", | ||
"subset", | ||
"emoji", | ||
"glyph", | ||
"layout" | ||
], | ||
"main": "lib/index.js", | ||
"unpkg": "dist/fontkit.min.js", | ||
"module": "es/index.js", | ||
"scripts": { | ||
"make": "node Makefile.js", | ||
"clean": "node Makefile.js clean", | ||
"test": "mocha", | ||
"coverage": "cross-env BABEL_ENV=cover nyc mocha", | ||
"build-bundle": "browserify --insert-globals --standalone fontkit ./index.js | uglifyjs --mangle -c > bundle.js" | ||
}, | ||
"main": "fontkit.js", | ||
"files": [ | ||
"src", | ||
"base.js", | ||
"base.js.map", | ||
"index.js", | ||
"index.js.map", | ||
"data.trie", | ||
"use.trie", | ||
"indic.trie" | ||
], | ||
"author": "Devon Govett <[email protected]>", | ||
"license": "MIT", | ||
"keywords": [ | ||
"opentype", | ||
"font", | ||
"typography", | ||
"subset", | ||
"emoji", | ||
"glyph", | ||
"layout" | ||
], | ||
"dependencies": { | ||
"brotli": "^1.2.0", | ||
"browserify-optional": "^1.0.0", | ||
|
@@ -61,8 +53,10 @@ | |
"rollup": "^0.68.0", | ||
"rollup-plugin-analyzer": "^2.1.0", | ||
"rollup-plugin-babel": "^4.1.0", | ||
"rollup-plugin-commonjs": "^9.2.0", | ||
"rollup-plugin-json": "^3.1.0", | ||
"rollup-plugin-local-resolve": "^1.0.7", | ||
"rollup-plugin-node-resolve": "^4.0.0", | ||
"rollup-plugin-uglify": "^6.0.0" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -1031,6 +1031,11 @@ builtin-modules@^1.0.0: | |
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" | ||
|
||
builtin-modules@^3.0.0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.0.0.tgz#1e587d44b006620d90286cc7a9238bbc6129cab1" | ||
integrity sha512-hMIeU4K2ilbXV6Uv93ZZ0Avg/M91RaKXucQ+4me2Do1txxBDyDZWCBa5bJSLqoNTRpXTLwEzIk1KmloenDDjhg== | ||
|
||
cache-base@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" | ||
|
@@ -2162,6 +2167,11 @@ is-glob@^4.0.0: | |
dependencies: | ||
is-extglob "^2.1.1" | ||
|
||
is-module@^1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" | ||
integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= | ||
|
||
is-number@^2.1.0: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" | ||
|
@@ -2489,6 +2499,13 @@ lru-cache@^4.0.1: | |
pseudomap "^1.0.2" | ||
yallist "^2.1.2" | ||
|
||
magic-string@^0.25.1: | ||
version "0.25.1" | ||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e" | ||
integrity sha512-sCuTz6pYom8Rlt4ISPFn6wuFodbKMIHUMv4Qko9P17dpxb7s52KJTmRuZZqHdGmLCK9AOcDare039nRIcfdkEg== | ||
dependencies: | ||
sourcemap-codec "^1.4.1" | ||
|
||
make-dir@^1.0.0: | ||
version "1.3.0" | ||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" | ||
|
@@ -3268,7 +3285,7 @@ [email protected]: | |
version "1.1.7" | ||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" | ||
|
||
resolve@^1.1.6, resolve@^1.3.2: | ||
resolve@^1.1.6, resolve@^1.3.2, resolve@^1.8.1: | ||
version "1.9.0" | ||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" | ||
integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== | ||
|
@@ -3310,6 +3327,16 @@ rollup-plugin-babel@^4.1.0: | |
"@babel/helper-module-imports" "^7.0.0" | ||
rollup-pluginutils "^2.3.0" | ||
|
||
rollup-plugin-commonjs@^9.2.0: | ||
version "9.2.0" | ||
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.2.0.tgz#4604e25069e0c78a09e08faa95dc32dec27f7c89" | ||
integrity sha512-0RM5U4Vd6iHjL6rLvr3lKBwnPsaVml+qxOGaaNUWN1lSq6S33KhITOfHmvxV3z2vy9Mk4t0g4rNlVaJJsNQPWA== | ||
dependencies: | ||
estree-walker "^0.5.2" | ||
magic-string "^0.25.1" | ||
resolve "^1.8.1" | ||
rollup-pluginutils "^2.3.3" | ||
|
||
rollup-plugin-json@^3.1.0: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-3.1.0.tgz#7c1daf60c46bc21021ea016bd00863561a03321b" | ||
|
@@ -3321,6 +3348,15 @@ rollup-plugin-local-resolve@^1.0.7: | |
version "1.0.7" | ||
resolved "https://registry.yarnpkg.com/rollup-plugin-local-resolve/-/rollup-plugin-local-resolve-1.0.7.tgz#c486701716c15add2127565c2eaa101123320887" | ||
|
||
rollup-plugin-node-resolve@^4.0.0: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.0.tgz#9bc6b8205e9936cc0e26bba2415f1ecf1e64d9b2" | ||
integrity sha512-7Ni+/M5RPSUBfUaP9alwYQiIKnKeXCOHiqBpKUl9kwp3jX5ZJtgXAait1cne6pGEVUUztPD6skIKH9Kq9sNtfw== | ||
dependencies: | ||
builtin-modules "^3.0.0" | ||
is-module "^1.0.0" | ||
resolve "^1.8.1" | ||
|
||
rollup-plugin-uglify@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.0.tgz#15aa8919e5cdc63b7cfc9319c781788b40084ce4" | ||
|
@@ -3331,7 +3367,7 @@ rollup-plugin-uglify@^6.0.0: | |
serialize-javascript "^1.5.0" | ||
uglify-js "^3.4.9" | ||
|
||
rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.1: | ||
rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.1, rollup-pluginutils@^2.3.3: | ||
version "2.3.3" | ||
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794" | ||
integrity sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA== | ||
|
@@ -3510,6 +3546,11 @@ source-map@~0.2.0: | |
dependencies: | ||
amdefine ">=0.0.4" | ||
|
||
sourcemap-codec@^1.4.1: | ||
version "1.4.4" | ||
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz#c63ea927c029dd6bd9a2b7fa03b3fec02ad56e9f" | ||
integrity sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg== | ||
|
||
[email protected]: | ||
version "1.2.4" | ||
resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40" | ||
|