refactor(repo): use turbo + rollup + vite
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: ['@reactflow/eslint-config'],
|
||||
};
|
||||
@@ -32,7 +32,7 @@ You can find more information in our [React Flow Pro FAQs](https://pro.reactflow
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to get the latest version of React Flow is to install it via npm:
|
||||
The easiest way to get the latest version of React Flow is to install it via npm, yarn or pnpm:
|
||||
|
||||
```bash
|
||||
npm install reactflow
|
||||
@@ -63,16 +63,16 @@ function Flow({ nodes, edges, onNodesChange, onEdgesChange, onConnect }) {
|
||||
|
||||
## Development
|
||||
|
||||
Before you can start developing please make sure that you have yarn classic installed (`npm i -g yarn`). Then install the dependencies using yarn: `yarn`.
|
||||
Before you can start developing please make sure that you have [pnpm](https://pnpm.io/) installed (`npm i -g pnpm`). Then install the dependencies using pnpm: `pnpm install`.
|
||||
|
||||
For local development, you can use `yarn dev`. This will run preconstruct and build all the packages.
|
||||
For local development, you can use `pnpm dev`.
|
||||
|
||||
## Testing
|
||||
|
||||
Testing is done with cypress. You can find the tests in the [`integration/flow`](/cypress/integration/flow) folder. In order to run the tests do:
|
||||
Testing is done with cypress. You can find the tests in the [`examples/cypress`](/examples/cypress/) folder. In order to run the tests do:
|
||||
|
||||
```sh
|
||||
npm run test
|
||||
pnpm test
|
||||
```
|
||||
|
||||
## Maintainers
|
||||
@@ -92,7 +92,7 @@ You can also use our [contact form](https://pro.reactflow.dev/contact) or join t
|
||||
|
||||
## Credits
|
||||
|
||||
React Flow was initially developed for [datablocks](https://datablocks.pro), a graph-based editor for transforming, analyzing and visualizing data in your browser. Under the hood, React Flow depends on these great libraries:
|
||||
React Flow was initially developed for [datablocks](https://datablocks.pro), a graph-based editor for transforming, analyzing and visualizing data in the browser. Under the hood, React Flow depends on these great libraries:
|
||||
|
||||
- [d3-zoom](https://github.com/d3/d3-zoom) - used for zoom, pan and drag interactions with the graph canvas
|
||||
- [d3-drag](https://github.com/d3/d3-drag) - used for making the nodes draggable
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "reactflow",
|
||||
"version": "11.0.0-next.9",
|
||||
"version": "11.0.0-next.10",
|
||||
"description": "A highly customizable React library for building node-based editors and interactive flow charts",
|
||||
"keywords": [
|
||||
"react",
|
||||
@@ -13,9 +13,10 @@
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/reactflow.cjs.js",
|
||||
"module": "dist/reactflow.esm.js",
|
||||
"types": "dist/reactflow.cjs.d.ts",
|
||||
"source": "src/index.ts",
|
||||
"main": "dist/umd/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -24,10 +25,14 @@
|
||||
"directory": "packages/reactflow"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "postcss src/*.css --config ../../postcss.config.json --dir dist"
|
||||
"dev": "concurrently \"rollup --config node:@reactflow/rollup-config --watch\" pnpm:css-watch",
|
||||
"build": "rollup --config node:@reactflow/rollup-config --environment NODE_ENV:production && npm run css",
|
||||
"css": "postcss src/*.css --config ../../postcss-config/index.js --dir dist",
|
||||
"css-watch": "pnpm css --watch",
|
||||
"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@reactflow/background": "workspace:*",
|
||||
"@reactflow/controls": "workspace:*",
|
||||
"@reactflow/core": "workspace:*",
|
||||
@@ -38,12 +43,19 @@
|
||||
"react-dom": ">=18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.8",
|
||||
"postcss": "^8.4.14",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"postcss-combine-duplicated-selectors": "^10.0.3",
|
||||
"postcss-import": "^14.1.0",
|
||||
"postcss-nested": "^5.0.6",
|
||||
"tsconfig": "*"
|
||||
"@reactflow/eslint-config": "workspace:^0.0.0",
|
||||
"@reactflow/rollup-config": "workspace:*",
|
||||
"@reactflow/tsconfig": "workspace:*",
|
||||
"@types/node": "^18.7.16",
|
||||
"@types/react": "^18.0.19"
|
||||
},
|
||||
"rollup": {
|
||||
"globals": {
|
||||
"@reactflow/background": "ReactFlowBackground",
|
||||
"@reactflow/controls": "ReactFlowControls",
|
||||
"@reactflow/core": "ReactFlowCore",
|
||||
"@reactflow/minimap": "ReactFlowMinimap"
|
||||
},
|
||||
"name": "ReactFlow"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
{
|
||||
"extends": "tsconfig/react.json",
|
||||
"extends": "@reactflow/tsconfig/react.json",
|
||||
"display": "reactflow",
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["**/node_modules", "dist/*"],
|
||||
"references": [
|
||||
{ "path": "../background/tsconfig.json" },
|
||||
{ "path": "../controls/tsconfig.json" },
|
||||
{ "path": "../core/tsconfig.json" },
|
||||
{ "path": "../minimap/tsconfig.json" }
|
||||
]
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user