Skip to content

Commit b418e7b

Browse files
chore: update npm scripts and synth.py (#322)
Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool.
1 parent 07365cf commit b418e7b

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

packages/google-cloud-asset/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@
3535
"docs": "jsdoc -c .jsdoc.js",
3636
"docs-test": "linkinator docs",
3737
"fix": "gts fix",
38-
"lint": "gts fix",
38+
"lint": "gts check",
3939
"predocs-test": "npm run docs",
4040
"prepare": "npm run compile",
4141
"system-test": "c8 mocha build/system-test",
4242
"test": "c8 mocha build/test",
43-
"prelint": "cd samples; npm link ../; npm install"
43+
"prelint": "cd samples; npm link ../; npm install",
44+
"precompile": "gts clean"
4445
},
4546
"dependencies": {
4647
"google-gax": "^2.1.0"

packages/google-cloud-asset/synth.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import json
1717
import synthtool as s
1818
import synthtool.gcp as gcp
19-
import subprocess
19+
import synthtool.languages.node as node
2020
import logging
2121

2222
logging.basicConfig(level=logging.DEBUG)
@@ -64,7 +64,4 @@
6464
with open(file, 'w') as f:
6565
f.write(new_file)
6666

67-
# Node.js specific cleanup
68-
subprocess.run(['npm', 'install'])
69-
subprocess.run(['npm', 'run', 'fix'])
70-
subprocess.run(['npx', 'compileProtos', 'src'])
67+
node.postprocess_gapic_library()

0 commit comments

Comments
 (0)