Skip to content

Commit 325dacd

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

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

packages/google-cloud-bigquery-datatransfer/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@
3131
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
3232
"system-test": "mocha build/system-test",
3333
"docs": "jsdoc -c .jsdoc.js",
34-
"lint": "gts fix",
34+
"lint": "gts check",
3535
"fix": "gts fix",
3636
"docs-test": "linkinator docs",
3737
"predocs-test": "npm run docs",
3838
"clean": "gts clean",
3939
"compile": "tsc -p . && cp -r protos build/",
4040
"compile-protos": "compileProtos src",
4141
"prepare": "npm run compile",
42-
"prelint": "cd samples; npm link ../; npm install"
42+
"prelint": "cd samples; npm link ../; npm install",
43+
"precompile": "gts clean"
4344
},
4445
"dependencies": {
4546
"google-gax": "^2.1.0"

packages/google-cloud-bigquery-datatransfer/synth.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import synthtool as s
22
import synthtool.gcp as gcp
3+
import synthtool.languages.node as node
34
import logging
4-
import subprocess
55

66
logging.basicConfig(level=logging.DEBUG)
77

@@ -34,6 +34,4 @@
3434
templates = common_templates.node_library(source_location='build/src')
3535
s.copy(templates)
3636

37-
subprocess.run(['npm', 'install'])
38-
subprocess.run(['npm', 'run', 'fix'])
39-
subprocess.run(['npx', 'compileProtos', 'src'])
37+
node.postprocess_gapic_library()

0 commit comments

Comments
 (0)