Skip to content

Commit

Permalink
chore: update npm scripts and synth.py (#426)
Browse files Browse the repository at this point in the history
Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool.
  • Loading branch information
alexander-fenster committed Apr 24, 2020
1 parent e42c26d commit 8eeca1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions packages/google-cloud-monitoring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
],
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"lint": "gts fix",
"lint": "gts check",
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha build/system-test",
"test": "c8 mocha build/test",
Expand All @@ -39,7 +39,8 @@
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"prepare": "npm run compile"
"prepare": "npm run compile",
"precompile": "gts clean"
},
"dependencies": {
"google-gax": "^2.1.0"
Expand Down
6 changes: 2 additions & 4 deletions packages/google-cloud-monitoring/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import synthtool as s
import synthtool.gcp as gcp
import subprocess
import synthtool.languages.node as node
import logging
logging.basicConfig(level=logging.DEBUG)

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

subprocess.run(["npm", "install"])
subprocess.run(["npm", "run", "lint"])
subprocess.run(['npx', 'compileProtos', 'src'])
node.postprocess_gapic_library()

0 comments on commit 8eeca1f

Please sign in to comment.