Skip to content

Commit

Permalink
chore: update npm scripts and synth.py (#269)
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.

Co-authored-by: Benjamin E. Coe <bencoe@google.com>
  • Loading branch information
alexander-fenster and bcoe authored May 6, 2020
1 parent 7e45f3a commit c1baa8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions packages/google-cloud-securitycenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
"docs": "jsdoc -c .jsdoc.js",
"docs-test": "linkinator docs",
"fix": "gts fix",
"lint": "gts fix",
"lint": "gts check",
"predocs-test": "npm run docs",
"prepare": "npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"prelint": "cd samples; npm link ../; npm install"
"prelint": "cd samples; npm link ../; npm install",
"precompile": "gts clean"
},
"keywords": [
"google apis client",
Expand Down
7 changes: 2 additions & 5 deletions packages/google-cloud-securitycenter/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 Down Expand Up @@ -47,7 +47,4 @@
templates = common_templates.node_library(source_location='build/src')
s.copy(templates, excludes=['.kokoro/samples-test.sh', '.kokoro/samples-test.sh'])

# Node.js specific cleanup
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'fix'])
subprocess.run(['npx', 'compileProtos', 'src'])
node.postprocess_gapic_library()

0 comments on commit c1baa8f

Please sign in to comment.