-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
Fork gulp tasks into gulp-sequelize and reintegrate. #5
Comments
Sounds like a good idea. I pinged you on IRC. Let's discuss it there! |
Have you been able to actually fork the repository? |
Hi, guys! Any updates on this? |
None from me, @maxmalov. I've been bogged down at work and also ran into some issues when I first gave it a shot. In my opinion, the best way to go about this would be to separate the actual migration logic (which is already sort of sequestered in the "helpers" directory) into some sort of sequelize-util repo or back into sequelize proper. This repo can then be a dependency of sequelize-cli, gulp-sequelize, grunt-sequelize, etc... What do you think about this @sdepold? I'd be for rolling this functionality into sequelize proper. Performing migrations and managing models is inseparable from the ORM itself. |
Actually we will are currently planning to move the migration logic into a separate package. |
@sdepold, perfect! Is there an issue thread somewhere where we can collaborate on the API design for this move? I think Sequelize could benefit from some lightweight conventions, which I think you've already touched on by giving the CLI the ability to stub out models and migrations files a la Rails. I'd love to give my input as someone that's using Sequelize in a soon-to-be production environment. |
@sdepold Is there a way to use the gulp tasks in our own gulp file currently? This is a great feature and will simplify build processes. |
Can you describe the setup. Which tool should use your own gulp file? |
We want to run seeds on our test database for testing, and to run every time before Travis runs. We have a series of functions that run in order and the seed:create command is one. For now just using a gulp plugin to run commands on shell. |
So the gulpfile itself is here https://github.com/sequelize/cli/blob/master/lib/gulpfile.js |
And the task is defined here https://github.com/sequelize/cli/blob/master/lib/tasks/seed.js#L21-L47 |
You might be able to load the gulpfile and to use the respective task. but I'm not entirely sure how hard that is |
Has anyone managed to run any of the sequelize tasks from their local gulpfile? This would be very useful, but at the minute I see is it blocked by the arg creating code in the bin/sequelize file. |
AFAIK nothing happened here. |
Tiny typo fix
Since gulp has already been introduced as a dependency of the CLI binary, and most of the binary's functionality is based on a set of gulp tasks, I propose the creation of a separate gulp-sequelize project that implements these tasks in a way that conforms to gulp best practices.
After this has been completed, it should be relatively trivial to reintegrate with this standalone binary by simply making gulp-sequelize a package dependency and interacting with its tasks programmatically (as the binary already does).
The advantage of this is that it provides a set of functional tasks to developers who already have an existing gulp-based workflow while simplifying the development of the standalone binary.
The text was updated successfully, but these errors were encountered: