0.1.14 • Published 5 years ago

j2dir v0.1.14

Weekly downloads
2
License
MIT
Repository
github
Last release
5 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

5 years ago

0.1.12

5 years ago

0.1.13

5 years ago

0.1.14

5 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago