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

Add command to initialize a new config #6

Open
bartveneman opened this issue Apr 27, 2019 · 3 comments
Open

Add command to initialize a new config #6

bartveneman opened this issue Apr 27, 2019 · 3 comments
Labels
✨ enhancement New feature or request

Comments

@bartveneman
Copy link
Member

bartveneman commented Apr 27, 2019

Be able to let Constyle generate a new .constyblerc file based on CSS that is provided. This should make getting started a lot easier.

constyble init style.css
# or
cat style.css | constyble init

Should generate a .constyblerc file in the current working directory based on the css statistics of the passed CSS.

# Generating a custom file path config
constyble init style.css --config='/path/to/constyle.json'
# or
cat style.css | constyble init --config='/path/to/constyle.json'

To be discussed

  • What to do when file cannot be written?
  • What to when file already exists?
  • Should we implement constyble init --help, displaying an init oriented help message?

Idea credit: @jeroen-severein

@bartveneman bartveneman added the ✨ enhancement New feature or request label Apr 27, 2019
@bartveneman
Copy link
Member Author

@jeroen-severein Could you chime in and give some thoughts on the above?

@bartveneman bartveneman added the 🚸 help wanted Extra attention is needed label Jun 2, 2019
@jeroen-severein
Copy link

In case it can’t be written I would expect it to exit with a “can’t write to output file”-error.

If it already exists, I would expect a “overwrite yes or no?” prompt.

What would the init specific help need to explain further? I feel it would be enough if the init option is explained in the general constyble --help option. It would be nice to have explanations in comments of the settings file it generates though.

@bartveneman
Copy link
Member Author

It could be useful to replace Meow with Sade, to gain support for subcommands (meow lacks them): https://www.npmjs.com/package/sade

@bartveneman bartveneman removed the 🚸 help wanted Extra attention is needed label Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Development

No branches or pull requests

2 participants