forge-struct

0.0.4 • Public • Published

Asynchronous project generator

Example from node

const Forge = require('forge-struct');

Forge.create([
  '/from_an_absolute_path/foo/subfoo/file_a.js',
  './from_a_relative_pathfoo/subfoo/file_b.js',
  '../../dir/file_b.js',
  'foo/subfoo/subsubfoo/file_c.js',
  'sample.js',
  'another_dir/empty_dir',
  {path: 'file_with_text.js', content: 'Hello !'} // Initialize a file with some content
])
.then(() => {
  console.log('Project generate');
});

Example from command line

npm install forge-struct -g

Explicit creation

forge foo/subfoo/file_a.js foo/subfoo/file_b.js foo/subfoo/subsubfoo/file_c.js sample.js another_dir/empty_dir

Implicit file creation

forge -f structure.json

With structure.json as follow

[
  "foo/subfoo/file_a.js",
  "foo/subfoo/file_b.js",
  "sample.js"
]

Package Sidebar

Install

npm i forge-struct

Weekly Downloads

0

Version

0.0.4

License

ISC

Unpacked Size

4.99 kB

Total Files

5

Last publish

Collaborators

  • karlito40