mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 22:19:48 +03:00
Use rollup for redux-devtools-dock-monitor
This commit is contained in:
parent
1c3b04f57e
commit
3366c82fdc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
["@babel/preset-env", { "targets": "defaults" }],
|
||||
"@babel/preset-react",
|
||||
"@babel/preset-typescript"
|
||||
]
|
||||
|
|
|
@ -1 +1 @@
|
|||
lib
|
||||
dist
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
module.exports = {
|
||||
extends: '../../eslintrc.ts.react.base.json',
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
extends: '../../eslintrc.js.base.json',
|
||||
overrides: [
|
||||
{
|
||||
files: ['.ts', 'tsx'],
|
||||
extends: '../../eslintrc.ts.react.base.json',
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -21,9 +21,9 @@ For example, you can use it together with [`LogMonitor`](https://github.com/redu
|
|||
```js
|
||||
import React from 'react';
|
||||
import { createDevTools } from '@redux-devtools/core';
|
||||
import LogMonitor from '@redux-devtools/log-monitor';
|
||||
import SliderMonitor from '@redux-devtools/slider-monitor';
|
||||
import DockMonitor from '@redux-devtools/dock-monitor';
|
||||
import { LogMonitor } from '@redux-devtools/log-monitor';
|
||||
import { SliderMonitor } from '@redux-devtools/slider-monitor';
|
||||
import { DockMonitor } from '@redux-devtools/dock-monitor';
|
||||
|
||||
export default createDevTools(
|
||||
<DockMonitor
|
||||
|
|
|
@ -21,35 +21,37 @@
|
|||
"lib",
|
||||
"src"
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"main": "dist/redux-devtools-dock-monitor.cjs.js",
|
||||
"module": "dist/redux-devtools-dock-monitor.esm.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/reduxjs/redux-devtools.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn run build:types && yarn run build:js",
|
||||
"build:types": "tsc --emitDeclarationOnly",
|
||||
"build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
|
||||
"clean": "rimraf lib",
|
||||
"build": "rollup -c",
|
||||
"clean": "rimraf dist",
|
||||
"lint": "eslint . --ext .ts,.tsx",
|
||||
"type-check": "tsc --noEmit",
|
||||
"prepack": "yarn run clean && yarn run build",
|
||||
"prepublish": "yarn run type-check && yarn run lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@types/prop-types": "^15.7.4",
|
||||
"parse-key": "^0.2.1",
|
||||
"prop-types": "^15.8.0",
|
||||
"react-dock": "^0.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.16.7",
|
||||
"@babel/core": "^7.16.7",
|
||||
"@babel/eslint-parser": "^7.16.5",
|
||||
"@babel/plugin-transform-runtime": "^7.16.7",
|
||||
"@babel/preset-env": "^7.16.7",
|
||||
"@babel/preset-react": "^7.16.7",
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
"@redux-devtools/core": "^3.9.2",
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@types/parse-key": "^0.2.0",
|
||||
"@types/react": "^17.0.38",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
|
@ -61,6 +63,9 @@
|
|||
"react": "^17.0.2",
|
||||
"redux": "^4.1.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.63.0",
|
||||
"rollup-plugin-typescript2": "^0.31.1",
|
||||
"tslib": "^2.3.1",
|
||||
"typescript": "~4.5.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
|
29
packages/redux-devtools-dock-monitor/rollup.config.js
Normal file
29
packages/redux-devtools-dock-monitor/rollup.config.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
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;
|
|
@ -1,6 +1,6 @@
|
|||
import React, { cloneElement, Children, Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Dock from 'react-dock';
|
||||
import { Dock } from 'react-dock';
|
||||
import { Action, Dispatch } from 'redux';
|
||||
import { LiftedState, Monitor } from '@redux-devtools/core';
|
||||
import { POSITIONS } from './constants';
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
import DockMonitor from './DockMonitor';
|
||||
export default DockMonitor;
|
||||
export { default as DockMonitor } from './DockMonitor';
|
||||
|
|
|
@ -4766,12 +4766,15 @@ __metadata:
|
|||
version: 0.0.0-use.local
|
||||
resolution: "@redux-devtools/dock-monitor@workspace:packages/redux-devtools-dock-monitor"
|
||||
dependencies:
|
||||
"@babel/cli": ^7.16.7
|
||||
"@babel/core": ^7.16.7
|
||||
"@babel/eslint-parser": ^7.16.5
|
||||
"@babel/plugin-transform-runtime": ^7.16.7
|
||||
"@babel/preset-env": ^7.16.7
|
||||
"@babel/preset-react": ^7.16.7
|
||||
"@babel/preset-typescript": ^7.16.7
|
||||
"@babel/runtime": ^7.16.7
|
||||
"@redux-devtools/core": ^3.9.2
|
||||
"@rollup/plugin-babel": ^5.3.0
|
||||
"@types/parse-key": ^0.2.0
|
||||
"@types/prop-types": ^15.7.4
|
||||
"@types/react": ^17.0.38
|
||||
|
@ -4787,6 +4790,9 @@ __metadata:
|
|||
react-dock: ^0.4.2
|
||||
redux: ^4.1.2
|
||||
rimraf: ^3.0.2
|
||||
rollup: ^2.63.0
|
||||
rollup-plugin-typescript2: ^0.31.1
|
||||
tslib: ^2.3.1
|
||||
typescript: ~4.5.4
|
||||
peerDependencies:
|
||||
"@redux-devtools/core": ^3.7.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user