Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/legoflow/project
https://github.com/legoflow/project
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/legoflow/project
- Owner: legoflow
- License: mit
- Created: 2018-04-23T01:26:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T01:34:20.000Z (almost 6 years ago)
- Last Synced: 2024-10-11T23:19:01.421Z (about 1 month ago)
- Language: CSS
- Homepage:
- Size: 302 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Project
项目模块## 作用
创建 LegoFlow 项目脚手架模块
## 安装
```shell
npm i legoflow-project --save
```## 使用
```js
const newProject = require('legoflow-project')(async () => {
const result = await newProject()if ( typeof result === 'string' ) {
console.error (result)
} else {
console.log('success', result)
}
})
```传入配置参数选项为:
名称 | 类型 | 默认值 | 备注
-----|------- | -----|-------
name | String | null | 项目名称
type | String | null | 项目类型,可选值 `pc` / `mobile` / `vue`
version | String | null | 版本号
path | String | null | 创建的绝对路径 |
isESNext | Boolean | true | 是否对 JS 进行 ES.Next 语法编译
isSourcePath | Boolean | false | 是否作为源路径,若为 `true`,则项目路径下直接作为项目路径,不单独创建以项目名称的文件夹
gitSourcePath | String | null | Git 资源地址作为新建模块## GitSroucePath
例子:
```sh
lf init --git=https://github.com/legoflow/legoflow-template-test.git
```## 许可
[MIT](./LICENSE)