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

Processing of getProjectFiles() (and ignore patterns) needs revision #694

Open
PopGoesTheWza opened this issue Aug 26, 2019 · 1 comment · May be fixed by #1013
Open

Processing of getProjectFiles() (and ignore patterns) needs revision #694

PopGoesTheWza opened this issue Aug 26, 2019 · 1 comment · May be fixed by #1013

Comments

@PopGoesTheWza
Copy link
Collaborator

Working on "simple" PR #693 , I found out current getProjectFiles() processing is very inefficient

Expected Behavior

getProjectFiles() should:

  • ignore dotted folders like .git
  • limit its recursive search for legitimate/valid files (i.e. appsscript.json, .gs, .js, .ts and .html
  • (optional) the support .claspignore should work as standard .ignore files (i.e. node_modules should suffice instead of current **/node_modules/** goofy syntax)

Actual Behavior

getProjectFiles() first grabs every files from any subfolder from rootDir before trying any .claspignore pattern. this includes any usually ignored folders like .git
Next .claspignore patterns are applied in a way that does not allow the use of standard notation (i.e. node_modules must be express as **/node_modules/**

Steps to Reproduce the Problem

  1. add dummy .clasp.json and appsscript.json and an empty (no pattrens) .claspignore
  2. run clasp status

Specifications

  • Node version (node -v): 10.16.3
  • Version (clasp -v): 2.2.1
  • OS (Mac/Linux/Windows): Mac OS
@PopGoesTheWza
Copy link
Collaborator Author

Maybe it would be sensible to rely on solid 3rd party package to handle this part. This one looks like a serious candidate https://www.npmjs.com/package/ignore

@dotysan dotysan linked a pull request Jul 6, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

1 participant