0.1.14 • Published 4 years ago

j2dir v0.1.14

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

j2dir

genrate files or directories by JSON

将JSON格式转化为相对路径下的目录和并使用模板文件来补全相应文件

找不到模板文件时,将自动产生空字节文件

config.js 设置模板文件目录

Build Stat Coverage Status

NPM

Standard - JavaScript Style Guide


npm install j2dir


co(function*(){
  yield waitFill(db)
  let inObj = {
    'out': {
      'www': {
        'index.html': null,
        'css': {
          'c1': {
            'WT.css': null
          },
          'c2': {}
        },
        'js': {},
        'img': {},
        'fonts': {}
      },
      'router': {},
      'tests': {},
      'models': {}
    }
  }
  let baseDir = [__dirname]
  let outObj = yield gen.genDir(inObj, baseDir, {'templateDir': 'tools'}) //模板所在目录
  gen.printDir(baseDir, outObj)
})
0.1.11

4 years ago

0.1.12

4 years ago

0.1.13

4 years ago

0.1.14

4 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago