Skip to content

Commit

Permalink
chore: update npm scripts and synth.py (#411)
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 ed843bc commit 9424f8c
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-tasks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test": "c8 mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha build/system-test",
"lint": "gts fix",
"lint": "gts check",
"fix": "gts fix",
"docs": "jsdoc -c .jsdoc.js",
"docs-test": "linkinator docs",
Expand All @@ -39,7 +39,8 @@
"compile-protos": "compileProtos src",
"predocs-test": "npm run docs",
"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
7 changes: 2 additions & 5 deletions packages/google-cloud-tasks/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

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 @@ -51,7 +51,4 @@
'"max_rpc_timeout_millis": 60000',
'"max_rpc_timeout_millis": 20000')

# 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 9424f8c

Please sign in to comment.