Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
chore: update npm scripts and synth.py (#529)
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 Apr 24, 2020
1 parent b43247b commit 9b4e0e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"predocs": "npm run compile",
"lint": "gts fix",
"lint": "gts check",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"system-test": "mocha build/system-test --timeout 600000",
"test": "c8 mocha build/test",
Expand All @@ -41,7 +41,9 @@
"presystem-test": "npm run compile",
"docs-test": "linkinator docs",
"predocs-test": "npm run docs",
"prelint": "cd samples; npm link ../; npm install"
"prelint": "cd samples; npm link ../; npm install",
"clean": "gts clean",
"precompile": "gts clean"
},
"dependencies": {
"@google-cloud/common": "^3.0.0",
Expand Down
7 changes: 2 additions & 5 deletions 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

# Run the gapic generator
gapic = gcp.GAPICMicrogenerator()
Expand All @@ -43,7 +43,4 @@
templates = common_templates.node_library(source_location='build/src')
s.copy(templates, excludes=[])

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

0 comments on commit 9b4e0e7

Please sign in to comment.