Skip to content

Commit 8eeca1f

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

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/google-cloud-monitoring/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
],
2929
"scripts": {
3030
"docs": "jsdoc -c .jsdoc.js",
31-
"lint": "gts fix",
31+
"lint": "gts check",
3232
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
3333
"system-test": "mocha build/system-test",
3434
"test": "c8 mocha build/test",
@@ -39,7 +39,8 @@
3939
"clean": "gts clean",
4040
"compile": "tsc -p . && cp -r protos build/",
4141
"compile-protos": "compileProtos src",
42-
"prepare": "npm run compile"
42+
"prepare": "npm run compile",
43+
"precompile": "gts clean"
4344
},
4445
"dependencies": {
4546
"google-gax": "^2.1.0"

packages/google-cloud-monitoring/synth.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

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
logging.basicConfig(level=logging.DEBUG)
2222

@@ -43,6 +43,4 @@
4343
templates = common_templates.node_library(source_location='build/src')
4444
s.copy(templates)
4545

46-
subprocess.run(["npm", "install"])
47-
subprocess.run(["npm", "run", "lint"])
48-
subprocess.run(['npx', 'compileProtos', 'src'])
46+
node.postprocess_gapic_library()

0 commit comments

Comments
 (0)