Skip to content

Commit

Permalink
chore: update npm scripts and synth.py (#356)
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 authored and sofisl committed Oct 13, 2022
1 parent 79bbce2 commit 53e3bc2
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-bigquery-datatransfer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha build/system-test",
"docs": "jsdoc -c .jsdoc.js",
"lint": "gts fix",
"lint": "gts check",
"fix": "gts fix",
"docs-test": "linkinator docs",
"predocs-test": "npm run docs",
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"prepare": "npm run compile",
"prelint": "cd samples; npm link ../; npm install"
"prelint": "cd samples; npm link ../; npm install",
"precompile": "gts clean"
},
"dependencies": {
"google-gax": "^2.1.0"
Expand Down
6 changes: 2 additions & 4 deletions packages/google-cloud-bigquery-datatransfer/synth.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import synthtool as s
import synthtool.gcp as gcp
import synthtool.languages.node as node
import logging
import subprocess

logging.basicConfig(level=logging.DEBUG)

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

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

0 comments on commit 53e3bc2

Please sign in to comment.