- Clone this repository.
- Run
npm install. - Run
npm startand visit localhost:3000.
- Run
npm startand watch your changes live at localhost:3000.
- Run
npm run build, which will compile all the necessary files to thebuilddirectory. - Upload the contents of the
builddirectory to your web server's root folder.
- Open deploy.sh and change
DOMAINto your domain,COMMIT_MESSAGEto your commit message andREPO_URLto the URL of your repo. Make sure you don't add or remove any quotes when editing these values. - Run
npm run deploy- This will create a new build by running the redeploy script, add a CNAME pointing to your domain and then push the build folder to a branch calledgh-pages. - Configure your GitHub Pages to deploy the
gh-pagesbranch to your domain.
Once the initial setup is complete, you can simply run npm run deploy and your website will be built and deployed to GitHub Pages.
Note: When the deployment process is complete, you won't see the changes reflected on your website until a few moments later. This is because GitHub Pages needs to run its own build step before the website updates. You can view details about this process in the
Actionstab on GitHub.
-
src directory
Contains all code for the application, including CSS, JS and HTML files. This directory makes use of a feature-based folder structure.
-
public directory
Contains all static files like images, webfonts and vector graphics as well as the index.html file, which contains all metadata and contains all bundled scripts after the build step. Also includes the config and documents folders from where certain files are loaded into the virtual drive.
-
docs directory
You are here. This directory contains all documentation for this project.
-
build directory
Contains the static build files after building the application. This directory is not included in the GitHub repository.
| Type | Case | Example |
|---|---|---|
| Folders | kebab-case | virtual-drive |
.js files |
camelCase | virtualRoot.js |
.jsx files |
PascalCase | Desktop.jsx |
.css files & files in public dir |
kebab-case | global.css |
Local .module.css files |
PascalCase | Desktop.module.css |
Global .module.css files |
kebab-case | utils.module.css |
| Variables | camelCase | const fooBar = true; |
| Global constant variables | MACRO_CASE | export const NAME = "ProzillaOS"; |
| Classes | PascalCase | class WindowsManager { } |
| React components | PascalCase | export function WindowsView({ }) { } |
| Functions | camelCase | function focusWindow() { } |