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

Adding config.json and support default configuration #14

Merged
merged 1 commit into from
Oct 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**OSD_SSG** is a static site generator, implemented as part of Seneca College's OSD600 course.

> An *SSG* is a tool for generating a complete HTML web site from raw data and files, without having to author any HTML by hand. Imagine that you have a folder of text files that you want to turn into a website. An SSG allows you to enter a simple command that creates .html output files from a given set of input files.
> An _SSG_ is a tool for generating a complete HTML web site from raw data and files, without having to author any HTML by hand. Imagine that you have a folder of text files that you want to turn into a website. An SSG allows you to enter a simple command that creates .html output files from a given set of input files.

## Demo

Expand All @@ -19,6 +19,7 @@ Options:
-s, --stylesheet Custom stylesheet [string]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
-c,--config Use default configuration in config file [string]
```

## Features
Expand All @@ -39,6 +40,12 @@ exe
ts-node src/index.ts -i Sherlock\ Holmes\ Selected\ Stories\ / -r -e -s src/styles/retro.css
```

Using config file:

```
ts-node .\src\index.ts --config .\src\config.json
```

## Authors

- [@Dukemanh](https://www.github.com/dukemanh)
Expand Down
2 changes: 2 additions & 0 deletions src/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ const argv = yargs
logError(error?.message || msg);
process.exit(9);
})
.config()
.alias('config', 'c')
.help()
.alias('help', 'h')
.version()
Expand Down
7 changes: 7 additions & 0 deletions src/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"input": "./Sherlock-Holmes-Selected-Stories",
"output":"./dist",
"lang" : "en-CA",
"stylesheet" : "./src/styles/index.css"

}