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

Create Setup command #148

Closed
coryhouse opened this issue May 24, 2016 · 8 comments
Closed

Create Setup command #148

coryhouse opened this issue May 24, 2016 · 8 comments

Comments

@coryhouse
Copy link
Owner

coryhouse commented May 24, 2016

This command can do the following:

  1. Remove the git file (so a clone of this repo doesn't contain the git history)
  2. Run npm install
  3. Remove itself so it's not accidentally run again
@nlarche
Copy link

nlarche commented May 26, 2016

what did you think about changing package.json name properties and parent directory name with this setup command ?

@coryhouse
Copy link
Owner Author

Changing the package.json name makes a lot of sense. People can already specify the name of the directory themselves when cloning, so not too worried about that.

@j5v
Copy link

j5v commented May 26, 2016

  1. Personally, I've been removing the repo link in package.json, just so I don't accidentally contaminate the project here.

    I think you can specify --depth=1 to avoid fetching the entire history of the project. Perhaps suggest the appropriate git command in your README?

  2. I would not include npm install in a script. Developers would do that anyway (npm i), as habit.

    Generally: Do you see setup scripts in other projects?

@coryhouse
Copy link
Owner Author

@j5v Dedicated setup scripts are rare - traditionally such tasks would be handled by something like a Yeoman generator, but I've been trying to avoid going that route.

Regarding running npm install - I agree that people understand the need, just figured it might as well all be handled via one command.

@gargrave
Copy link
Contributor

gargrave commented Jun 7, 2016

I am planning on taking a whack at this. A couple quick thoughts:

  • Since we are deleting the original/cloned repo, is it safe to assume we can go ahead and let the setup script init a new repo?
  • Regarding the discussion of package.json, there are quite a few fields in there that could potentially be reset for a fresh project: name, version, description, auth, license, repository, etc. Is it worth prompting the user in the setup script to enter new values here, or would you prefer to keep the script fully automated, and not require any user interaction? (Maybe if it's the latter, we could just add a message to the end to remind the user to update these manually or something...)

@coryhouse
Copy link
Owner Author

@gargrave Great! Good questions.

I wouldn't worry about initializing a new repo since not everyone uses Git.

I think prompting for package.json would be really slick and helpful.

@gargrave
Copy link
Contributor

gargrave commented Jun 7, 2016

Thanks, Cory. I should have a PR for you sometime in the very near future.

@coryhouse
Copy link
Owner Author

Closing since PR #160 delivered this. Thanks @gargrave 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants