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

Add "troubleshooting" mode to accelerate development on grunt drupal tasks #216

Open
grayside opened this issue Dec 3, 2015 · 0 comments

Comments

@grayside
Copy link
Contributor

grayside commented Dec 3, 2015

For project development using GDT, we take care to run the dependency managers as little as possible. However, when testing GDT or generators that use it, whether or not the dependencies are properly computed is very often not the subject of a change in progress. This leads to several minutes of code downloading that might well be redundant.

I've thought through two options on how to make this better.

Clean Around Dependency Managers

A new grunt clean:custom task is set up that will wipe the project but leave build, vendor, and node_modules in place. This should allow wiping custom code but keep GDT functioning as efficiently as it knows how with regard to dependency managers. This facilitates some generator development but requires knowledge of a new grunt command and won't really help speed up local automated testing.

Caching Upstream Code

Cache the contents of vendor/, node_modules, and build/html and allow the build process to copy those in from a cache in lieu of those build steps. This option is good to facilitate "empty directory" troubleshooting, which comes up a lot in the formal tests and generator development.

  • Cache is outside the project directory to facilitate clean wipes.
  • Cache is global because we're only worried about developing on GDT, not projects leveraging GDT.
  • Cache is only used if a special flag is added to commands.
  • If cache is empty and special flag is added, the process behaves normally.
  • If cache is populated and the special flag is used, we copy those items into place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant