open-index/open-npm huggingface dataset:
npm package: @iceworks/dsl2code
Description: iceworks dsl to code library
Latest version: 4.1.2-alpha.0

# 搭建协议转源码包

鉴于 iceluna 的 schema 转源码包([iceluna-compiler](https://gitlab.alibaba-inc.com/iceluna/iceluna-compiler))功能尚不完善，且是基于旧版搭建协议，因此 iceworks 拷贝 iceluna-compiler 源代码进行修改，未来待 iceluna 的包功能完善后切回 iceluna 包。

## Usage

```
import compile from '@iceworks/dsl2code';
import dsl from './dsl.js'; // 基于 iceluna 搭建协议的 schema
import componentsMap from './componentsMap.js'; // 所有物料的配置信息

/**
 * 返回数据格式
 * [
 *  {
 *    name: 'index.jsx', // 文件名
 *    value: 'import React, {Component} from "react";...' // 文件源码
 *  },
 *  {
 *    ...
 *  }
 * ]
*/
const files = compile(dsl, componentsMap);

```
## Debug

进入 examples 目录

 ```
 tnpm install
 npm start
 ```

## Publish

 ```
 tnpm publish
 ```
npm package: @iceworks/eslint-plugin-security-practices
Description: Iceworks doctor security practices eslint plugin.
Latest version: 0.1.5

# @iceworks/eslint-plugin-security-practices

Iceworks doctor security practices eslint plugin.

## Installation

Install [esLint](http://eslint.org), `@ice/spec` and `@iceworks/eslint-plugin-security-practices`:

```shell
$ npm install --save-dev eslint @ice/spec @iceworks/eslint-plugin-security-practices
```

## Usage

Add `security-practices` to the plugins section of your `.eslintrc` configuration file. 

```json
{
    "plugins": [
        "@iceworks/security-practices"
    ]
}
```

Then configure the rules you want to use under the rules section.

```json
{
 		"plugins": [
        "@iceworks/security-practices"
    ],
    "rules": {
        "@iceworks/security-practices/rule-name": 2
    }
}
```

Or you can only use extends to set default rules config.

```json
{
    "extends": ["plugin:@iceworks/security-practices/recommended"]
};
```

## Supported Rules

* [`no-http-url`](./docs/rules/no-http-url.md) Recommended the http url switch to HTTPS.
* [`no-internal-url`](./docs/rules/no-internal-url.md) The group internal url is not recommended.
* [`no-patent-licenses`](./docs/rules/no-patent-licenses.md) Recommend using the dependency with Open-Source license.
* [`no-secret-info`](./docs/rules/no-secret-info.md) Don't show `password` `token` and `secret` in plain text.
* [`no-sensitive-word`](./docs/rules/no-sensitive-word.md) Don't use some sensitive word.
npm package: @iceworks/generate-material
Description: Generate material collection or single component
Latest version: 1.1.1

# generate-material

根据[物料模板](https://github.com/ice-lab/material-templates)生成物料（业务组件/区块/项目模板）初始化目录。

## 使用

```js
import { downloadMaterialTemplate, generateMaterial } from '@iceworks/generate-material';

const materialTemplateDir = __dirname;

await downloadMaterialTemplate(materialTemplateDir, '@icedesign/ice-react-material-template', registry);
await generateMaterial({
  rootDir: projectDir,
  materialTemplateDir,
  materialType: 'component',
  templateOptions: {
    npmName: '@ali/ice-label',
    adaptor: true,
  },
  enableDefPublish: true,
  enablePegasus: true,
});
```
npm package: @iceworks/generate-project
Description: Generator project
Latest version: 2.0.5

# generate-project

根据[模板](https://github.com/ice-lab/react-materials/tree/master/scaffolds)生成项目初始化目录。

## 使用

```js
import { downloadAndGenerateProject } from '@iceworks/generate-project';

await downloadAndGenerateProject(
  projectDir,
  scaffoldNpmName,
  {
    version,
    registry,
    extraDependencies,
    ejsOptions,
  }
);
```