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

New feature: config-file #14

Merged
merged 1 commit into from
Oct 9, 2021

Conversation

japneetsingh035
Copy link
Contributor

@japneetsingh035 japneetsingh035 commented Oct 7, 2021

Users want to be able to specify all of their SSG options in a JSON formatted configuration file instead of having to pass them all as command-line arguments every time. For example, consider the following config file, ./ssg-config.json:

  "input": "./site",
  "output": "./build",
  "stylesheet": "https://cdn.jsdelivr.net/npm/water.css@2/out/water.css",
  "lang": "fr"

A user could run the SSG by doing either of the following:

# Option 1: use command line arguments:
ssg --input ./site --output ./build --stylesheet https://cdn.jsdelivr.net/npm/water.css@2/out/water.css --lang fr

# Option 2: use a config file
ssg --config ./ssg-config.json

The config file option means we can have a much shorter command, and instead store our options in a file.

@japneetsingh035 japneetsingh035 marked this pull request as ready for review October 7, 2021 04:14
@japneetsingh035 japneetsingh035 marked this pull request as draft October 7, 2021 04:34
@japneetsingh035 japneetsingh035 marked this pull request as ready for review October 8, 2021 18:47
@abatomunkuev abatomunkuev merged commit 861a016 into abatomunkuev:master Oct 9, 2021
@abatomunkuev
Copy link
Owner

Thanks for adding new feature!

@japneetsingh035
Copy link
Contributor Author

No Problem!
👍

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

Successfully merging this pull request may close these issues.

2 participants