<DELETE THIS SECTION (FOR YOUR EYES ONLY!)
<If you have created this application using both amplify and git you will:
<1. Have 3 environments (master, test, dev)
<2. Each environment has a branch associated with it (master, test, dev)
<3. They are synchronized and currently using the default
aws profile
<4. You can switch between environments using applify switch <env name>
<5. You can push and pull changes between environments using applify push/pull <env name>
<6. You can add amplify
resources using standard amplify syntax
<7. You can publish your app using standard amplify
syntax
<8. Standard amplify syntax look like amplify add auth
or amplify publish
test-applify
Table of Contents
- Security
- Background
- Install
- Usage
- Multi Environment Support
- Build & Package
- Dev Tools
- ESLint
- Testing
- Contributing
- App Configuration
- Documentation
- Maintainers
- Under The Hood
- Disclaimer
- License
Security
Unauthorised access to this repository, any of its contents is prohibited. Permission must be explicitly given from a maintainer.
Do not copy or share this repository, its url, or any of its downloadable content unless specified by the license.
Please refer to the LICENSE
Install
Clone the repo and install dependencies:
Caveat - requires node version >= 10, use:
nvm use 10
Make sure to use the latest version of npm:
npm i -g npm
Note: If you upgrade from previous versions of node or npm you may have to clear out your
node_modules
and the npm caches:rm -rf node_modules npm cache clean --force
git clone git@github.com:nickmanks/applify.git
cd applify
npm ci
npx run
Usage
To start the application in your development environment:
npx run
This will run both
webpack
andstorybook
servers. Application can be viewed onlocalhost:8080
Storybook stories can be view onlocalhost:8000
This runs webpack's dev server with live reloading enabled. You can find it's configuration in webpack.config.babel.js.
Note: If you need to start a dev server supporting all production browsers
please run npx run config --node-env=production
.
Multi environment
to switch environments:
applify switch <branch-name>
to push environments:
applify push
to pull environments:
applify pull
Build and Package
To run a build use:
npx run build
This will run a production build.
Dev Tools
Check out some useful tools for development:
ESLint Installation
If for some odd reason, eslint
does not work, you can add the node_modules/.bin
to your path:
export PATH="$PATH:./node_modules/.bin"
Running tests
Before committing and pushing code you should run the full suite of tests. This includes linting with config from .eslintrc, and running the unit-test using jest with config from jest.config.json:
npx run test
You will find code coverage results in build/cov
including a HTML report:
open ./build/cov/lcov-report/index.html
Quickly Run Tests
NOTE: The next two are only for debugging. You must run the full test suite (as described above) before committing/pushing to origin.
All tests (without coverage and using the test cache)
npm run jest -- --verbose=false --collectCoverage=false --runInBand=false --cache=true
Single test
npm run jest -- --verbose=false --collectCoverage=false --runInBand=false --cache=true FULL_FILE_PATH
where FULL_FILE_PATH is the path from the root to the test (e.g. - src/app/reducer.test.js)
NOTE: that if you are running on Windows, you have to specify double slashes for the path (e.g. - src\app\reducer.test.js).
npm run jest -- --verbose=false --collectCoverage=false --runInBand=false --cache=true src\app\reducer.test.js
Contributing
Pull requests and commits follow commitizen conventional commit guidelines.
npx git-cz
It is reccommended to use the
applify push
andapplify pull
commands for updating environments, these will automate the git and amplify workflows and keep them in sync.
Configuration
Documentation
To run the local documentation generator and view the project documentation run:
npx run docs
This will build your code documentation (using JSDoc). Once started, you can view the docs at http://localhost:3000
Maintainers
Small note: If editing the README, please conform to the standard-readme specification.
Under the Hood
Disclaimer
Any use of this software by any person will incur no liability on the owner of this software.