# star_dahuiyi3

> ```Javascript const fs = require('fs'); const path = require('path');

Latest version **1.0.0** (published 2021-03-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install star_dahuiyi3
pnpm add star_dahuiyi3
yarn add star_dahuiyi3
bun add star_dahuiyi3
```

Provides the command `dhy_init`.

## 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.0.0 |
| Published | 2021-03-24 |
| First published | 2021-03-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dahuiyi |

## Links

- npm: https://www.npmjs.com/package/star_dahuiyi3
- npm.io page: https://npm.io/package/star_dahuiyi3

## Dependencies (2)

- [inquirer](https://npm.io/package/inquirer.md) ^8.0.0
- [commander](https://npm.io/package/commander.md) ^7.2.0

## Recent versions

- 1.0.0 (latest) — 2021-03-24

## README

```Javascript
const fs = require('fs');
const path = require('path');

const toDir=(dir)=>{
    // 读取对应json的文件，根据内容创建对应的项目目录
    let data=fs.readFileSync(dir,'utf-8');
    fs.mkdirSync(JSON.parse(data).dirname)
    // console.log(src)
    // console.log(JSON.parse(data).children)
    JSON.parse(data).children.forEach(item => {
        // 正确获取命令行参数，并且对参数进行容错处理
        if(item.dirname){
            fs.mkdirSync(JSON.parse(data).dirname+'/'+item.dirname)
        }
        // 正确获取命令行参数，并且对参数进行容错处理
        if(item.children){
            item.children.forEach(v =>{
                //
                fs.writeFileSync(JSON.parse(data).dirname+'/'+item.dirname+'/'+v.filename,'')
            })
        }
    });

}
toDir('./list.json')
```

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