-
Notifications
You must be signed in to change notification settings - Fork 1
Add template files for hf. #42
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
Conversation
| name: 'additionalFeatures', | ||
| message: 'What additional features does your app require', | ||
| message: 'What additional features does your app require (these are checkboxes)', | ||
| default: ['electric-flow', 'header-footer'], |
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'm not sure we should default electric-flow to on
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 do not know if this is true, but I was under the assumption that what Tyler did with the HF templating expects EF to be true/on as well.
Tyler would have to chime in further though.
| configureEF(appPath, useYarn, ownPath); | ||
| } | ||
| if (additionalFeatures.includes('header-footer')) { | ||
| configureHF(appPath, useYarn, ownPath); |
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.
not specific to hf, but I don't think we should allow yarn as an option
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'm fine with that I guess, but if a developer doesn't use the --use-npm option, then they'll get react, react-dom, and @fs/react-scripts installed with yarn, and then all of "our" dependencies installed with npm.
I don't know if anyone would ever use create-react-app that way though, they should just use the fr-cli.
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'll go ahead and make this change to remove the yarn option completely in our frontierInit code
| const path = require('path'); | ||
| const waitForWebpack = require('snow/lib/utils/waitForWebpack.js'); | ||
|
|
||
| const initiatedDirectory = process.env.INIT_CWD; |
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.
who sets INIT_CWD?
| page.secondaryNav = [ | ||
| {"href": appPath("/"), title: 'Stuff', "text": 'Stuff'}, | ||
| ]; | ||
| page.showHelper = true; |
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.
do we fell that every app should have helper and secondaryNav setup by default? what about several other page variables that they could enable?
| ]; | ||
| page.showHelper = true; | ||
| %> | ||
| <h1>hi</h1> |
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.
Hi to you to. But I don't think it's useful in the default template
| alterPackageJsonFile(appPath, appPackage => { | ||
| const packageJson = { ...appPackage }; | ||
| const additionalScripts = { | ||
| "heroku-prebuild": "./heroku-prebuild.sh" |
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.
can we put this file in a common location instead of copying into each app?
| experiments : [ | ||
| { | ||
| // Author/Owner: Tyler Graf | ||
| name: 'coolExperiment', |
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.
this should follow our naming convention
| // Author/Owner: Tyler Graf | ||
| name: 'coolExperiment', | ||
| description: 'The coolest experiment', | ||
| default: true |
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 would probably do default: false since that is the more common scenario
| /build | ||
|
|
||
| # development | ||
| /dist |
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.
wait, we create a dist for dev and a build for prod?
| # misc | ||
| .DS_Store | ||
| .env | ||
| .env.local |
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.
do we have some sort of pattern for alternate .env files? Should we just do .env.*? Or does something generate files like this, and if so, why?
| @@ -0,0 +1 @@ | |||
| <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | |||
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.
how does this work with the existing CRA index.html?
| @@ -0,0 +1,27 @@ | |||
| var urlLookup = { | |||
| 'cas-public-api.cas.ident.service': process.env.BASE_URL + '/cas-public-api', | |||
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.
these fallbacks use the old pattern and should be updated to the new pattern
| module.exports = { | ||
| experiments : [ | ||
| { | ||
| // Author/Owner: Tyler Graf |
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 believe we recommend you put author/owner in the description now
| } | ||
| ], | ||
| proxyUser: true, | ||
| cacheEncryption: true, |
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.
Not sure how I feel about proxyUser on by default. And we should discuss making cacheEncryption defult to true
Main Changes
.envand/distto.gitignore.buildpackin template-ef