try again

This commit is contained in:
adueck 2022-10-06 20:38:00 +05:00
parent c590f04212
commit d4f85125df
2 changed files with 44 additions and 4 deletions

View File

@ -1,11 +1,14 @@
{ {
"name": "@lingdocs/pashto-inflector", "name": "@lingdocs/pashto-inflector",
"version": "4.9.15", "version": "4.9.14",
"author": "lingdocs.com", "author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations", "description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com", "homepage": "https://verbs.lingdocs.com",
"license": "MIT", "license": "MIT",
"main": "dist/library.js", "exports": {
"./functions": "./dist-cjs/dist/functions.js",
"./components": "./dist-cjs/dist/components.js"
},
"module": "dist/library.js", "module": "dist/library.js",
"types": "dist/library.d.ts", "types": "dist/library.d.ts",
"private": false, "private": false,
@ -27,7 +30,8 @@
"jsurl2": "^2.1.0", "jsurl2": "^2.1.0",
"lz-string": "^1.4.4", "lz-string": "^1.4.4",
"pbf": "^3.2.1", "pbf": "^3.2.1",
"rambda": "^6.7.0" "rambda": "^6.7.0",
"react-select": "^4.3.1"
}, },
"devDependencies": { "devDependencies": {
"@fortawesome/fontawesome-free": "^5.15.2", "@fortawesome/fontawesome-free": "^5.15.2",
@ -69,7 +73,7 @@
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"build-website": "node get-words.js && npm run build", "build-website": "node get-words.js && npm run build",
"build-library": "node get-words.js && rimraf dist && tsc --project library-tsconfig.json && node library-post-build.js", "build-library": "node get-words.js && rimraf dist && rimraf dist-cjs && tsc --project library-tsconfig.json && node library-post-build.js && rollup -c",
"test-ci": "npm run test -- --watchAll=false", "test-ci": "npm run test -- --watchAll=false",
"get-words": "node get-words.js" "get-words": "node get-words.js"
}, },

36
src/rollup.config.js Normal file
View File

@ -0,0 +1,36 @@
import image from '@rollup/plugin-image';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import pkg from './package.json';
import multiInput from 'rollup-plugin-multi-input';
const banner = `
/**
* Copyright (c) 2021 lingdocs.com
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
`;
export default {
input: ['dist/functions.js', 'dist/components.js'],
external: ["react", "react-dom", "react-bootstrap"],
output: [{
dir: "dist-cjs",
format: 'cjs',
sourcemap: true,
banner,
}],
plugins: [
// peerDepsExternal(),
multiInput(),
commonjs(),
nodeResolve({
resolveOnly: Object.keys(pkg.dependencies),
}),
// use base64 image inlining for the cjs version so that the .svg s can get cosumed by node 12 etc.
image(),
]
}