feat:项目初始化

This commit is contained in:
下羊 2020-02-24 21:30:20 +08:00
parent 7496109d22
commit 77928102fd
15 changed files with 199 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# 忽略目录
build/
node_modules/
**/*-min.js
**/*.min.js
coverage/

View File

@ -0,0 +1,5 @@
const { eslint, deepmerge } = require('@ice/spec');
module.exports = deepmerge(eslint, {
rules: {},
});

22
packages/editor-framework/.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
node_modules/
# production
build/
dist/
tmp/
lib/
# misc
.idea/
.happypack
.DS_Store
*.swp
*.dia~
npm-debug.log*
yarn-debug.log*
yarn-error.log*
CHANGELOG.md

View File

@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": true,
"printWidth": 120,
"trailingComma": "all"
}

View File

@ -0,0 +1,11 @@
# demo component
t-s-demo
intro component
## API
| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
| ------ | ---- | ---- | ---- | ------ | ---- |
| | | | | | |

View File

@ -0,0 +1,9 @@
{
"plugins": [
"build-plugin-component",
"build-plugin-fusion",
["build-plugin-moment-locales", {
"locales": ["zh-cn"]
}]
]
}

View File

@ -0,0 +1,26 @@
---
title: Simple Usage
order: 1
---
本 Demo 演示一行文字的用法。
````jsx
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Demo from 'editor-framework';
class App extends Component {
render() {
return (
<div>
<Demo />
</div>
);
}
}
ReactDOM.render((
<App />
), mountNode);
````

View File

@ -0,0 +1,7 @@
/// <reference types="react" />
declare function TSDemo(props: any): JSX.Element;
declare namespace TSDemo {
var propTypes: {};
var defaultProps: {};
}
export default TSDemo;

View File

@ -0,0 +1,13 @@
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import * as React from 'react';
export default function TSDemo(props) {
var type = props.type,
others = _objectWithoutPropertiesLoose(props, ["type"]);
return React.createElement("div", _extends({
className: "TSDemo"
}, others), "Hello TSDemo");
}
TSDemo.propTypes = {};
TSDemo.defaultProps = {};

View File

@ -0,0 +1,4 @@
/* write style here */
.TSDemo {
}

View File

@ -0,0 +1 @@
import './index.scss';

View File

@ -0,0 +1,49 @@
{
"name": "editor-framework",
"version": "0.0.1",
"description": "alibaba lowcode editor framework",
"files": [
"demo/",
"es/",
"lib/",
"build/"
],
"main": "lib/index.js",
"module": "es/index.js",
"stylePath": "style.js",
"scripts": {
"start": "build-scripts start",
"build": "build-scripts build",
"prepublishOnly": "npm run prettier && npm run build",
"lint": "eslint --cache --ext .js,.jsx ./",
"prettier": "prettier --write \"./src/**/*.{ts,tsx,js,jsx,ejs,less,css,scss,json}\" "
},
"keywords": [
"lowcode",
"editor"
],
"author": "xiayang.xy",
"dependencies": {
"prop-types": "^15.5.8"
},
"devDependencies": {
"@alib/build-scripts": "^0.1.3",
"@alifd/next": "1.x",
"@ice/spec": "^0.1.1",
"@types/react": "^16.9.13",
"@types/react-dom": "^16.9.4",
"build-plugin-component": "^0.2.0",
"build-plugin-fusion": "^0.1.0",
"build-plugin-moment-locales": "^0.1.0",
"eslint": "^6.0.1",
"prettier": "^1.19.1",
"react": "^16.3.0",
"react-dom": "^16.3.0"
},
"peerDependencies": {
"react": "^16.3.0",
"@alifd/next": "1.x"
},
"license": "MIT",
"homepage": "https://unpkg.com/editor-framework@0.0.1/build/index.html"
}

View File

@ -0,0 +1,4 @@
/* write style here */
.TSDemo {
}

View File

@ -0,0 +1,15 @@
import * as React from 'react';
export default function TSDemo(props) {
const { type, ...others } = props;
return (
<div className="TSDemo" {...others}>Hello TSDemo</div>
);
}
TSDemo.propTypes = {
};
TSDemo.defaultProps = {
};

View File

@ -0,0 +1,21 @@
{
"compileOnSave": false,
"buildOnSave": false,
"compilerOptions": {
"outDir": "build",
"module": "esnext",
"target": "es6",
"jsx": "react",
"moduleResolution": "node",
"lib": ["es6", "dom"],
"sourceMap": true,
"allowJs": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"skipLibCheck": true
},
"include": ["src/*.ts", "src/*.tsx"],
"exclude": ["node_modules", "build", "public"]
}