Total Complexity | 2 |
Complexity/F | 0 |
Lines of Code | 16 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | const path = require('path'); |
||
2 | |||
3 | const current_path = process.cwd() + '/'; |
||
4 | |||
5 | const plugin_name = process.argv.length >= 2 ? process.argv[2] : false; |
||
6 | |||
7 | if( ! plugin_name ){ |
||
8 | console.error( '\x1b[31m%s\x1b[0m', 'Error: You must enter a plugin name'); |
||
9 | return; |
||
10 | } |
||
11 | const Plugin_Generator = require( path.join( current_path, 'inc', 'Plugin_Generator.js' ) ); |
||
12 | |||
13 | const plugin = new Plugin_Generator( plugin_name ); |
||
14 | |||
15 | |||
16 | plugin.generate(); |
||
17 | //End of file |
||
18 |