-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Feature/534 #713
Feature/534 #713
Conversation
You can use this by using a new publishing method on a provider: class SomeProvider:
def boot(self):
self.publishes({
'/from/file': '/to/file'
}) you can also tag this so you may want to group together multiple files under a namespace like class SomeProvider:
def boot(self):
self.publishes({
'/package/views/admin.html': 'resources/templates/vendor/admin.html',
'/package/views/dashboard.html': 'resources/templates/vendor/dashboard.html',
'/package/views/users.html': 'resources/templates/vendor/users.html',
'/package/views/pages.html': 'resources/templates/vendor/pages.html',
}, tag='views') You can then use this by running a new
|
since migrations need special logic (create the file with the correct timestamp of right now) you need to run: class SomeProvider:
def boot(self):
self.publishes_migrations([
'/migration-directory/1',
'/migration-directory/2'
], tag='some-tag') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use context managers
This PR introduces the concept of Provider Publishing. This is the concept of a provider being responsible for adding files to an application like migrations or routes or templates.