NOTE: This was made before Yeoman came out. I suggest you use that instead. Simple archetype system for Node.js.
APACHE-2.0 License
archie is a simple archetype system for Node.js. archie takes an archetype (essentially a folder), filters the files by replacing variables with specified values, and puts it in a new folder.
This module was greatly inspired by Apache Maven. If you do anything on the JVM, check it out. It's holy.
npm install -g archie
archie gen -a simple -n myproject
This should create a new directory named myproject
containing some files.
This project is based off a direct clone from [https://github.com/simplyianm/node-simple-archetype].
A list of archetypes currently supported can be found in the archetypes
directory.
To use an archetype, simply type its file name minus the .json
at the end.
archie gen -a [archetype] -n [name] --arg1 ...
Type archie gen
for help.
var archetype = require('archetype')
archetype.generateFromDir('path/to/archetype/dir', 'path/to/destination/dir', {
var1: value,
"var 2": value
});
Destination dir does not have to be created beforehand. It should be empty, however, or files present in the directory will be overwritten.
archie is released under the Apache license version 2. See LICENSE.txt for more details.
© 2012 Ian Macalinao [email protected]