Browse Source

feat: builder init

master
suanmei 5 years ago
committed by 拾邑
parent
commit
a6da945571
  1. 3
      packages/builder/.babelrc
  2. 2
      packages/builder/.npmignore
  3. 4
      packages/builder/README.md
  4. 2095
      packages/builder/package-lock.json
  5. 54
      packages/builder/package.json
  6. 16
      packages/builder/rollup.config.js
  7. 2
      packages/builder/scripts/prepublishOnly.js
  8. 30
      packages/builder/src/index.tsx
  9. 7
      packages/builder/tsconfig.json
  10. 1
      packages/builder/types/editor.d.ts
  11. 0
      packages/transform/index.ts
  12. 32
      packages/transform/package.json

3
packages/builder/.babelrc

@ -0,0 +1,3 @@
{
"extends": "../../.babelrc"
}

2
packages/builder/.npmignore

@ -0,0 +1,2 @@
node_modules
src

4
packages/transform/README.md → packages/builder/README.md

@ -1,11 +1,11 @@
# `transform`
# `builder`
> TODO: description
## Usage
```
const transform = require('transform');
const builder = require('builder');
// TODO: DEMONSTRATE API
```

2095
packages/builder/package-lock.json

File diff suppressed because it is too large

54
packages/builder/package.json

@ -0,0 +1,54 @@
{
"name": "@imove/builder",
"version": "0.1.10",
"description": "build cells for your flow",
"keywords": [
"react-monaco-editor",
"json-schema"
],
"author": "suanmei <mr_suanmei@163.com>",
"homepage": "https://github.com/suanmei/iMove#readme",
"license": "MIT",
"main": "dist/core.common.js",
"module": "dist/core.esm.js",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"publishConfig": {
"registry": "http://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/suanmei/iMove.git"
},
"scripts": {
"prepublishOnly": "node scripts/prepublishOnly.js",
"declare-type": "tsc --emitDeclarationOnly",
"build": "rollup -c & npm run declare-type",
"watch": "watch 'npm run build' ./src"
},
"bugs": {
"url": "https://github.com/suanmei/iMove/issues"
},
"devDependencies": {
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"@types/react": "^16.9.34",
"antd": "^4.1.5",
"json-schema-editor-visual": "^1.1.1",
"react": "^16.13.1",
"rollup": "^2.7.3",
"watch": "^1.0.2"
},
"peerDependencies": {
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"antd": "^4.1.5",
"json-schema-editor-visual": "^1.1.1",
"react": "^16.13.1"
}
}

16
packages/builder/rollup.config.js

@ -0,0 +1,16 @@
import rollupBaseConfig from '../../rollup.config';
import pkg from './package.json';
export default Object.assign(rollupBaseConfig, {
output: [
{
file: pkg.main,
format: 'cjs',
},
{
file: pkg.module,
format: 'es',
},
],
external: Object.keys(pkg.peerDependencies).concat(/^antd\//),
});

2
packages/transform/scripts/prepublishOnly.js → packages/builder/scripts/prepublishOnly.js

@ -3,4 +3,4 @@
const path = require('path');
const prePublish = require('../../../scripts/prepublish');
prePublish('@imove/transform', path.join(__dirname, '../'));
prePublish('@imove/builder', path.join(__dirname, '../'));

30
packages/builder/src/index.tsx

@ -0,0 +1,30 @@
import * as React from 'react';
import { Form, Input } from 'antd';
import schemaEditor from 'json-schema-editor-visual';
const SchemaEditor = schemaEditor({});
const { Item } = Form;
const Builder: React.FC<{}> = () => {
const labelCol = { span: 7 };
return (
<div>
<Form labelCol={labelCol}>
<Item label="元件名称" name="name">
<Input />
</Item>
<Item label="元件描述" name="name">
<Input />
</Item>
<Item label="元件描述" name="name">
<Input />
</Item>
{/* <SchemaEditor /> */}
</Form>
</div>
);
};
export default Builder;

7
packages/builder/tsconfig.json

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

1
packages/builder/types/editor.d.ts

@ -0,0 +1 @@
declare module 'json-schema-editor-visual';

0
packages/transform/index.ts

32
packages/transform/package.json

@ -1,32 +0,0 @@
{
"name": "@imove/transform",
"version": "0.1.10",
"description": "transform graph to schema",
"keywords": [
"json-schema"
],
"author": "suanmei <mr_suanmei@163.com>",
"homepage": "https://github.com/suanmei/iMove#readme",
"license": "MIT",
"main": "dist/transform.common.js",
"directories": {
"lib": "lib",
"test": "__tests__"
},
"files": [
"lib"
],
"publishConfig": {
"registry": "http://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/suanmei/iMove.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/suanmei/iMove/issues"
}
}
Loading…
Cancel
Save