react-base16-styling

This commit is contained in:
Nathan Bierema 2022-01-23 15:45:14 -05:00
parent 378f3f90a1
commit 7530b35b9c
7 changed files with 21 additions and 39 deletions

View File

@ -1 +1 @@
dist lib

View File

@ -0,0 +1,7 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-transform-runtime"]
}

View File

@ -15,19 +15,23 @@
"license": "MIT", "license": "MIT",
"author": "Alexander <alexkuz@gmail.com> (http://kuzya.org/)", "author": "Alexander <alexkuz@gmail.com> (http://kuzya.org/)",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/react-base16-styling.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/react-base16-styling.esm.js", "module": "lib/esm/index.js",
"types": "dist/index.d.ts", "types": "lib/types/index.d.ts",
"sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/reduxjs/redux-devtools.git" "url": "git+https://github.com/reduxjs/redux-devtools.git"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types",
"clean": "rimraf dist", "build:cjs": "babel src --extensions \".ts\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -44,12 +48,12 @@
"lodash.curry": "^4.1.1" "lodash.curry": "^4.1.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.16.8",
"@babel/core": "^7.16.12", "@babel/core": "^7.16.12",
"@babel/eslint-parser": "^7.16.5", "@babel/eslint-parser": "^7.16.5",
"@babel/plugin-transform-runtime": "^7.16.10", "@babel/plugin-transform-runtime": "^7.16.10",
"@babel/preset-env": "^7.16.11", "@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@rollup/plugin-babel": "^5.3.0",
"@types/color": "^3.0.2", "@types/color": "^3.0.2",
"@types/jest": "^27.4.0", "@types/jest": "^27.4.0",
"@types/lodash.curry": "^4.1.6", "@types/lodash.curry": "^4.1.6",
@ -60,10 +64,7 @@
"eslint-plugin-jest": "^25.7.0", "eslint-plugin-jest": "^25.7.0",
"jest": "^27.4.7", "jest": "^27.4.7",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
} }
} }

View File

@ -1,23 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{ file: 'dist/react-base16-styling.cjs.js', format: 'cjs' },
{ file: 'dist/react-base16-styling.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [/@babel\/runtime/, 'base16', 'color', 'lodash.curry'],
},
];
export default config;

View File

@ -1,7 +1,7 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "lib" "outDir": "lib/types"
}, },
"include": ["src"] "include": ["src"]
} }

View File

@ -23859,13 +23859,13 @@ __metadata:
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "react-base16-styling@workspace:packages/react-base16-styling" resolution: "react-base16-styling@workspace:packages/react-base16-styling"
dependencies: dependencies:
"@babel/cli": ^7.16.8
"@babel/core": ^7.16.12 "@babel/core": ^7.16.12
"@babel/eslint-parser": ^7.16.5 "@babel/eslint-parser": ^7.16.5
"@babel/plugin-transform-runtime": ^7.16.10 "@babel/plugin-transform-runtime": ^7.16.10
"@babel/preset-env": ^7.16.11 "@babel/preset-env": ^7.16.11
"@babel/preset-typescript": ^7.16.7 "@babel/preset-typescript": ^7.16.7
"@babel/runtime": ^7.16.7 "@babel/runtime": ^7.16.7
"@rollup/plugin-babel": ^5.3.0
"@types/base16": ^1.0.2 "@types/base16": ^1.0.2
"@types/color": ^3.0.2 "@types/color": ^3.0.2
"@types/jest": ^27.4.0 "@types/jest": ^27.4.0
@ -23882,10 +23882,7 @@ __metadata:
jest: ^27.4.7 jest: ^27.4.7
lodash.curry: ^4.1.1 lodash.curry: ^4.1.1
rimraf: ^3.0.2 rimraf: ^3.0.2
rollup: ^2.66.0
rollup-plugin-typescript2: ^0.31.1
ts-jest: ^27.1.3 ts-jest: ^27.1.3
tslib: ^2.3.1
typescript: ~4.5.5 typescript: ~4.5.5
languageName: unknown languageName: unknown
linkType: soft linkType: soft