-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlazy.js
More file actions
executable file
·28 lines (22 loc) · 886 Bytes
/
lazy.js
File metadata and controls
executable file
·28 lines (22 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env node
/*jshint esversion: 6 */
'use strict';
const fs = require('fs');
const program = require('commander');
const cwd = process.cwd();
const version = '0.3.0';
console.log(`\n [Lazy] Version ${version}`);
console.log(`\n Checking lazy configuration...`);
console.log(` Current Directory: ${cwd}`);
if (fs.existsSync(`${cwd}/.lazy`)) {
console.log(` Lazy project folder found, ready to generate your templates ;)`);
} else {
console.log(` Lazy project folder not found, please execute: lazy init`);
}
console.log(); // to add new empty line in the console.
program
.version(version)
.command('init', 'Create a lazy template engine project for the current folder')
.command('generate [template]', 'Generate files from a template').alias('g')
.command('list', 'List all your templates for the current folder').alias('l');
program.parse(process.argv);