File tree Expand file tree Collapse file tree 18 files changed +26
-27
lines changed Expand file tree Collapse file tree 18 files changed +26
-27
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ node_modules/
2
2
.tmp /
3
3
coverage /
4
4
artifacts /
5
- npm-debug.log
5
+ /dist
6
+ npm-debug.log
Original file line number Diff line number Diff line change
1
+ /meta
2
+ /src
3
+ /test
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
- require ( "babel/register" ) ( {
4
- ignore : / n o d e _ m o d u l e s \/ (? ! c o m m i t i z e n ) /
5
- } ) ;
6
- require ( './commitizen.js' ) ;
3
+ require ( './commitizen.js' ) ;
Original file line number Diff line number Diff line change 1
1
2
- require ( '../src /cli/commitizen.js' ) . bootstrap ( ) ;
2
+ require ( '../dist /cli/commitizen.js' ) . bootstrap ( ) ;
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
3
- require ( "babel/register" ) ( {
4
- ignore : / n o d e _ m o d u l e s \/ (? ! c o m m i t i z e n ) /
5
- } ) ;
6
- require ( './git-cz.js' ) ;
3
+ require ( './git-cz.js' ) ;
Original file line number Diff line number Diff line change 1
- require ( "babel/register" ) ;
2
1
var path = require ( 'path' ) ;
3
- require ( '../src /cli/git-cz.js' ) . bootstrap ( {
2
+ require ( '../dist /cli/git-cz.js' ) . bootstrap ( {
4
3
cliPath : path . join ( __dirname , '../' )
5
- } ) ;
4
+ } ) ;
Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"check-coverage" : " istanbul check-coverage --statements 80 --branches 80 --functions 80 --lines 80 " ,
8
8
"commit" : " git-cz" ,
9
+ "build" : " babel src --out-dir dist" ,
10
+ "build:watch" : " babel --watch src --out-dir dist" ,
11
+ "prepublish" : " npm run build" ,
9
12
"report-coverage" : " cat ./coverage/lcov.info | codecov" ,
10
13
"semantic-release" : " semantic-release pre && npm publish && semantic-release post" ,
11
14
"start" : " npm run test:watch" ,
Original file line number Diff line number Diff line change 1
1
import minimist from 'minimist' ;
2
2
3
- import { isString , isArray } from '../../../ common/util' ;
3
+ import { isString , isArray } from '../../common/util' ;
4
4
5
5
export {
6
6
parse
Original file line number Diff line number Diff line change 1
1
import minimist from 'minimist' ;
2
2
3
- import { isString , isArray } from '../../../ common/util' ;
3
+ import { isString , isArray } from '../../common/util' ;
4
4
5
5
export {
6
6
parse
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import fs from 'fs';
2
2
import path from 'path' ;
3
3
import sh from 'shelljs' ;
4
4
import inquirer from 'inquirer' ;
5
- import { getParsedPackageJsonFromPath } from '../../../ common/util' ;
5
+ import { getParsedPackageJsonFromPath } from '../../common/util' ;
6
6
import { gitCz as gitCzParser , commitizen as commitizenParser } from '../parsers' ;
7
7
import { commit , staging , adapter } from '../../commitizen' ;
8
8
import { addPath } from '../../git' ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import path from 'path';
2
2
import fs from 'fs' ;
3
3
import findNodeModules from 'find-node-modules' ;
4
4
5
- import { isFunction } from '../../ common/util' ;
5
+ import { isFunction } from '../common/util' ;
6
6
7
7
export {
8
8
addPathToAdapterConfig ,
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
2
import * as configLoader from './configLoader' ;
3
- import { executeShellCommand } from '../../ common/util' ;
3
+ import { executeShellCommand } from '../common/util' ;
4
4
import * as adapter from './adapter' ;
5
5
6
6
let {
Original file line number Diff line number Diff line change 1
1
import git from 'gulp-git' ;
2
- import { isString } from '../../ common/util' ;
2
+ import { isString } from '../common/util' ;
3
3
4
4
export { isClean } ;
5
5
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export {
16
16
*/
17
17
function executeShellCommand ( sh , path , installCommand ) {
18
18
sh . cd ( path ) ;
19
- sh . exec ( installCommand ) ;
19
+ sh . exec ( installCommand ) ;
20
20
}
21
21
22
22
/**
@@ -53,7 +53,7 @@ function isArray(arr) {
53
53
}
54
54
55
55
/**
56
- * Test if the passed argument is a function
56
+ * Test if the passed argument is a function
57
57
*/
58
58
function isFunction ( functionToCheck ) {
59
59
if ( typeof functionToCheck === "undefined" )
@@ -63,7 +63,7 @@ function isFunction(functionToCheck) {
63
63
return false ;
64
64
} else {
65
65
var getType = { } ;
66
- return functionToCheck && getType . toString . call ( functionToCheck ) === '[object Function]' ;
66
+ return functionToCheck && getType . toString . call ( functionToCheck ) === '[object Function]' ;
67
67
}
68
68
}
69
69
@@ -80,4 +80,3 @@ function isString(str) {
80
80
return Object . prototype . toString . call ( str ) == '[object String]' ;
81
81
}
82
82
}
83
-
Original file line number Diff line number Diff line change 1
1
import git from 'gulp-git' ;
2
2
import gulp from 'gulp' ;
3
3
import dedent from 'dedent' ;
4
- import { isString } from '../../ common/util' ;
4
+ import { isString } from '../common/util' ;
5
5
6
6
export { commit } ;
7
7
Original file line number Diff line number Diff line change 1
1
import * as repo from './tools/repo' ;
2
2
import * as clean from './tools/clean' ;
3
3
import * as files from './tools/files' ;
4
- import * as util from '../common/util' ;
4
+ import * as util from '../src/ common/util' ;
5
5
import { config as userConfig } from './config' ;
6
6
import * as sh from 'shelljs' ; // local instance
7
7
import _ from 'lodash' ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import fs from 'fs';
7
7
// in the short term
8
8
import { adapter , init as commitizenInit } from '../../src/commitizen' ;
9
9
10
- import { isFunction } from '../../common/util' ;
10
+ import { isFunction } from '../../src/ common/util' ;
11
11
12
12
// Bootstrap our tester
13
13
import { bootstrap } from '../tester' ;
Original file line number Diff line number Diff line change 1
1
import { expect } from 'chai' ;
2
- import { isArray , isFunction , isString } from '../../common/util' ;
2
+ import { isArray , isFunction , isString } from '../../src/ common/util' ;
3
3
4
4
describe ( 'common util' , function ( ) {
5
5
You can’t perform that action at this time.
0 commit comments