Skip to content

Commit 1a2ab15

Browse files
committed
Merge pull request #53 from tjoskar/feature/pre-compile
feat(compile): Precompile ES6 code
2 parents 8651dd4 + 7912c7c commit 1a2ab15

File tree

18 files changed

+26
-27
lines changed

18 files changed

+26
-27
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules/
22
.tmp/
33
coverage/
44
artifacts/
5-
npm-debug.log
5+
/dist
6+
npm-debug.log

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/meta
2+
/src
3+
/test

bin/commitizen

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
#!/usr/bin/env node
22

3-
require("babel/register")({
4-
ignore: /node_modules\/(?!commitizen)/
5-
});
6-
require('./commitizen.js');
3+
require('./commitizen.js');

bin/commitizen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11

2-
require('../src/cli/commitizen.js').bootstrap();
2+
require('../dist/cli/commitizen.js').bootstrap();

bin/git-cz

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
#!/usr/bin/env node
22

3-
require("babel/register")({
4-
ignore: /node_modules\/(?!commitizen)/
5-
});
6-
require('./git-cz.js');
3+
require('./git-cz.js');

bin/git-cz.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
require("babel/register");
21
var path = require('path');
3-
require('../src/cli/git-cz.js').bootstrap({
2+
require('../dist/cli/git-cz.js').bootstrap({
43
cliPath: path.join(__dirname, '../')
5-
});
4+
});

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"scripts": {
77
"check-coverage": "istanbul check-coverage --statements 80 --branches 80 --functions 80 --lines 80 ",
88
"commit": "git-cz",
9+
"build": "babel src --out-dir dist",
10+
"build:watch": "babel --watch src --out-dir dist",
11+
"prepublish": "npm run build",
912
"report-coverage": "cat ./coverage/lcov.info | codecov",
1013
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
1114
"start": "npm run test:watch",

src/cli/parsers/commitizen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import minimist from 'minimist';
22

3-
import { isString, isArray } from '../../../common/util';
3+
import { isString, isArray } from '../../common/util';
44

55
export {
66
parse

src/cli/parsers/git-cz.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import minimist from 'minimist';
22

3-
import { isString, isArray } from '../../../common/util';
3+
import { isString, isArray } from '../../common/util';
44

55
export {
66
parse

src/cli/strategies/git-cz.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs';
22
import path from 'path';
33
import sh from 'shelljs';
44
import inquirer from 'inquirer';
5-
import {getParsedPackageJsonFromPath} from '../../../common/util';
5+
import {getParsedPackageJsonFromPath} from '../../common/util';
66
import {gitCz as gitCzParser, commitizen as commitizenParser} from '../parsers';
77
import {commit, staging, adapter} from '../../commitizen';
88
import {addPath} from '../../git';

0 commit comments

Comments
 (0)