File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 55 "main" : " index.js" ,
66 "scripts" : {
77 "api" : " node ./dist/api.js" ,
8- "build" : " npm run lint && rimraf dist/ && babel ./src --out-dir dist/src --copy-files && babel ./test --out-dir dist/test --copy-files && babel ./*.js --out-dir dist/ --copy-files" ,
8+ "build" : " npm run lint && rimraf dist/ && babel ./src --out-dir dist/src --copy-files && babel ./test --out-dir dist/test --copy-files && babel ./*.js --out-dir dist/ --copy-files && cp swagger.yaml dist/ " ,
99 "commit" : " ./node_modules/.bin/git-cz" ,
1010 "lint" : " node ./node_modules/.bin/eslint ./src ./test --fix --ext=.js --ignore-pattern node_modules/ --ignore-pattern dist/ --ignore-pattern coverage/ --quiet" ,
1111 "test" : " npm run build && cross-env NODE_ENV=test nyc ./node_modules/.bin/mocha --timeout 10000 --require babel-core/register --require babel-polyfill './dist/test/**/*.spec.js'" ,
Original file line number Diff line number Diff line change 11import Swagger from 'swagger-client' ;
22import jsYaml from 'js-yaml' ;
33import { default as fs } from 'fs' ;
4- import appRoot from 'app-root-path' ;
54
65export class LaunchDarklyApiClient {
76 static async create ( API_TOKEN , log ) {
87 log . info ( `creating client with api token: ${ API_TOKEN } ` ) ;
98
109 // swagger.yaml from https://launchdarkly.github.io/ld-openapi/swagger.yaml
11- const yaml = fs . readFileSync ( ` ${ appRoot } /swagger.yaml`, 'utf-8' ) . toString ( ) ;
10+ const yaml = fs . readFileSync ( __dirname + `/.. /swagger.yaml`, 'utf-8' ) . toString ( ) ;
1211 const json = jsYaml . safeLoad ( yaml ) ;
1312
1413 return Swagger ( {
You can’t perform that action at this time.
0 commit comments