# @skywork/sep

> > sep 迁移至 cnpm > Rollup+React+Antd components library（private）.

Latest version **1.2.22** (published 2020-01-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install @skywork/sep
pnpm add @skywork/sep
yarn add @skywork/sep
bun add @skywork/sep
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.22 |
| Published | 2020-01-03 |
| First published | 2018-10-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 746.7 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | clock |
| Maintainers | clock |

## Links

- npm: https://www.npmjs.com/package/@skywork/sep
- Repository: https://git.elenet.me/ele-newretail/xfe_commodity/Sep
- npm.io page: https://npm.io/package/@skywork/sep

## Dependencies (16)

- [qs](https://npm.io/package/qs.md) ^6.6.0
- [antd](https://npm.io/package/antd.md) 3.7.0
- [axios](https://npm.io/package/axios.md) ^0.18.0
- [react](https://npm.io/package/react.md) ^16.8.4
- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [react-dnd](https://npm.io/package/react-dnd.md) ^3.0.2
- [react-dom](https://npm.io/package/react-dom.md) ^16.8.4
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [braft-utils](https://npm.io/package/braft-utils.md) ^3.0.10
- [object.omit](https://npm.io/package/object.omit.md) ^3.0.0
- [@types/react](https://npm.io/package/@types/react.md) ^16.8.7
- [braft-editor](https://npm.io/package/braft-editor.md) ^2.3.7
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^16.8.2
- [@types/prop-types](https://npm.io/package/@types/prop-types.md) ^15.7.0
- [react-dnd-html5-backend](https://npm.io/package/react-dnd-html5-backend.md) ^7.2.0

## Recent versions

- 1.2.22 (latest) — 2020-01-03
- 1.2.21 — 2019-10-18
- 1.2.20 — 2019-10-18
- 1.2.19 — 2019-10-12
- 1.2.18 — 2019-10-12
- 1.2.17 — 2019-10-12
- 1.2.16 — 2019-10-12
- 1.2.15 — 2019-10-12
- 1.2.14 — 2019-09-19
- 1.2.13 — 2019-09-19
- 1.2.12 — 2019-09-12
- 1.2.11 — 2019-07-04
- 1.2.10 — 2019-07-04
- 1.2.9 — 2019-07-02
- 1.2.8 — 2019-06-11
- … 9 more at https://npm.io/package/@skywork/sep/versions

## README

# Sep

> sep 迁移至 cnpm
> Rollup+React+Antd components library（private）.

# Use of Sep

### Sep's source code

First, absolutely run `npm i`.

And then, if you want to get in develop mode, simply run `npm run dev`, this will start storybook to let you overview components. if things goes well, you command line shows information below:

```bash
> sep@1.1.0 dev /usr/local/var/www/Ele/Sep
> start-storybook -p 9001 -c .storybook

info @storybook/react v3.4.11
info
info => Loading custom webpack config (full-control mode).
webpack built 9962dede4114cdd8e152 in 8764ms
info Storybook started on => http://localhost:9001/
info
```

Then open your browser and jump to http://localhost:9001/, and you can see a webpage like this:

![pic](readme_assets/img/storybook.png)

if you are developing a new component, modify src/components/stories.js and add your component here, then you will see you component shows on the webpage above.

For more information about storybook, please jump to [storybook](https://storybook.js.org/basics/introduction/).

After a component completed, run `npm run build` and this will create a `sep` folder in root of Sep. The `sep` is what we are going to publish to npm, and what we are going to import to our project.

### Sep's dist code

1. npm i -S @skywork/sep
2. npm i -D babel-plugin-import
3. .babelrc or babel-loader option

```javascript
// if you are using antd as well, option is an array
"plugins": [
    [
      "import",
      [
        { "libraryName": "antd", "style": true },
        {
          "libraryName": "sep",
          "libraryDirectory": "es",
          "style": true
        }
      ]
    ]
  ]
// if you only use sep, option is an object
"plugins": [
    [
      "import",
        {
          "libraryName": "sep",
          "libraryDirectory": "es",
          "style": true
        }
    ]
  ]
```

## How to develop

### Rules

1. Nameing a component's folder should be all lower-case, and split the words with '-'. For example, a component's name is nav list, we should name the folder as 'nav-list', but the component class, we take `Hungarian notation`, like we name the nav list as NavList.

2. A component class should have to define its props and state interface.

3. A component class should define its propTypes with 'prop-types'.

4. Class names should composed with 'classnames' if it is complex. If a class name is composed with multiple class names, or a class name is dynamic, we call it complex.

5. A component's class name should have a prefix, the prefix defined in defaultProps of the class, naming `prefixCls`.

6. Common styles defined in src/components/style, witch containing color and themes folder. We usually modify themes/default.less witch defines Base styles for most components and Border color and every component's own style and so on, and themes/default.less takes colors from color/colors.less.

## How to publish in local & use it

1. Download the docker
2. Docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
3. Nrm use verdaccio
4. Npm run build
5. Cd sep
6. Change sep version
7. Npm publish
8. Check publish successed or not in your verdaccio network
9. Update the '@skywork/sep' in your project

---
_Source: https://npm.io/package/@skywork/sep · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
