Skip to content

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

Description

@steren

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 ?

Activity

  1. steren commented on Jul 23, 2018

    @steren
    ContributorAuthor

    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.

  2. fhinkel commented on Jul 31, 2018

    @fhinkel
    Contributor

    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 😞

  3. JustinBeckwith commented on Jul 31, 2018

    @JustinBeckwith
    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.

  4. fhinkel commented on Aug 23, 2018

    @fhinkel
    Contributor

    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.

  5. fhinkel commented on Sep 11, 2018

    @fhinkel
    Contributor

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

  6. added a commit that references this issue on Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions