Skip to content

Is .clasp*.json in generated .gitignore intentional? #45

@sakamossan

Description

@sakamossan

Summary

When running npx @google/aside init -y, the generated .gitignore includes .clasp*.json, which causes .clasp-dev.json and .clasp-prod.json to be ignored by git.

Reproduction

$ npx @google/aside init -y
✔ Adding scripts...
✔ Saving package.json...
✔ Installing dependencies...
✔ Installing src template...
✔ Installing test template...
✔ Creating Untitled...

...

Make sure to run npm install to install all the Angular UI dependencies

$ grep 'clasp' .gitignore
.clasp*.json
  • In the @google/aside repository, the package.json#copy-files script copies aside's own .gitignore to dist/.gitignore-target when running npm run build.
  • In user projects, npx @google/aside init -y executes handleConfigMerge, which copies node_modules/@google/aside/dist/.gitignore-target to ./.gitignore.

Question

If these files are gitignored, team members cannot share the scriptId for dev/prod environments.
Is this the intended behavior?

If so, what is the recommended workflow for teams sharing a project?

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