Skip to content
GitHub Action edited this page Sep 22, 2020 · 1 revision

Continuous Delivery

Tiny app | Tapp

This is a tiny app template used for micro-architecture on client side.

Documentation

Every release of a tiny app generates code documentation and publishes it to the repositories wiki found in the tabs above.

Installation & Scripts

To get started with your new tiny app you are going to need Node and then follow this template guide to create new repository from a template. Recommendation is to also configure branch protection rules to limit direct pushes to the master branch without passsing status checks or taking it a step futher and requiring pull-request reviews. Follow the GitHub Flow guidelines regarding workflow.

After creating the new repository attach the template as an upstream remote for syncing updates.

git remote add tapp git@github.com:tapps-io/tapps-io.tapp.git

Then create a new feature branch to commit work to:

git checkout -b feature/[NAME]

Finally install all dependencies with:

npm install

Bellow are a list of NPM scripts that you can run to aid development.

Command Description CI/CD only
npm start Starts a dev server hosting the tiny app no
npm test Runs Jest tests for quality ensurance no
npm run build Compiles the code to the dist/ folder no
npm run schema Converts files in src/schema to TypeScript interfaces no
npm run release Publishes the dist/ to the package feed yes
npm run wiki Publishes the dist/docs to the wiki yes

Make changes then commit them using:

git add .
git commit -m "[MESSAGE]" # type(scope): #123 subject #flags
git push -u origin feature/[NAME]
Type [Scope] [ID] Subject [Flags]
feat, fix, perf, k8s, revert, docs, style, refactor, test, build, ci optional string #123 string repo specific

When you are ready either merge branch feature/[NAME] to master or create a pull-request depending on branch protection rules.

Now you are ready to build with ❤!

Updating

Run the following commands to update the starter kit when a new version is released.

git fetch tapp
git merge tapp/master --allow-unrelated-histories --squash --no-commit
npm install

Publishing

Default behavior is to publish packages to the GitHub repositories package feed configured in the .npmrc file. Before publishing, make sure to change the package "name" and any other descriptive keys inside the package.json file, as well as removing the "private": true line. Semantic release is used to automatically determine version; breaking changes result in a major versioning update, features in a minor, and fixes/performance in patches. No other types will trigger a release.

Version Trigger Change Application
X.1.1 BREAKING CHANGE Major Changes to event communication or breaking functionality
1.X.1 feat: Minor Changes that adds functionality, but still are backwards compatible
1.1.X fix/perf: Patch Changes fixing bugs without functionality additions

For more info read Semantic Versioning.

This command is intended to be run using a CI/CD pipeline such as GitHub Actions. It will generate a changelog from commits, git tag the release and finally push it to the repository.

npm run release

Browsers support

This tiny app aims to support the following configuration browserl.ist.

IE / Edge Firefox Chrome Safari iOS Safari Samsung Opera Opera Mini
IE11, Edge last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions last 2 versions

Clone this wiki locally