Skip to content

Commit

Permalink
feat: standalone version of this lib
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #89
  • Loading branch information
leonardoanalista committed May 13, 2019
1 parent eee6212 commit 451a0e8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cz-config-EXAMPLE.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix'],
// skip any questions you want
skipQuestions: ['body', 'footer'],
skipQuestions: ['body'],

// limit subject length
subjectLimit: 100,
Expand Down
19 changes: 19 additions & 0 deletions standalone.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env node

const { execSync } = require('child_process');
const inquirer = require('inquirer');

const app = require('./index');
const log = require('./logger');

log.info('cz-customizable standalone version');

const commit = commitMessage => {
try {
execSync(`git commit -m "${commitMessage}"`, { stdio: [0, 1, 2] });
} catch (error) {
log.error('>>> ERROR', error.error);
}
};

app.prompter(inquirer, commit);

0 comments on commit 451a0e8

Please sign in to comment.