emoving Rollup
This commit is contained in:
parent
355c54d452
commit
760a1d385e
17
package.json
17
package.json
@ -1,33 +1,28 @@
|
||||
{
|
||||
"name": "nccl",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"rollup": "rm -rf dist/ && rollup -c"
|
||||
"build": "rm -rf dist/ && npm run build:esm && npm run build:cjs",
|
||||
"build:esm": "tsc",
|
||||
"build:cjs": "tsc --module CommonJS --outDir dist/cjs"
|
||||
},
|
||||
"author": "The Nerdy Canuck",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-node-resolve": "^13.0.6",
|
||||
"@rollup/plugin-typescript": "^8.3.0",
|
||||
"@types/react": "^17.0.37",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"rollup": "^2.60.2",
|
||||
"rollup-plugin-dts": "^4.0.1",
|
||||
"rollup-plugin-flat-dts": "^1.4.0",
|
||||
"tslib": "^2.3.1",
|
||||
"typescript": "^4.5.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^17.0.2"
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
}
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import dts from 'rollup-plugin-dts';
|
||||
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
export default [
|
||||
{
|
||||
input: 'src/index.ts',
|
||||
output: [
|
||||
{
|
||||
file: packageJson.main,
|
||||
format: 'cjs',
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
file: packageJson.module,
|
||||
format: 'esm',
|
||||
sourcemap: true
|
||||
}
|
||||
],
|
||||
plugins: [resolve(), commonjs(), typescript({ tsconfig: './tsconfig.json' })]
|
||||
},
|
||||
{
|
||||
input: 'dist/esm/types/index.d.ts',
|
||||
output: [{ file: 'dist/index.d.ts', format: 'esm' }],
|
||||
plugins: [dts()]
|
||||
}
|
||||
];
|
@ -1,21 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
// Default
|
||||
"target": "ES6",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Added"
|
||||
"jsx": "react",
|
||||
"module": "ESNext",
|
||||
"declaration": true,
|
||||
"declarationDir": "types",
|
||||
"sourceMap": true,
|
||||
"outDir": "lib",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"emitDeclarationOnly": true
|
||||
}
|
||||
"declaration": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react",
|
||||
"lib": ["es5", "es2015", "es2016", "dom", "esnext"],
|
||||
"types": ["node"],
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitAny": true,
|
||||
"noUnusedLocals": true,
|
||||
"outDir": "dist/esm",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "es5"
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user