Browse Source

feat: modify running exampke method

master
smallstonesk 4 years ago
parent
commit
203506cb1e
  1. 17
      example/package.json
  2. 2
      example/src/pages/index.tsx
  3. 2
      packages/core/tsconfig.json

17
example/package.json

@ -0,0 +1,17 @@
{
"scripts": {
"start": "umi dev",
"build": "umi build",
"postinstall": "umi generate tmp"
},
"dependencies": {
"@ant-design/pro-layout": "^6.5.0",
"@imove/core": "^0.3.8",
"@umijs/preset-react": "1.x",
"umi": "^3.3.7"
},
"devDependencies": {
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0"
}
}

2
example/src/pages/index.tsx

@ -1,5 +1,5 @@
import * as React from 'react'; import * as React from 'react';
import IMove from '../../../packages/core/dist/core.esm.js'; import IMove from '@imove/core';
const onSave = (data: { nodes: any; edges: any }): void => { const onSave = (data: { nodes: any; edges: any }): void => {
console.log(data); console.log(data);

2
packages/core/tsconfig.json

@ -1,7 +1,7 @@
{ {
"extends": "../../tsconfig", "extends": "../../tsconfig",
"compilerOptions": { "compilerOptions": {
"target": "ESNext", "target": "ES2015",
"outDir": "dist/types", "outDir": "dist/types",
"jsx": "react", "jsx": "react",
"esModuleInterop": true "esModuleInterop": true

Loading…
Cancel
Save