1.1.0 • Published 6 years ago

doppler-feature-toggle v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

code style: prettier

Doppler Feature Toggle JavaScript Client

JavaScript client of our simple feature toggle system based on a JSON file over HTTP.

I am doing this project as part of Making Sense's Self Training Program.

The objective of this training is refreshing my knowledge on several technologies (TypeScript, Node, ES Modules) but mainly in the way to work with them to create a library (builds, tests, versions, continuous integration, packages, CDN).

See more details in CAP-215.

Usage

Nothing useful to use yet.

Development

Yarn scripts

  • yarn run test: Run test suite
  • yarn run test:watch: Run test suite in interactive watch mode
  • yarn run test:prod: Run tests, code format validator, lint analysis and generate coverage
  • yarn run build: Generate bundles and typings, create docs
  • yarn run start: Run build in watch mode
  • yarn run lint: Run lint analysis with TSLint
  • yarn run prettier: Run Prettier code formatter

Using with Docker

  • sh ./build-w-docker.sh: Execute yarn run test:prod into a Docker Node container.

Architecture and other decisions

It is based on TypeScript library starter, but in place of using it as it is, the project has been created from the scratch and taking different decisions.

TypeScript library starter resources

Other resources

Thanks to @joaquinicolas and @matiasbeckerle for sharing some of these links with me.

Yarn vs NPM

TypeScript library starter was using NPM. It is more advanced than the last version that I used before. For example it has a lock file like Yarn.

But some experiments gave me some issues in Travis running npm ci, so I prefer trying with Yarn.

Commit messages

I will use Angular's Commit Message Guidelines in order to generate release notes automatically using semantic release.

I like using rebase and merge, without squashing commits, I am not sure if it will work fine with semantic release, let's try.

Thanks to @stirelli for helping me with it.

Bundles and distribution

TypeScript library starter has building UMD and ES5 bundles out of the box, but I also want to use my library by linking the script file from a CDN source and Rollup is ready for that.

I have configured it using the convention described by Axel Rauschmayer