File tree 4 files changed +15
-5
lines changed
4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ language: node_js
3
3
cache :
4
4
directories :
5
5
- node_modules
6
+ branches :
7
+ only :
8
+ -master
6
9
notifications :
7
10
email : false
8
11
node_js :
@@ -14,6 +17,7 @@ before_script:
14
17
script :
15
18
- npm run test
16
19
- npm run check-coverage
20
+ - npm run build
17
21
after_success :
18
22
- npm run report-coverage
19
23
- npm run semantic-release
Original file line number Diff line number Diff line change 6
6
"node" : " >=4.0.0" ,
7
7
"npm" : " >=2.0.0"
8
8
},
9
- "main" : " src /index.js" ,
9
+ "main" : " dist /index.js" ,
10
10
"scripts" : {
11
+ "prebuild" : " rm -rf dist && mkdir dist" ,
12
+ "build" : " babel src/index.js -o dist/index.js" ,
13
+ "postbuild" : " cp src/qmlStructureGrammar.pegjs dist/qmlStructureGrammar.pegjs" ,
11
14
"commit" : " git-cz" ,
12
- "test" : " istanbul cover -x *.test.js _mocha -- -R spec src/index.test.js" ,
13
- "test:watch" : " mocha src/index.test.js -w" ,
15
+ "test" : " istanbul cover -x *.test.js _mocha -- -R spec src/index.test.js --compilers js:babel/register " ,
16
+ "test:watch" : " mocha src/index.test.js -w --compilers js:babel/register " ,
14
17
"check-coverage" : " istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100" ,
15
18
"report-coverage" : " cat ./coverage/lcov.info | codecov" ,
16
19
"semantic-release" : " semantic-release pre && npm publish && semantic-release post"
33
36
"pegjs" : " 0.9.0"
34
37
},
35
38
"devDependencies" : {
39
+ "babel" : " 5.8.23" ,
36
40
"chai" : " 3.3.0" ,
37
41
"codecov.io" : " 0.1.6" ,
38
42
"commitizen" : " 2.1.0" ,
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env node
2
2
"use strict" ;
3
3
4
- const fs = require ( "fs" ) ;
4
+ // const fs = require("fs");
5
+ import fs from "fs" ;
5
6
const PEG = require ( "pegjs" ) ;
6
7
const _ = require ( "lodash" ) ;
7
8
Original file line number Diff line number Diff line change 1
1
/* eslint no-unused-expressions: false */
2
2
/* jshint -W030 */
3
3
4
- const expect = require ( 'chai' ) . expect ;
4
+ // const expect = require('chai').expect;
5
+ import { expect } from 'chai' ;
5
6
const qmlStructure = require ( './index.js' ) ;
6
7
7
8
describe ( "qmlStructureParser" , function ( ) {
You can’t perform that action at this time.
0 commit comments