Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

phenomic-cli: make setup fast & more easy, (one install, one command?) #734

Closed
MoOx opened this issue Sep 6, 2016 · 12 comments
Closed

phenomic-cli: make setup fast & more easy, (one install, one command?) #734

MoOx opened this issue Sep 6, 2016 · 12 comments

Comments

@MoOx
Copy link
Owner

MoOx commented Sep 6, 2016

We need to improve that, current setup page is not appealing.

Maybe create a phenomic-cli or something when handling #598.

Something fast, so not a electron app yet :D

@thangngoc89
Copy link
Contributor

Which kind of work flow do you expect?

npm install -g phenomic-cli
phenomic-cli new my-site

@DanielFGray
Copy link

a yeoman generator could be a good choice

@thangngoc89
Copy link
Contributor

@DanielFGray did you try settting up a new phenomic project? We have everything in place, just need a better flow for new user

@DanielFGray
Copy link

DanielFGray commented Sep 14, 2016

Yeah I've just started with phenomic. I really dig it, but the whole DIR=your-website-folder && mkdir $DIR && cd $DIR && mkdir node_modules && npm i phenomic && ./node_modules/.bin/phenomic setup && npm i seems a bit much. yeoman should be able to handle all of that. it uses inquirer as well, which seemed to be in use for the setup script.

I have yet to make a yeoman generator myself, but I'll have a look into what it takes and see if I can't create one

@thangngoc89
Copy link
Contributor

@DanielFGray Thanks for your feedback. As you said the whole command sucks.

My idea so far is creating a global phenomic cli that should never changed. If user want to create a new phenomic project, this is what they have to do:

$ npm i -g phenomic-cli
$ phenomic new folder-name

This will run DIR=your-website-folder && mkdir $DIR && cd $DIR && mkdir node_modules && npm i phenomic && ./node_modules/.bin/phenomic setup && npm i

Sounds good?

@DanielFGray
Copy link

DanielFGray commented Sep 14, 2016

It doesn't sound bad in the slightest, I just can't help thinking there'd be a certain amount of re-inventing the wheel with that approach, and that off-loading it to yeoman could be a lot less work than writing a phenomic-cli project from scratch.

Just my two cents, I would be happy to use either.

@MoOx
Copy link
Owner Author

MoOx commented Sep 14, 2016

First keep in mind that the first part of the command (DIR=your-website-folder && mkdir $DIR && cd $DIR && mkdir node_modules) is the kind of instructions that no project includes.
Most of the time, when you start a project, you create a folder by yourself, and sometimes, already have a package.json.
So here the necessary evil is really npm i phenomic && ./node_modules/.bin/phenomic setup && npm i. We tried to include the "npm i(nstall)" in the setup itself, but it was not really great at this time. Since I discovered ora, I am pretty sure we can include the install in the setup command.
We should be able to split this setup part in a specific package when we will handle #598.

@thangngoc89
Copy link
Contributor

thangngoc89 commented Sep 14, 2016

@MoOx how about putting the whole code in a bash file (or cmd for Windows). The cli just need to download and execute it. We can have a stable branch serves as a source of truth to download those scripts. It should be super easy (IMHO).

Like I said above, users never have to update phenomic-cli package.

@MoOx
Copy link
Owner Author

MoOx commented Sep 14, 2016

No need for a branch, we can probably directly reach latest stable tag ;)
But yeah the cli should be pretty dumb so we don't have to update it. Or we can use https://www.npmjs.com/package/update-notifier

@thangngoc89
Copy link
Contributor

I think it should be both. cli should be pretty dumb and we should use update-notifier.

@bloodyowl
Copy link
Contributor

Going to be fixed with #925

@MoOx MoOx changed the title Make setup fast & more easy, (one install, one command?) phenomic-cli: make setup fast & more easy, (one install, one command?) Dec 23, 2016
@MoOx MoOx mentioned this issue Jan 12, 2017
Merged
@MoOx
Copy link
Owner Author

MoOx commented May 11, 2017

We will see that later, v1 will have start/build and that's it for now.

@MoOx MoOx closed this as completed May 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants