-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🔧 merge dev to master before release (#30)
- Loading branch information
Showing
48 changed files
with
727 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,4 @@ | |
|
||
## Misc | ||
|
||
- [Gotchas & Tips](misc/gotchas.md) | ||
- [FAQ](misc/faq.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,39 @@ | ||
# Deploy to Netlify | ||
|
||
This docs is still awaiting help 😢If you want to help with this documenation please contact to us | ||
### Easy 5-Step Deployment Process | ||
|
||
_Step 1:_ Create a `netlifty.toml` file in the root directory of your project and copy this code below. Edit these settings if you did not follow the boilerplate structure. More settings available here (https://docs.netlify.com/configure-builds/file-based-configuration/#sample-file) | ||
|
||
``` | ||
[build] | ||
# Directory to change to before starting a build. | ||
# This is where we will look for package.json/.nvmrc/etc. | ||
base = "/" | ||
# Directory (relative to root of your repo) that contains the deploy-ready | ||
# HTML files and assets generated by the build. If a base directory has | ||
# been specified, include it in the publish directory path. | ||
publish = "./build" | ||
# Default build command. | ||
command = "npm run build" | ||
# The following redirect is intended for use with most SPAs that handle routing internally. | ||
[[redirects]] | ||
from = "/*" | ||
to = "/index.html" | ||
status = 200 | ||
``` | ||
|
||
_Step 2:_ Commit your code and push your latest updates to a GitHub repository. | ||
|
||
_Step 3:_ Register or Login in at Netlify (https://app.netlify.com/). | ||
|
||
_Step 4:_ In your account | team page click `New site from git` then chose your repository. | ||
|
||
_Step 5:_ Click deploy. | ||
|
||
|
||
> Note: No need to change any setting in the last step as `netlify.toml` overwrites these settings. | ||
Now your code will be deployed automatically to netlify on every push to the default branch of your repository.🥳🥳 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# FAQ | ||
|
||
- [Using global reducers instead of injecting](#load-reducers-optimistically) | ||
- [Keeping up-to-date with the template](keeping-up-to-date-with-the-template) | ||
- [Are there any examples or tutorials?](examples-and-tutorials) | ||
|
||
## Using reducers optimistically | ||
|
||
If you have containers that should be available throughout the app, like a `NavigationBar` (they aren't route specific), you need to add their respective reducers to the root reducer with the help of `combineReducers`. | ||
|
||
```ts | ||
// In src/store/reducers.ts | ||
|
||
... | ||
import { combineReducers } from '@reduxjs/toolkit'; | ||
... | ||
|
||
import navigationBarReducer from 'containers/NavigationBar/reducer'; | ||
|
||
export function createReducer(injectedReducers: InjectedReducersType = {}) { | ||
const rootReducer = combineReducers({ | ||
navigationBar: navigationBarReducer, | ||
...injectedReducers, | ||
}); | ||
|
||
return rootReducer; | ||
} | ||
``` | ||
|
||
## Keeping up-to-date with the template | ||
|
||
Eventhough the template is an npm package it's not possible for you to **just update** the package, since you start CRA with this template initially. The suggested way to keep an eye on the [CHANGELOG](../../CHANGELOG.md) file. All the changes that **concerns** the template user will be displayed there, like bug fixes, documentation updates, new features etc... You can check each change's commits and file changes and see what has been changed. Then, the decision is yours if you want to apply those to your code. | ||
|
||
## Examples & Tutorials | ||
|
||
Take a look our [another 'how to' repo](https://github.com/react-boilerplate/cra-template-examples) for examples and common web app implementations & patterns |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import shell from 'shelljs'; | ||
|
||
interface Options {} | ||
|
||
export function createChangeLog(opts: Options = {}) { | ||
const changes1 = shell.exec(`git diff package.json`, { silent: true }); | ||
const changes2 = shell.exec(`git diff package-lock.json`, { silent: true }); | ||
if (changes1.stdout.length > 0 || changes2.stdout.length > 0) { | ||
console.error('Error: Unstaged files'); | ||
process.exit(1); | ||
} | ||
shell.exec( | ||
`npx standard-version --skip.commit --skip.tag --skip.changelog=0`, | ||
{ | ||
silent: false, | ||
}, | ||
); | ||
|
||
// Revert the bumbped version | ||
shell.exec(`git checkout -- package-lock.json`, { silent: true }); | ||
shell.exec(`git checkout -- package.json`, { silent: true }); | ||
} | ||
|
||
createChangeLog(); |
Oops, something went wrong.