-
Notifications
You must be signed in to change notification settings - Fork 0
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
mrc-6023 POC static build #236
base: mrc-6018
Are you sure you want to change the base?
Changes from 1 commit
6a4a090
182af9a
16e61ec
4a62a0b
373401d
c6048f6
b0b59dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const doc = ` | ||
Usage: | ||
builder <path-to-config> <dest-path> <path-to-mustache-views> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah. the views path doesn't seem like it needs to be a parameter as it's not something that should change per build..? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it can change between development and production, it depends on the folder structure of the dist folder, which may not be the same as the folder structure of our app/server directory, i guess we can also force them to be the same and hardcode that path in wodin builder as well but felt nice to give that flexibility |
||
`; | ||
|
||
import { docopt } from "docopt"; | ||
import { version } from "../version"; | ||
|
||
export const processArgs = (argv: string[] = process.argv) => { | ||
const opts = docopt(doc, { argv: argv.slice(2), version, exit: false }); | ||
const configPath = opts["<path-to-config>"] as string; | ||
const destPath = opts["<dest-path>"] as string; | ||
const viewsPath = opts["<path-to-mustache-views>"] as string; | ||
return { configPath, destPath, viewsPath }; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we'll pull this out of the controller when we implement for real.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we dont have to! we need the whole config controller any and tree shaking means that we only get that and not everything else, we just put wodinBuilder as the entry point