Skip to content
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

Available Scripts #41

Open
davidsonsns opened this issue Jun 14, 2019 · 10 comments
Open

Available Scripts #41

davidsonsns opened this issue Jun 14, 2019 · 10 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@davidsonsns
Copy link

davidsonsns commented Jun 14, 2019

What do you think about a session Available Scripts?
Getting all your scrpts commands on package.json file. Like generated apps with create-react-app.

If is ok I can try to do this.

@kefranabg
Copy link
Owner

Hi @davidsonsns

Thanks for opening the issue 👍

I already thought about this feature, but the problem is that the project might be something like a library or a CLI. In this case, suggest scripts command from the package.json would not make sense unfortunately 😕

Please let me know if you have a solution anyway 😄

@kefranabg kefranabg added question Further information is requested feature request and removed question Further information is requested labels Jun 15, 2019
@dejanfajfar
Copy link

I have a partial solution for this. Look for the bin part of the package.json. If found you know that it is a CLI.

@kefranabg
Copy link
Owner

And how to know if it's a standard project (like an app) or a library ?

@dejanfajfar
Copy link

One Idea that just came to mind is to check the "main" file for exports. If exports are present then we are most likely looking at a library. If there is no export then I would think that the whole thing starts a self contained something...

This could also work with transpiled code like typescript

#justanidea

@kefranabg
Copy link
Owner

Hmmm that might be a solution indeed 😉 Are you interested in doing a PR ?

@dejanfajfar
Copy link

Can give it a try but can not promise that it will happen in a timely fashion. Sadly working on a little thing of my own at the time. But if someone would like to talk about ti I can be reached at

Gitter

@kefranabg kefranabg added enhancement New feature or request good first issue Good for newcomers and removed feature request labels Jun 18, 2019
@Orodan
Copy link

Orodan commented Oct 4, 2019

Hey, I think @dejanfajfar idea to detect if the project is a library or an actuel app is great.
However, I don't think it makes more sense to display available scripts only for an app or for a library. Both of them could have scripts that would not really make sense to display in a readme
- scripts defined only to run on a continious integration server for example.

So here is my proposal : no matter the project type, ask if she/he wants to display the available scripts, if yes, ask if we should display all scripts. Finaly if the answer is no, display a list of all available scripts and allow the user to select which ones he wants to see on the readme.

What do you think :) ?

@kefranabg
Copy link
Owner

Or maybe always display the list of all available scripts (items are not selected by default), and let the user choose which one he want to embed?

@Orodan
Copy link

Orodan commented Oct 6, 2019

Hum my guess is it would cause problem if we do that in one step. Like :

Display available scripts ?

  • No
  • All
  • script start
  • script build
  • script test

If the user chooses "No", we should go to the next step, same for "All". But for the other options, he/she should be able to choose many. It might be confusing to have some option which directly make you go to the next step, and some others not. So maybe it would be simpler to have something like :) ?

Display available scripts ?

  • Yes
  • No

If "Yes" :
Which ones :

  • All
  • Only some of them

If "Only some of them" :
(select multiple)

  • script start
  • script build
  • script test
    ...

@Orodan
Copy link

Orodan commented Oct 15, 2019

I'll work on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants