I want to go home faster
Auto generate di container and frontline mapping source based on this module
This is first version of program. So, there will be many bugs.
npm i --save-dev pekora-cli
# or
npm i -g pekora-cli
_ _ _
_ __ ___ | | __ ___ _ __ __ _ ___ | | (_)
| '_ \ / _ \ | |/ / / _ \ | '__| / _` | _____ / __| | | | |
| |_) | | __/ | < | (_) | | | | (_| | |_____| | (__ | | | |
| .__/ \___| |_|\_\ \___/ |_| \__,_| \___| |_| |_|
|_|
Usage: peko [options]
CLI for auto generate di.container.js and frontline.js
---Example---
- Generate di.container.js and frontline.js
peko -od ./sample/di.container.js -of ./sample/frontline.ts -s ./sample/**/*.js ./sample/test.js
Options:
-V, --version output the version number
-od, --output-di <string> Output path of di container (overwrite). ex) /path/to/filename.js
-of, --output-frontline <string> Output path of frontline (overwrite). ex) /path/to/filename.js
-s, --source <strings...> Directory of source. You can use wild card and mulitiple paths ex) /path/**/*.js /other/path/*.js
-h, --help display help for command
//@Autowired <-- Should mark autowired annotation so that generate in di.container.js
class Foo {
/**
* @param {Index1Controller} index1Controller <-- Should write params so that binding dependency in di.container.js
* @param {Index2Controller} index2Controller
*/
constructor(index1Controller, index2Controller) {
this.index1Controller = index1Controller;
this.index2Controller = index2Controller;
}
//@frontline <-- Should mark frontline annotation so that generate in frontline.js
bar(a, b, c) {
}
}
//@Autowired
class Foo2 {
}
//--boundary <-- If you use non-constructor class, then should mark end of class using //--boundary
npm run build
./bundle/out.js -od ./sample/di.container.js -of ./sample/frontline.ts -s ./sample/**/*.js ./sample/test.js;
npm run build:frontline