Skip to content

Commit 1f34d82

Browse files
authored
Merge pull request linode#38 from stvnjacobs/fix/local-spec-generation
fix spec generation by using local node_modules bin
2 parents f893e19 + 05200fd commit 1f34d82

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

getDependencies.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ rm src/data/openapi.yaml.bak
2121

2222
echo
2323
echo "${BLUE}Converting YAML to JSON${NC}"
24-
npm install -g yamljs
25-
yaml2json src/data/openapi.yaml > src/data/spec.json
24+
./node_modules/yamljs/bin/yaml2json src/data/openapi.yaml > src/data/spec.json

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"dotenv": "^8.0.0",
6868
"lodash": "^4.17.11",
6969
"md5": "^2.2.1",
70-
"randomstring": "^1.1.5"
70+
"randomstring": "^1.1.5",
71+
"yamljs": "^0.3.0"
7172
}
7273
}

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14400,6 +14400,14 @@ yaml-loader@^0.5.0:
1440014400
dependencies:
1440114401
js-yaml "^3.5.2"
1440214402

14403+
yamljs@^0.3.0:
14404+
version "0.3.0"
14405+
resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b"
14406+
integrity sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==
14407+
dependencies:
14408+
argparse "^1.0.7"
14409+
glob "^7.0.5"
14410+
1440314411
yargs-parser@^11.1.1:
1440414412
version "11.1.1"
1440514413
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4"

0 commit comments

Comments
 (0)