File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ const pkg = require('./package.json');
66
77updateNotifier ( { pkg } ) . notify ( ) ;
88
9- exec ( 'npm start -- ' + process . argv . join ( ' ' ) , {
10- async : true ,
11- cwd : __dirname
12- } )
9+ const supportsAsyncAwait = parseInt ( process . version . slice ( 1 ) . split ( '.' ) . join ( '' ) ) > 760
10+
11+ const microAnalytics = supportsAsyncAwait ? './src/index' : './dist/index'
12+
13+ require ( microAnalytics )
Original file line number Diff line number Diff line change 77 },
88 "files" : [
99 " dist" ,
10+ " src" ,
1011 " cli.js" ,
11- " adapter-tests"
12+ " adapter-tests/unit-tests.js "
1213 ],
1314 "engineStrict" : true ,
1415 "engines" : {
1516 "node" : " >=6.0.0"
1617 },
1718 "scripts" : {
18- "start" : " node dist/index .js" ,
19+ "start" : " ./cli .js" ,
1920 "build" : " ./node_modules/.bin/async-to-gen src --out-dir dist" ,
2021 "prepublish" : " npm run build" ,
2122 "dev" : " NODE_ENV=development nodemon --config package.json --exec async-node src/index.js" ,
2223 "test" : " jest"
2324 },
25+ "jest" : {
26+ "collectCoverageFrom" : [
27+ " src/**/*.js"
28+ ]
29+ },
2430 "author" :
" Max Stoiber <[email protected] > (http://mxstbr.com/)" ,
2531 "license" : " MIT" ,
2632 "repository" : " https://github.com/mxstbr/micro-analytics" ,
4450 "jest" : " ^19.0.2" ,
4551 "nodemon" : " ^1.11.0" ,
4652 "request-promise" : " ^4.1.1"
47- },
48- "execMap" : {
49- "js" : " micro"
50- },
51- "jest" : {
52- "collectCoverageFrom" : [
53- " src/**/*.js"
54- ]
5553 }
5654}
You can’t perform that action at this time.
0 commit comments