Giter VIP home page Giter VIP logo

Comments (10)

jstrimpel avatar jstrimpel commented on May 18, 2024 1

It would be great if this could make it into the next release. We have a bunch of scripts that && commands together. The last command is sometimes a notification, which we would like to move to a post, so that arguments can be passed to the last command in the chain of &&'s. In the example below the flag argument should make it to builder run baz, but if the builder run notify -- some notification message is &&'d onto multitask then baz will not receive the flag.

"multitask": "builder run foo && builder run bar && builder run baz",
"postmultiask": "builder run notify -- some notification message"
$ builder run multitask -- --flag

from builder.

ryan-roemer avatar ryan-roemer commented on May 18, 2024

@coopy -- Can you walk me through what the difference is with say:

$ npm run first && npm run the-main-thing && npm run after

?

Having magic pre|post script things may prove tricky to archetype developers and users when we merge tasks across project to archetype, so I'd love a solid example of what we can't do with composition in builder.

Thanks!

from builder.

coopy avatar coopy commented on May 18, 2024

Composition will certainly take care of my use case, since I can easily modify the archetype.

Composition will not help you if you wanted to add a pre or post behavior for an ARCHETYPE script in your PROJECT.

I guess the question is how far do we take the "just like npm" approach? For now, I'll close this.

from builder.

ryan-roemer avatar ryan-roemer commented on May 18, 2024

I guess the question is how far do we take the "just like npm" approach?

That is worth considering. Up to this point to manage complexity, we've been deliberately avoiding npm lifecycle special task names (like such we prefix with npm:). And, separately I'm trying to focus on the minimum viable feature set to support what we need, especially as we roll through a lot of bugs and real world use cases for our clients to support.

Happy to leave this one open in the icebox as the feature request itself is succinct and understandable. (Just the implementation, cross-project/archetype interaction, etc. issues have to be fully understood vs. the value add when we next reassess this feature).

from builder.

ryan-roemer avatar ryan-roemer commented on May 18, 2024

@jstrimpel -- I've added the ticket to our priority list for OSS work and will see if I personally have bandwidth to get it going next week. I've started rewriting the description of this issue to better reflect the work going into it.

from builder.

jstrimpel avatar jstrimpel commented on May 18, 2024

@ryan-roemer Awesome. Thanks. I can be a beta tester.

from builder.

ryan-roemer avatar ryan-roemer commented on May 18, 2024

@jstrimpel -- If you get a moment, can you peruse my WIP README updates of how I envision this feature working? (at https://github.com/FormidableLabs/builder/compare/feature/pre-post-lifecycle#diff-04c6e90faac2675aa89e2176d2eec7d8R383)

Specifically, while builder run <task> is straightforward, there are some behavioral choices to be made for builder concurrent <task1> <task2> and builder envs <task> with respect to pre|post.

Thanks!

from builder.

jstrimpel avatar jstrimpel commented on May 18, 2024

@ryan-roemer Makes sense to me.

from builder.

ryan-roemer avatar ryan-roemer commented on May 18, 2024

Status update: Didn't have a ton of time to work on this this week, but current progress is at https://github.com/FormidableLabs/builder/compare/feature/pre-post-lifecycle I think I've mostly planned out the complexities for things like --setup, concurrent, envs, etc. with new pre/post things.

I should be able to land this next week...

from builder.

ryan-roemer avatar ryan-roemer commented on May 18, 2024

Implemented in #156

from builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.