From c8becd1c72729fcd4100472d5dca31c90bb6c119 Mon Sep 17 00:00:00 2001 From: diegomura Date: Sat, 2 Jul 2022 04:34:59 -0300 Subject: [PATCH] chore: remove unicode-properties --- packages/unicode-properties/package.json | 32 ---------- packages/unicode-properties/rollup.config.js | 67 -------------------- 2 files changed, 99 deletions(-) delete mode 100644 packages/unicode-properties/package.json delete mode 100644 packages/unicode-properties/rollup.config.js diff --git a/packages/unicode-properties/package.json b/packages/unicode-properties/package.json deleted file mode 100644 index a400f6eb8..000000000 --- a/packages/unicode-properties/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@react-pdf/unicode-properties", - "version": "2.6.0", - "license": "MIT", - "description": "Provides fast access to unicode character properties", - "author": "Devon Govett ", - "main": "lib/unicode-properties.cjs.js", - "module": "lib/unicode-properties.es.js", - "browser": { - "lib/unicode-properties.cjs.js": "lib/unicode-properties.browser.cjs.js", - "lib/unicode-properties.es.js": "lib/unicode-properties.browser.es.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/diegomura/react-pdf.git", - "directory": "packages/unicode-properties" - }, - "scripts": { - "test": "jest", - "build": "node generate.js && rollup -c", - "watch": "node generate.js && rollup -c -w" - }, - "dependencies": { - "unicode-trie": "^0.3.0" - }, - "devDependencies": { - "codepoints": "^1.2.0" - }, - "files": [ - "lib" - ] -} diff --git a/packages/unicode-properties/rollup.config.js b/packages/unicode-properties/rollup.config.js deleted file mode 100644 index e943f3758..000000000 --- a/packages/unicode-properties/rollup.config.js +++ /dev/null @@ -1,67 +0,0 @@ -import json from '@rollup/plugin-json'; -import babel from '@rollup/plugin-babel'; -import nodePolyfills from 'rollup-plugin-polyfill-node'; -import pkg from './package.json'; - -const cjs = { - exports: 'named', - format: 'cjs', -}; - -const esm = { - format: 'es', -}; - -const getCJS = override => Object.assign({}, cjs, override); -const getESM = override => Object.assign({}, esm, override); - -const input = 'index.js'; - -const babelConfig = ({ browser }) => ({ - babelrc: false, - babelHelpers: 'runtime', - exclude: 'node_modules/**', - presets: [ - [ - '@babel/preset-env', - { - loose: true, - modules: false, - targets: { node: '12', browsers: 'last 2 versions' }, - }, - ], - ], - plugins: [['@babel/plugin-transform-runtime', { version: '^7.16.4' }]], -}); - -const getExternal = () => [ - ...(Object.keys(pkg.dependencies)), -]; - -const getPlugins = ({ browser }) => [ - json(), - babel(babelConfig({ browser })), - ...(browser ? [ nodePolyfills({ include: [ /unicode-properties\/index\.js/, /polyfill/ ] }) ] : []), -]; - -const serverConfig = { - input, - output: [ - getESM({ file: 'lib/unicode-properties.es.js' }), - getCJS({ file: 'lib/unicode-properties.cjs.js' }), - ], - external: getExternal(), - plugins: getPlugins({ browser: false }), -}; - -const browserConfig = { - input, - output: [ - getESM({ file: 'lib/unicode-properties.browser.es.js' }), - getCJS({ file: 'lib/unicode-properties.browser.cjs.js' }), - ], - external: getExternal(), - plugins: getPlugins({ browser: true }), -}; - -export default [serverConfig, browserConfig];