-
Notifications
You must be signed in to change notification settings - Fork 3
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
Theme management in Whippet #41
Comments
Here's my thinking: (TODO list moved to #46) Maybe at a later date we can add plugins to the new dependency management files. The reason we should write a new module from scratch instead of basing the work on the existing plugins module is because yesterday I tried to write tests for the plugin module and it's rather difficult. So we'd need to do a lot of work before we can start adding new features via TDD. |
Note about the format of whippet.json:
Composer stores a hash in composer.lock. Why do they do that? Should we do that too? |
I'd still rather not move to json. It creates a migration headache. Why not a themes file and themes.lock? EDIT - missed your comment about TDD. OK then. But I think if we're going to have this we should include plugins in it now. We'll also need a command to convert existing repos to whippet.json. |
Yeah, I'd like to use the code that's already there, but if I don't write tests there's just going to be a headache later on when we try and change it and we have no tests.
Makes sense. I'll add it to the TODO list.
Yep. That should be fairly straightforward. In fact, we can have it so that if you run |
Sounds good. |
The TODO list was getting unmanageably large to be contained in a comment, so I created a PR: #46 |
- Add Modules/Helpers/FileLocator - Look for plugins or whippet.json files - Add Modules/Helpers/Dependencies - Add Modules/Helpers/WhippetLock - Add Modules/Dependencies - Pre-DRY tests - Handle already-cloned repos - Add fromString/fromFile static methods to WhippetLock - Show useful output - s/Dependencies/DependenciesInstaller/ - Move new classes out of Modules\Helpers - Check the hash before installing - Move some test helpers into a separate trait - Output errors - Add DependenciesUpdater - Add update command - Add paths to gitignore - Add plugins to DependenciesInstall - Add plugins to DependenciesUpdater - Add dependencies migrate command - mv WhippetLock Files/WhippetLock - Move some functionality from DependenciesUpdate into WhippetLock - Rename dependencies, and update FileLocator usage - Rename Dependencies* classes - Pass directory instead of FileLocator - Add isErr check to Migration - Update: test for failed git command - FileLocator: update message - s/FileLocator/DirectoryLocator/ - DirectoryLocator: Prevent bug with plugins directory - migrate: Pretty-print whippet.json - Pretty-print whippet.lock - Do not bork on missing whippet.lock - Dependencies: Ignore plugins file entirely - Print sensible error if plugins file not found - Add getNullFactory() to tests - Move JSON parsing/file writing out of WhippetLock into abstract class - Support explicit src - Allow themes/plugins without refs - Catch failing clones - Catch failing checkouts - fromString and fromFile return result objects - Blank lockfile: show a message - Blank json file: show message - Tests: don't override that method - Don't output warning on missing .gitignore - Add Files/WhippetJson - Handle removing previously-installed dependencies from gitignore - Migration: do not overwrite existing whippet.json - Fix a couple of bugs in Updater - Bubble errors properly - Don't bork if whippet.lock is missing - Dependencies/Updater: refactor for readability - Dependencies/Installer: refactor for readability - Dependencies/Migration: refactor for readability - Make deps an alias for dependencies - Catch a broken JSON issue - Add deprecation notice to plugins install/upgrade - Update whippet_init to find whippet.json - deploy: use Dependencies/Installer if possible - Modify the deprecation notice for internal use of Module/Plugin - Replace DirectoryLocator with ProjectDirectory - Improve getFactory() test helper - Do not directly instantiate other classes in tests - Instantiate Installer correctly - DRY - Update README Fixes: #41
- Add Modules/Helpers/FileLocator - Look for plugins or whippet.json files - Add Modules/Helpers/Dependencies - Add Modules/Helpers/WhippetLock - Add Modules/Dependencies - Pre-DRY tests - Handle already-cloned repos - Add fromString/fromFile static methods to WhippetLock - Show useful output - s/Dependencies/DependenciesInstaller/ - Move new classes out of Modules\Helpers - Check the hash before installing - Move some test helpers into a separate trait - Output errors - Add DependenciesUpdater - Add update command - Add paths to gitignore - Add plugins to DependenciesInstall - Add plugins to DependenciesUpdater - Add dependencies migrate command - mv WhippetLock Files/WhippetLock - Move some functionality from DependenciesUpdate into WhippetLock - Rename dependencies, and update FileLocator usage - Rename Dependencies* classes - Pass directory instead of FileLocator - Add isErr check to Migration - Update: test for failed git command - FileLocator: update message - s/FileLocator/DirectoryLocator/ - DirectoryLocator: Prevent bug with plugins directory - migrate: Pretty-print whippet.json - Pretty-print whippet.lock - Do not bork on missing whippet.lock - Dependencies: Ignore plugins file entirely - Print sensible error if plugins file not found - Add getNullFactory() to tests - Move JSON parsing/file writing out of WhippetLock into abstract class - Support explicit src - Allow themes/plugins without refs - Catch failing clones - Catch failing checkouts - fromString and fromFile return result objects - Blank lockfile: show a message - Blank json file: show message - Tests: don't override that method - Don't output warning on missing .gitignore - Add Files/WhippetJson - Handle removing previously-installed dependencies from gitignore - Migration: do not overwrite existing whippet.json - Fix a couple of bugs in Updater - Bubble errors properly - Don't bork if whippet.lock is missing - Dependencies/Updater: refactor for readability - Dependencies/Installer: refactor for readability - Dependencies/Migration: refactor for readability - Make deps an alias for dependencies - Catch a broken JSON issue - Add deprecation notice to plugins install/upgrade - Update whippet_init to find whippet.json - deploy: use Dependencies/Installer if possible - Modify the deprecation notice for internal use of Module/Plugin - Replace DirectoryLocator with ProjectDirectory - Improve getFactory() test helper - Do not directly instantiate other classes in tests - Instantiate Installer correctly - DRY - Update README - Lock sebastian/environment at a version that supports PHP 5.5 Fixes: #41
In order to remove submodules from site repos, we need to be able to manage themes using a "themes" file - in exactly the same way as plugins are currently managed.
There is a set of repos in GovPress github at wordpress-themes/2012,2013,2014 etc. The root repo URL for the themes file should be git@git.dxw.net:wordpress-themes/ (double check this).
As for plugins, existing themes in directories should be untouched. Whippet should only look at themes listed in the themes file.
When this is working, we'll start migrating sites over to this feature.
The text was updated successfully, but these errors were encountered: