Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starter project template

Created using Create React App, with the following modifications already done

Code structure

Components

I'm basic my components around atomic design, and using a variation on this approach (I've added numbers to keep the folders in an the right order)

State

Trying out a variant on the ducks approach - keeping actions, action types and reducers in a single file,

CSS Modules

Ejected

Replace standard css-loaded in both webpack.config.dev.js and webpack.config.prod.js with

    loader: require.resolve('css-loader'),
    query: {
      modules: true,
      localIdentName: '[name]__[local]___[hash:base64:5]'
    }                

Set up for githubpages

yarn add gh-pages

Added the following scripts your package.json:

  // ...
  "scripts": {
    // ...
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  }

The predeploy script runs automatically before deploy is run.

Deployed the site by running npm run deploy

Ran:

yarn run deploy

Ensured my project’s settings use gh-pages

Finally, configured GitHub Pages option in the GitHub project settings to use the gh-pages branch:

gh-pages branch setting

Accessing

To deploy, I just run

yarn run deploy

and access the site at https://nonzeronucleus.github.io/ghp-test

I haven't done Step 5: Optionally, configure the domain

You can configure a custom domain with GitHub Pages by adding a CNAME file to the public/ folder.

Client-side routing

I've install react-router

yarn add react-router

In order to support it on github pages, I've followed this guide.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages