Imprrove ability to tree-shake libraries (#1050)

* Revert "Remove React from page bundle (#1031)"

This reverts commit fdfbc1942e.

* redux-devtools

* d3-state-visualizer

* d3tooltip

* map2tree

* react-base16-styling

* react-dock and react-json-tree

* redux-devtools-app

* redux-devtools-chart-monitor

* redux-devtools-dock-monitor

* redux-devtools-extension

* redux-devtools-inspector-monitor-test-tab

* redux-devtools-inspector-monitor-trace-tab

* redux-devtools-instrument

* redux-devtools-log-monitor and redux-devtools-remote

* redux-devtools-rtk-query-monitor

* redux-devtools-serialize

* redux-devtools-slider-monitor

* redux-devtools-ui

* redux-devtools-utils

* Fix build

* Fix storybook build

Storybook loads the babel.config.json but not .babelrc.json. We actually don't want to load the babel config because it uses @babel/runtime which can't be resolved with Yarn PnP.
This commit is contained in:
Nathan Bierema 2022-01-23 21:11:46 -05:00 committed by GitHub
parent b992fcc653
commit c379a62081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
141 changed files with 594 additions and 1136 deletions

View File

@ -1,6 +1,6 @@
{ {
"presets": [ "presets": [
"@babel/preset-env", ["@babel/preset-env", { "targets": "defaults" }],
"@babel/preset-react", "@babel/preset-react",
"@babel/preset-typescript" "@babel/preset-typescript"
] ]

View File

@ -1,6 +1,6 @@
import { Action, compose, Reducer, StoreEnhancerStoreCreator } from 'redux'; import { Action, compose, Reducer, StoreEnhancerStoreCreator } from 'redux';
import { instrument } from '@redux-devtools/instrument'; import { instrument } from '@redux-devtools/instrument';
import persistState from './persistState'; import { persistState } from '@redux-devtools/core';
import { ConfigWithExpandedMaxAge } from '../../browser/extension/inject/pageScript'; import { ConfigWithExpandedMaxAge } from '../../browser/extension/inject/pageScript';
export function getUrlParam(key: string) { export function getUrlParam(key: string) {

View File

@ -1,83 +0,0 @@
import mapValues from 'lodash/mapValues';
import identity from 'lodash/identity';
import { Action, PreloadedState, Reducer, StoreEnhancer } from 'redux';
import { LiftedState } from '@redux-devtools/instrument';
export default function persistState<
S,
A extends Action<unknown>,
MonitorState
>(
sessionId?: string | null,
deserializeState: (state: S) => S = identity,
deserializeAction: (action: A) => A = identity
): StoreEnhancer {
if (!sessionId) {
return (next) =>
(...args) =>
next(...args);
}
function deserialize(
state: LiftedState<S, A, MonitorState>
): LiftedState<S, A, MonitorState> {
return {
...state,
actionsById: mapValues(state.actionsById, (liftedAction) => ({
...liftedAction,
action: deserializeAction(liftedAction.action),
})),
committedState: deserializeState(state.committedState),
computedStates: state.computedStates.map((computedState) => ({
...computedState,
state: deserializeState(computedState.state),
})),
};
}
return (next) =>
<S2, A2 extends Action<unknown>>(
reducer: Reducer<S2, A2>,
initialState?: PreloadedState<S2>
) => {
const key = `redux-dev-session-${sessionId}`;
let finalInitialState;
try {
const json = localStorage.getItem(key);
if (json) {
finalInitialState =
deserialize(JSON.parse(json) as LiftedState<S, A, MonitorState>) ||
initialState;
next(reducer, initialState);
}
} catch (e) {
console.warn('Could not read debug session from localStorage:', e); // eslint-disable-line no-console
try {
localStorage.removeItem(key);
} finally {
finalInitialState = undefined;
}
}
const store = next(
reducer,
finalInitialState as PreloadedState<S2> | undefined
);
return {
...store,
dispatch<T extends A2>(action: T) {
store.dispatch(action);
try {
localStorage.setItem(key, JSON.stringify(store.getState()));
} catch (e) {
console.warn('Could not write debug session to localStorage:', e); // eslint-disable-line no-console
}
return action;
},
};
};
}

View File

@ -1,2 +1,2 @@
examples examples
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

@ -17,19 +17,25 @@
"author": "romseguy", "author": "romseguy",
"files": [ "files": [
"dist", "dist",
"lib",
"src" "src"
], ],
"main": "dist/d3-state-visualizer.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/d3-state-visualizer.esm.js", "module": "lib/esm/index.js",
"types": "dist/index.d.ts", "types": "lib/types/index.d.ts",
"unpkg": "dist/d3-state-visualizer.umd.js", "unpkg": "dist/d3-state-visualizer.umd.js",
"sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git" "url": "https://github.com/reduxjs/redux-devtools.git"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"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",
"build:umd": "rollup -c",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -45,6 +51,7 @@
"ramda": "^0.28.0" "ramda": "^0.28.0"
}, },
"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",

View File

@ -9,11 +9,13 @@ const config = [
input: 'src/index.ts', input: 'src/index.ts',
output: { output: {
name: 'd3-state-visualizer', name: 'd3-state-visualizer',
file: 'dist/d3-state-visualizer.umd.js', file: 'lib/umd/d3-state-visualizer.js',
format: 'umd', format: 'umd',
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -27,11 +29,13 @@ const config = [
input: 'src/index.ts', input: 'src/index.ts',
output: { output: {
name: 'd3-state-visualizer', name: 'd3-state-visualizer',
file: 'dist/d3-state-visualizer.umd.min.js', file: 'lib/umd/d3-state-visualizer.min.js',
format: 'umd', format: 'umd',
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -42,29 +46,6 @@ const config = [
terser(), terser(),
], ],
}, },
{
input: 'src/index.ts',
output: [
{ file: 'dist/d3-state-visualizer.cjs.js', format: 'cjs' },
{ file: 'dist/d3-state-visualizer.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'd3',
'ramda',
'map2tree',
'deepmerge',
'd3tooltip',
],
},
]; ];
export default config; 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

@ -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

@ -13,20 +13,25 @@
"license": "MIT", "license": "MIT",
"author": "romseguy", "author": "romseguy",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/d3tooltip.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/d3tooltip.esm.js", "module": "lib/esm/index.js",
"types": "dist/index.d.ts", "types": "lib/types/index.d.ts",
"unpkg": "dist/d3tooltip.umd.js", "unpkg": "lib/umd/d3tooltip.umd.js",
"sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git" "url": "https://github.com/reduxjs/redux-devtools.git"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"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",
"build:umd": "rollup -c",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -37,6 +42,7 @@
"ramda": "^0.28.0" "ramda": "^0.28.0"
}, },
"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",

View File

@ -9,11 +9,13 @@ const config = [
input: 'src/index.ts', input: 'src/index.ts',
output: { output: {
name: 'd3tooltip', name: 'd3tooltip',
file: 'dist/d3tooltip.umd.js', file: 'lib/umd/d3tooltip.js',
format: 'umd', format: 'umd',
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -27,11 +29,13 @@ const config = [
input: 'src/index.ts', input: 'src/index.ts',
output: { output: {
name: 'd3tooltip', name: 'd3tooltip',
file: 'dist/d3tooltip.umd.min.js', file: 'lib/umd/d3tooltip.min.js',
format: 'umd', format: 'umd',
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -42,22 +46,6 @@ const config = [
terser(), terser(),
], ],
}, },
{
input: 'src/index.ts',
output: [
{ file: 'dist/d3tooltip.cjs.js', format: 'cjs' },
{ file: 'dist/d3tooltip.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [/@babel\/runtime/, 'ramda'],
},
]; ];
export default config; export default config;

View File

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

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

View File

@ -16,20 +16,25 @@
"license": "MIT", "license": "MIT",
"author": "romseguy", "author": "romseguy",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/map2tree.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/map2tree.esm.js", "module": "lib/esm/index.js",
"types": "dist/index.d.ts", "types": "lib/types/index.d.ts",
"unpkg": "dist/map2tree.umd.js", "unpkg": "lib/umd/map2tree.umd.js",
"sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git" "url": "https://github.com/reduxjs/redux-devtools.git"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"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",
"build:umd": "rollup -c",
"clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -41,6 +46,7 @@
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"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",

View File

@ -9,11 +9,13 @@ const config = [
input: 'src/index.ts', input: 'src/index.ts',
output: { output: {
name: 'map2tree', name: 'map2tree',
file: 'dist/map2tree.umd.js', file: 'lib/umd/map2tree.js',
format: 'umd', format: 'umd',
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -27,11 +29,13 @@ const config = [
input: 'src/index.ts', input: 'src/index.ts',
output: { output: {
name: 'map2tree', name: 'map2tree',
file: 'dist/map2tree.umd.min.js', file: 'lib/umd/map2tree.min.js',
format: 'umd', format: 'umd',
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -42,22 +46,6 @@ const config = [
terser(), terser(),
], ],
}, },
{
input: 'src/index.ts',
output: [
{ file: 'dist/map2tree.cjs.js', format: 'cjs' },
{ file: 'dist/map2tree.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [/@babel\/runtime/, /lodash/],
},
]; ];
export default config; export default config;

View File

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

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

@ -301,5 +301,5 @@ export const invertTheme = (theme: Theme | undefined): Theme | undefined => {
return theme; return theme;
}; };
export { Base16Theme }; export type { Base16Theme };
export * from './types'; export * from './types';

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

@ -1,2 +1,2 @@
demo demo
dist lib

View File

@ -0,0 +1,8 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-react",
"@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-dock.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/react-dock.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": "https://github.com/reduxjs/redux-devtools.git" "url": "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,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -42,13 +46,13 @@
"prop-types": "^15.8.1" "prop-types": "^15.8.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-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@rollup/plugin-babel": "^5.3.0",
"@types/jest": "^27.4.0", "@types/jest": "^27.4.0",
"@types/lodash.debounce": "^4.0.6", "@types/lodash.debounce": "^4.0.6",
"@types/react": "^17.0.38", "@types/react": "^17.0.38",
@ -64,10 +68,7 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-test-renderer": "^17.0.2", "react-test-renderer": "^17.0.2",
"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"
}, },
"peerDependencies": { "peerDependencies": {

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-dock.cjs.js', format: 'cjs' },
{ file: 'dist/react-dock.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [/@babel\/runtime/, 'react', 'prop-types', 'lodash.debounce'],
},
];
export default config;

View File

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

View File

@ -1,2 +1,2 @@
dist
examples examples
lib

View File

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

View File

@ -19,20 +19,25 @@
"Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)" "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)"
], ],
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/react-json-tree.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/react-json-tree.esm.js", "module": "lib/esm/index.js",
"types": "dist/index.d.ts", "types": "lib/types/index.d.ts",
"unpkg": "dist/react-json-tree.umd.js", "unpkg": "lib/umd/react-json-tree.umd.js",
"sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git" "url": "https://github.com/reduxjs/redux-devtools.git"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types && yarn build:umd",
"clean": "rimraf umd", "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"build:umd": "rollup -c",
"clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -46,6 +51,7 @@
"react-base16-styling": "^0.9.0" "react-base16-styling": "^0.9.0"
}, },
"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",

View File

@ -9,14 +9,16 @@ const config = [
input: 'src/index.tsx', input: 'src/index.tsx',
output: { output: {
name: 'ReactJsonTree', name: 'ReactJsonTree',
file: 'dist/react-json-tree.umd.js', file: 'lib/umd/react-json-tree.js',
format: 'umd', format: 'umd',
globals: { globals: {
react: 'React', react: 'React',
}, },
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -31,14 +33,16 @@ const config = [
input: 'src/index.tsx', input: 'src/index.tsx',
output: { output: {
name: 'ReactJsonTree', name: 'ReactJsonTree',
file: 'dist/react-json-tree.umd.min.js', file: 'lib/umd/react-json-tree.min.js',
format: 'umd', format: 'umd',
globals: { globals: {
react: 'React', react: 'React',
}, },
}, },
plugins: [ plugins: [
typescript(), typescript({
tsconfigOverride: { compilerOptions: { declaration: false } },
}),
resolve(), resolve(),
commonjs(), commonjs(),
babel({ babel({
@ -50,27 +54,6 @@ const config = [
], ],
external: ['react'], external: ['react'],
}, },
{
input: 'src/index.tsx',
output: [
{ file: 'dist/react-json-tree.cjs.js', format: 'cjs' },
{ file: 'dist/react-json-tree.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'prop-types',
'react-base16-styling',
],
},
]; ];
export default config; export default config;

View File

@ -9,10 +9,10 @@ import JSONNode from './JSONNode';
import createStylingFromTheme from './createStylingFromTheme'; import createStylingFromTheme from './createStylingFromTheme';
import { import {
invertTheme, invertTheme,
StylingConfig, type StylingConfig,
StylingFunction, type StylingFunction,
StylingValue, type StylingValue,
Theme, type Theme,
} from 'react-base16-styling'; } from 'react-base16-styling';
import { CircularPropsPassedThroughJSONTree } from './types'; import { CircularPropsPassedThroughJSONTree } from './types';

View File

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

View File

@ -1,3 +1,3 @@
build build
dist lib
umd umd

View File

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

View File

@ -9,13 +9,15 @@
"license": "MIT", "license": "MIT",
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)", "author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)",
"files": [ "files": [
"dist", "build",
"lib",
"src", "src",
"umd" "umd"
], ],
"main": "dist/redux-devtools-app.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-app.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": "https://github.com/reduxjs/redux-devtools.git" "url": "https://github.com/reduxjs/redux-devtools.git"
@ -23,11 +25,14 @@
"scripts": { "scripts": {
"start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --hot --env development --env platform=web --progress", "start": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack serve --hot --env development --env platform=web --progress",
"build": "yarn run build:lib && yarn run build:web && yarn run build:umd && yarn run build:umd:min", "build": "yarn run build:lib && yarn run build:web && yarn run build:umd && yarn run build:umd:min",
"build:lib": "rollup -c", "build:lib": "yarn build:cjs && yarn build:esm && yarn build:types",
"build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"build:web": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env platform=web --progress", "build:web": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env platform=web --progress",
"build:umd": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --progress --config webpack.config.umd.ts", "build:umd": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --progress --config webpack.config.umd.ts",
"build:umd:min": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env production --progress --config webpack.config.umd.ts", "build:umd:min": "cross-env TS_NODE_PROJECT=\"tsconfig.webpack.json\" webpack --env production --progress --config webpack.config.umd.ts",
"clean": "rimraf build dist umd", "clean": "rimraf build lib umd",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -62,6 +67,7 @@
"socketcluster-client": "^14.3.2" "socketcluster-client": "^14.3.2"
}, },
"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",
@ -69,7 +75,6 @@
"@babel/preset-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@rjsf/core": "^3.2.1", "@rjsf/core": "^3.2.1",
"@rollup/plugin-babel": "^5.3.0",
"@testing-library/jest-dom": "^5.16.1", "@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2", "@testing-library/react": "^12.1.2",
"@types/jest": "^27.4.0", "@types/jest": "^27.4.0",
@ -102,13 +107,10 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"styled-components": "^5.3.3", "styled-components": "^5.3.3",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",
"ts-node": "^10.4.0", "ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typescript": "~4.5.5", "typescript": "~4.5.5",
"webpack": "^5.67.0", "webpack": "^5.67.0",
"webpack-cli": "^4.9.1", "webpack-cli": "^4.9.1",

View File

@ -1,54 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.tsx',
output: [
{
file: 'dist/redux-devtools-app.cjs.js',
format: 'cjs',
},
{
file: 'dist/redux-devtools-app.esm.js',
format: 'esm',
},
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'react-redux',
'redux',
'localforage',
/redux-persist/,
'@redux-devtools/ui',
'socketcluster-client',
'jsan',
/react-icons/,
'styled-components',
'@redux-devtools/slider-monitor',
'prop-types',
/lodash/,
'@redux-devtools/core',
'@redux-devtools/log-monitor',
'@redux-devtools/rtk-query-monitor',
'@redux-devtools/chart-monitor',
'@redux-devtools/inspector-monitor',
'@redux-devtools/inspector-monitor-trace-tab',
'@redux-devtools/inspector-monitor-test-tab',
'javascript-stringify',
'jsondiffpatch',
'd3-state-visualizer',
],
},
];
export default config;

View File

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

View File

@ -1 +1 @@
dist lib

View File

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

View File

@ -16,19 +16,23 @@
"license": "MIT", "license": "MIT",
"author": "romseguy", "author": "romseguy",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-chart-monitor.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-chart-monitor.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": "https://github.com/reduxjs/redux-devtools.git" "url": "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,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -44,6 +48,7 @@
"redux-devtools-themes": "^1.0.0" "redux-devtools-themes": "^1.0.0"
}, },
"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",
@ -51,7 +56,6 @@
"@babel/preset-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@redux-devtools/core": "^3.10.1", "@redux-devtools/core": "^3.10.1",
"@rollup/plugin-babel": "^5.3.0",
"@types/react": "^17.0.38", "@types/react": "^17.0.38",
"@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0", "@typescript-eslint/parser": "^5.10.0",
@ -62,9 +66,6 @@
"react": "^17.0.2", "react": "^17.0.2",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,31 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{ file: 'dist/redux-devtools-chart-monitor.cjs.js', format: 'cjs' },
{ file: 'dist/redux-devtools-chart-monitor.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'prop-types',
'redux-devtools-themes',
'@redux-devtools/core',
'deepmerge',
'd3-state-visualizer',
],
},
];
export default config;

View File

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

View File

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

View File

@ -18,19 +18,23 @@
"license": "MIT", "license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)", "author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-dock-monitor.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-dock-monitor.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": "https://github.com/reduxjs/redux-devtools.git" "url": "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,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -44,6 +48,7 @@
"react-dock": "^0.5.0" "react-dock": "^0.5.0"
}, },
"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",
@ -51,7 +56,6 @@
"@babel/preset-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@redux-devtools/core": "^3.10.1", "@redux-devtools/core": "^3.10.1",
"@rollup/plugin-babel": "^5.3.0",
"@types/parse-key": "^0.2.0", "@types/parse-key": "^0.2.0",
"@types/react": "^17.0.38", "@types/react": "^17.0.38",
"@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/eslint-plugin": "^5.10.0",
@ -63,9 +67,6 @@
"react": "^17.0.2", "react": "^17.0.2",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,29 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{ file: 'dist/redux-devtools-dock-monitor.cjs.js', format: 'cjs' },
{ file: 'dist/redux-devtools-dock-monitor.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'prop-types',
'react-dock',
'parse-key',
],
},
];
export default config;

View File

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

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

@ -9,16 +9,20 @@
"dist", "dist",
"src" "src"
], ],
"main": "dist/redux-devtools-extension.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-extension.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": "https://github.com/reduxjs/redux-devtools" "url": "https://github.com/reduxjs/redux-devtools"
}, },
"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",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -28,21 +32,18 @@
"@babel/runtime": "^7.16.7" "@babel/runtime": "^7.16.7"
}, },
"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",
"@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0", "@typescript-eslint/parser": "^5.10.0",
"eslint": "^8.7.0", "eslint": "^8.7.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,29 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{
file: 'dist/redux-devtools-extension.cjs.js',
format: 'cjs',
},
{
file: 'dist/redux-devtools-extension.esm.js',
format: 'esm',
},
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [/@babel\/runtime/, 'redux'],
},
];
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

@ -1,2 +1,2 @@
demo demo
dist lib

View File

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

View File

@ -19,19 +19,23 @@
"license": "MIT", "license": "MIT",
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)", "author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-inspector-monitor-test-tab.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-inspector-monitor-test-tab.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": "https://github.com/reduxjs/redux-devtools.git" "url": "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,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -51,6 +55,7 @@
"simple-diff": "^1.6.0" "simple-diff": "^1.6.0"
}, },
"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",
@ -59,7 +64,6 @@
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@redux-devtools/core": "^3.10.1", "@redux-devtools/core": "^3.10.1",
"@redux-devtools/inspector-monitor": "^2.0.1", "@redux-devtools/inspector-monitor": "^2.0.1",
"@rollup/plugin-babel": "^5.3.0",
"@testing-library/react": "^12.1.2", "@testing-library/react": "^12.1.2",
"@types/es6template": "^1.0.0", "@types/es6template": "^1.0.0",
"@types/jest": "^27.4.0", "@types/jest": "^27.4.0",
@ -79,10 +83,7 @@
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"redux": "^4.1.2", "redux": "^4.1.2",
"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"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,40 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.tsx',
output: [
{
file: 'dist/redux-devtools-inspector-monitor-test-tab.cjs.js',
format: 'cjs',
},
{
file: 'dist/redux-devtools-inspector-monitor-test-tab.esm.js',
format: 'esm',
},
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'prop-types',
'@redux-devtools/ui',
/react-icons/,
'javascript-stringify',
'object-path',
'jsan',
'simple-diff',
'es6template',
],
},
];
export default config;

View File

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

View File

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

View File

@ -9,16 +9,20 @@
"Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)" "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)"
], ],
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-inspector-monitor-trace-tab.cjs.js", "main": "lib/cjs/StackTraceTab.js",
"module": "dist/redux-devtools-inspector-monitor-trace-tab.esm.js", "module": "lib/esm/StackTraceTab.js",
"types": "dist/StackTraceTab.d.ts", "types": "lib/types/StackTraceTab.d.ts",
"sideEffects": false,
"repository": "https://github.com/reduxjs/redux-devtools", "repository": "https://github.com/reduxjs/redux-devtools",
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types",
"clean": "rimraf dist", "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
@ -31,10 +35,12 @@
"@types/chrome": "^0.0.176", "@types/chrome": "^0.0.176",
"anser": "^2.1.0", "anser": "^2.1.0",
"html-entities": "^2.3.2", "html-entities": "^2.3.2",
"path-browserify": "^1.0.1",
"redux-devtools-themes": "^1.0.0", "redux-devtools-themes": "^1.0.0",
"source-map": "^0.5.7" "source-map": "^0.5.7"
}, },
"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",
@ -43,12 +49,12 @@
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@redux-devtools/core": "^3.10.1", "@redux-devtools/core": "^3.10.1",
"@redux-devtools/inspector-monitor": "^2.0.1", "@redux-devtools/inspector-monitor": "^2.0.1",
"@rollup/plugin-babel": "^5.3.0",
"@testing-library/react": "^12.1.2", "@testing-library/react": "^12.1.2",
"@types/babel__code-frame": "^7.0.3", "@types/babel__code-frame": "^7.0.3",
"@types/html-entities": "^1.3.4", "@types/html-entities": "^1.3.4",
"@types/jest": "^27.4.0", "@types/jest": "^27.4.0",
"@types/node": "^16.11.21", "@types/node": "^16.11.21",
"@types/path-browserify": "^1.0.0",
"@types/react": "^17.0.38", "@types/react": "^17.0.38",
"@types/redux-devtools-themes": "^1.0.0", "@types/redux-devtools-themes": "^1.0.0",
"@types/source-map": "0.5.2", "@types/source-map": "0.5.2",
@ -65,11 +71,7 @@
"react-test-renderer": "^17.0.2", "react-test-renderer": "^17.0.2",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"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"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
import path from 'path'; import path from 'path-browserify';
import StackFrame from './stack-frame'; import StackFrame from './stack-frame';
import { getSourceMap } from './getSourceMap'; import { getSourceMap } from './getSourceMap';
import { getLinesAround } from './getLinesAround'; import { getLinesAround } from './getLinesAround';

View File

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

View File

@ -1,2 +1,2 @@
demo demo
dist lib

View File

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

View File

@ -12,19 +12,23 @@
"Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)" "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)"
], ],
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-inspector-monitor.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-inspector-monitor.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": "https://github.com/reduxjs/redux-devtools" "url": "https://github.com/reduxjs/redux-devtools"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types",
"clean": "rimraf dist", "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -50,6 +54,7 @@
"redux-devtools-themes": "^1.0.0" "redux-devtools-themes": "^1.0.0"
}, },
"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",
@ -57,7 +62,6 @@
"@babel/preset-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@redux-devtools/core": "^3.10.1", "@redux-devtools/core": "^3.10.1",
"@rollup/plugin-babel": "^5.3.0",
"@types/dateformat": "^3.0.1", "@types/dateformat": "^3.0.1",
"@types/hex-rgba": "^1.0.1", "@types/hex-rgba": "^1.0.1",
"@types/history": "^4.7.11", "@types/history": "^4.7.11",
@ -74,9 +78,6 @@
"react": "^17.0.2", "react": "^17.0.2",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,40 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{ file: 'dist/redux-devtools-inspector-monitor.cjs.js', format: 'cjs' },
{ file: 'dist/redux-devtools-inspector-monitor.esm.js', format: 'esm' },
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'prop-types',
'react-base16-styling',
'@redux-devtools/core',
'jss',
'jss-preset-default',
'hex-rgba',
'redux-devtools-themes',
'immutable',
'jsondiffpatch',
'react-dragula',
'react-json-tree',
'dateformat',
'lodash.debounce',
'javascript-stringify',
],
},
];
export default config;

View File

@ -1,6 +1,6 @@
export { default as InspectorMonitor } from './DevtoolsInspector'; export { default as InspectorMonitor } from './DevtoolsInspector';
export { Tab, TabComponentProps } from './ActionPreview'; export type { Tab, TabComponentProps } from './ActionPreview';
export { DevtoolsInspectorState } from './redux'; export type { DevtoolsInspectorState } from './redux';
export { base16Themes } from './utils/createStylingFromTheme'; export { base16Themes } from './utils/createStylingFromTheme';
export * as inspectorThemes from './themes/index'; export * as inspectorThemes from './themes/index';
export { default as ActionTab } from './tabs/ActionTab'; export { default as ActionTab } from './tabs/ActionTab';

View File

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

View File

@ -1 +1 @@
dist lib

View File

@ -0,0 +1,6 @@
{
"presets": [
["@babel/preset-env", { "targets": "defaults", "modules": false }],
"@babel/preset-typescript"
]
}

View File

@ -17,19 +17,23 @@
"license": "MIT", "license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)", "author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-instrument.cjs.js", "main": "lib/cjs/instrument.js",
"module": "dist/redux-devtools-instrument.esm.js", "module": "lib/esm/instrument.js",
"types": "dist/instrument.d.ts", "types": "lib/types/instrument.d.ts",
"sideEffects": false,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/reduxjs/redux-devtools.git" "url": "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",
@ -41,12 +45,12 @@
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"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/jest": "^27.4.0", "@types/jest": "^27.4.0",
"@types/lodash": "^4.14.178", "@types/lodash": "^4.14.178",
"@types/node": "^16.11.21", "@types/node": "^16.11.21",
@ -58,11 +62,8 @@
"jest": "^27.4.7", "jest": "^27.4.7",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"rxjs": "^7.5.2", "rxjs": "^7.5.2",
"ts-jest": "^27.1.3", "ts-jest": "^27.1.3",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

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

View File

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

View File

@ -1 +1 @@
dist lib

View File

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

View File

@ -18,19 +18,23 @@
"license": "MIT", "license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)", "author": "Dan Abramov <dan.abramov@me.com> (http://github.com/gaearon)",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-log-monitor.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-log-monitor.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": "https://github.com/reduxjs/redux-devtools" "url": "https://github.com/reduxjs/redux-devtools"
}, },
"scripts": { "scripts": {
"build": "rollup -c", "build": "yarn build:cjs && yarn build:esm && yarn build:types",
"clean": "rimraf dist", "build:cjs": "babel src --extensions \".ts,.tsx\" --out-dir lib/cjs",
"build:esm": "babel src --config-file ./babel.config.esm.json --extensions \".ts,.tsx\" --out-dir lib/esm",
"build:types": "tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint . --ext .ts,.tsx", "lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -47,6 +51,7 @@
"redux-devtools-themes": "^1.0.0" "redux-devtools-themes": "^1.0.0"
}, },
"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",
@ -54,7 +59,6 @@
"@babel/preset-react": "^7.16.7", "@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7", "@babel/preset-typescript": "^7.16.7",
"@redux-devtools/core": "^3.10.1", "@redux-devtools/core": "^3.10.1",
"@rollup/plugin-babel": "^5.3.0",
"@types/react": "^17.0.38", "@types/react": "^17.0.38",
"@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0", "@typescript-eslint/parser": "^5.10.0",
@ -65,9 +69,6 @@
"react": "^17.0.2", "react": "^17.0.2",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,37 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{
file: 'dist/redux-devtools-log-monitor.cjs.js',
format: 'cjs',
},
{
file: 'dist/redux-devtools-log-monitor.esm.js',
format: 'esm',
},
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts', '.tsx'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'react',
'prop-types',
'redux-devtools-themes',
'@redux-devtools/core',
'lodash.debounce',
'react-json-tree',
],
},
];
export default config;

View File

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

View File

@ -1,2 +1,2 @@
dist
examples examples
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

@ -18,19 +18,23 @@
"license": "MIT", "license": "MIT",
"author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)", "author": "Mihail Diordiev <zalmoxisus@gmail.com> (https://github.com/zalmoxisus)",
"files": [ "files": [
"dist", "lib",
"src" "src"
], ],
"main": "dist/redux-devtools-remote.cjs.js", "main": "lib/cjs/index.js",
"module": "dist/redux-devtools-remote.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": "https://github.com/reduxjs/redux-devtools.git" "url": "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",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"prepack": "yarn run clean && yarn run build", "prepack": "yarn run clean && yarn run build",
@ -46,13 +50,12 @@
"socketcluster-client": "^14.3.2" "socketcluster-client": "^14.3.2"
}, },
"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",
"@rollup/plugin-commonjs": "^21.0.1",
"@types/jsan": "^3.1.2", "@types/jsan": "^3.1.2",
"@types/socketcluster-client": "^13.0.5", "@types/socketcluster-client": "^13.0.5",
"@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/eslint-plugin": "^5.10.0",
@ -61,9 +64,6 @@
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"redux": "^4.1.2", "redux": "^4.1.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^2.66.0",
"rollup-plugin-typescript2": "^0.31.1",
"tslib": "^2.3.1",
"typescript": "~4.5.5" "typescript": "~4.5.5"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,36 +0,0 @@
import typescript from 'rollup-plugin-typescript2';
import babel from '@rollup/plugin-babel';
const config = [
{
input: 'src/index.ts',
output: [
{
file: 'dist/redux-devtools-remote.cjs.js',
format: 'cjs',
},
{
file: 'dist/redux-devtools-remote.esm.js',
format: 'esm',
},
],
plugins: [
typescript(),
babel({
babelHelpers: 'runtime',
extensions: ['.ts'],
plugins: ['@babel/plugin-transform-runtime'],
}),
],
external: [
/@babel\/runtime/,
'jsan',
'socketcluster-client',
'@redux-devtools/utils',
'@redux-devtools/instrument',
'rn-host-detect',
],
},
];
export default config;

Some files were not shown because too many files have changed in this diff Show More