Framework agnostic web app template. This project is like Create React App except React is removed.
View web app.
Clone the repository:
git clone https://github.com/remarkablemark/web-app-template.git
cd web-app-templateRename the project:
git grep -l web-app-template | xargs sed -i '' -e 's/web-app-template/my-app/g'
git grep -l 'web app template' | xargs sed -i '' -e 's/web app template/My App Template/g'
git grep -l 'Web App' | xargs sed -i '' -e 's/Web App/My App/g'Update the files:
README.mdpackage.jsonpublic/index.htmlpublic/manifest.jsonsrc/index.jsInstall the dependencies:
npm installInitialize a new repository:
rm -rf .git
git initMake your first commit:
git add .
git commit -m 'feat: initialize project from web-app-template'Commit messages follow the Conventional Commits format, which is used during release.
Once you're ready, push the local repository to GitHub (or another remote repository):
git remote add origin <remote-repository-url>
git push origin -u origin masterIn the project directory, you can run:
npm startRuns the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm run buildBuilds the app for production to the build folder.
It correctly bundles in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
npm run releaseBumps the package.json version with standard-version.
npm run deployDeploys the app to GitHub Pages by force pushing the build folder to the remote repository's gh-pages branch.
Environment variables work similarly to Create React App except they begin with WEB_APP_ instead of REACT_APP_.
For example:
# .env
WEB_APP_VERSION=$npm_package_version
WEB_APP_DOMAIN=www.example.com
WEB_APP_FOO=$DOMAIN/foo
Tests are run just like Create React App:
npm testYou can build the production app locally with:
npm run buildRename the build directory if your app is hosted at a subdirectory:
mv build web-app-templateOr enter the build directory if your app is hosted at the root:
cd buildStart a static file server:
python -m SimpleHTTPServerStop the server with Ctrl + C.
Open http://localhost:8000 to view it in the browser.
If your app is hosted at a subdirectory, open the folder in the directory listing.
Once you're done, clean up the build directory.
If your app is hosted at a subdirectory:
rm -rf web-app-templateOr if your app is hosted at the root:
rm -rf buildDirectory structure (dotfiles are omitted):
tree -I 'build|node_modules'
.
├── LICENSE
├── README.md
├── package.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ ├── logo192.png
│ ├── logo512.png
│ ├── manifest.json
│ └── robots.txt
└── src
├── index.css
├── index.js
├── reportWebVitals.js
└── setupTests.js
2 directories, 13 filesMigrate to use @descriptive/web-scripts:
npx web-scripts-migrationSee blog post or web-scripts-migration.
MIT