deepsweet / start

:red_circle: Functional task runner for Node.js
https://start.js.org/
MIT License
476 stars 19 forks source link

Start default job when cli executed without any arguments #41

Closed bolasblack closed 6 years ago

bolasblack commented 6 years ago

Just like gulp 4.x do.

I think it's a good idea, because yarn start default looks really weird.

BTW, I discovered start three days ago, then I tried it as soon as I can. It's really cool! I have already used it in my own project!

deepsweet commented 6 years ago

Hi.

Thanks for the idea! It should be pretty easy to implement, I'll do it soon.

It's really cool! I have already used it in my own project!

❤️

deepsweet commented 6 years ago

What to do with args then? yarn start arg1 arg2 looks even more weird than yarn start default arg1 arg2... Not sure that I want to introduce -arg1 -arg2 only because of default case. What do you think?

bolasblack commented 6 years ago

Emm... I imagined that we could use non-argument default task ( :P ) with yarn start, and use argument default task with yarn start default arg1 arg2 ... at before. What do you think?

deepsweet commented 6 years ago

What's the use case of the default task for you? Feels like I don't fully understand this feature :) If I need something shorter than yarn start blah I'd add an NPM script for that "blah": "yarn start blah".

bolasblack commented 6 years ago

It's just a habit, for example, I usually write gulpfile like this:

export function buildScript() {}

export function buildStyle() {}

export function build() {
  // build script and style
}

export default function watch() {
  // watch and rebuild script and style
}

I write package.json like this:

{
  "scripts": {
    "start": "gulp"
  }
}

Then I can execute yarn start to start develop, and execute yarn start build to build static assets

deepsweet commented 6 years ago

I see. It just that arguments thing bothers me, I don't really want to introduce a "very special task" without arguments... Will think about this more.

bolasblack commented 6 years ago

I agree, a very special task is also not elegant, maybe there is a better way, I will also think about this more.

Anyway, start is my new love now, good job!

deepsweet commented 6 years ago

Anyway, start is my new love now, good job!

I can't explain how good is to know that someone has really enjoyed Start. In my opinion it's a small niche project so every new user counts.

deepsweet commented 6 years ago

I still have a Git stash for that :) So far I have no better ideas... Feel free to ping me again.