Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package.json of our samples are polluted by our maintenance tools #693

Closed
steren opened this issue Jul 23, 2018 · 5 comments
Closed

package.json of our samples are polluted by our maintenance tools #693

steren opened this issue Jul 23, 2018 · 5 comments

Comments

@steren
Copy link
Contributor

steren commented Jul 23, 2018

Take a look at this example: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/hello-world/standard/package.json

cloud-repo-tools, devDependencies and most of the scripts do not serve the purpose of giving example code to our users, instead, they are data used by our maintenance tools.

Could they be in a different file that does not interfere with package.json ?

@steren
Copy link
Contributor Author

steren commented Jul 23, 2018

Because they contain more that what is actually needed and JSON does not support comments, the package.json cannot be embedded in our documentation without confusing users.

@fhinkel
Copy link
Contributor

fhinkel commented Jul 31, 2018

I think we're getting rid of repo-tools, cc @JustinBeckwith . That would get rid of one dev-dependency.

I don't think there's a good solution to making samples short - but also self contained and on the CI 😞

@JustinBeckwith
Copy link
Contributor

So yeah, repo-tools is on its way out. @fhinkel is it doing anything important for these samples?

As far as others are concerned - I disagree! Things like mocha or semistandard are just part of a normal development process. I don't think having them in the devDependencies is hurting anything, and if anything it pushes developers towards good software development process.

@fhinkel
Copy link
Contributor

fhinkel commented Aug 23, 2018

A lot of samples rely on this test setup:

"cloud-repo-tools": {
    "test": {
      "app": {
        "msg": "Hello, world!"
      }
    },
    "requiresKeyFile": true,
    "requiresProjectId": true
  }

If we remove the repo-tools dependency, we'd need to write those tests ourselves - which I would prefer because no user will be familiar with the repo-tools magic.

@fhinkel
Copy link
Contributor

fhinkel commented Sep 11, 2018

Closing this, I think our package.jsons are fairly standard and not confusing to Node devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants