-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
100 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const { argv } = require('yargs') | ||
.option('input', { | ||
alias: 'i', | ||
describe: 'path to your sources directory', | ||
type: 'string', | ||
demandOption: true | ||
}) | ||
.option('output', { | ||
alias: 'o', | ||
describe: 'path to the file that will be generated', | ||
type: 'string', | ||
demandOption: true | ||
}); | ||
|
||
const log = require('./lib/utils/lllog-wrapper'); | ||
const { YmlBuilder } = require('./lib'); | ||
|
||
(async () => { | ||
|
||
const { input, output } = argv; | ||
|
||
const ymlBuilder = new YmlBuilder(input, output); | ||
|
||
try { | ||
|
||
await ymlBuilder.execute(); | ||
|
||
log.confirm('Operation completed successfully', '✓ YML-BUILDER'); | ||
|
||
process.exit(0); | ||
|
||
} catch(error) { | ||
|
||
log.error(error.message, 'Operation failed', '⨯ YML-BUILDER'); | ||
|
||
process.exit(1); | ||
} | ||
|
||
})(); | ||
module.exports = YmlBuilder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const { argv } = require('yargs') | ||
.option('input', { | ||
alias: 'i', | ||
describe: 'path to your sources directory', | ||
type: 'string', | ||
demandOption: true | ||
}) | ||
.option('output', { | ||
alias: 'o', | ||
describe: 'path to the file that will be generated', | ||
type: 'string', | ||
demandOption: true | ||
}); | ||
|
||
const log = require('./lib/utils/lllog-wrapper'); | ||
const YmlBuilder = require('./index'); | ||
|
||
(async () => { | ||
|
||
const { input, output } = argv; | ||
|
||
const ymlBuilder = new YmlBuilder(input, output); | ||
|
||
try { | ||
|
||
await ymlBuilder.execute(); | ||
|
||
log.confirm('Operation completed successfully', '✓ YML-BUILDER'); | ||
|
||
process.exit(0); | ||
|
||
} catch(error) { | ||
|
||
log.error(error.message, 'Operation failed', '⨯ YML-BUILDER'); | ||
|
||
process.exit(1); | ||
} | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters