Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 2.03 KB

development.md

File metadata and controls

48 lines (31 loc) · 2.03 KB

Development guide

This guide is for people who want to modify funko-fs.

Setup

This project requires a recent version of node, npm and git. It also requires the commands rm and cp to be available.

  • git clone https://github.com/mickvangelderen/funko-fs to get the code.
  • npm run setup to configure git.

The npm run setup command installs git hooks so you don't forget to do lint, test and sort configuration files when committing and to check your node version, update, dedupe and check for possible dependency updates when pulling. It also enables the --follow-tags flag for git so you don't forget to push tags.

Code

The code can be found in the src/ directory. It will be transpiled to the lib/ directory which is ignored by git but not by npm.

Scripts

You can always inspect the package.json or issue npm run to view the available scripts but here is an overview:

  • npm run build: Build this project.
  • npm run check-node-version: Check your node version.
  • npm run clean: Remove built assets.
  • npm run lint: Check code syntax and style.
  • npm run resume: Run when you resume working on your package.
  • npm run setup: Run after cloning.
  • npm run sort: Sort files to minimize merge conflicts.
  • npm run test: Check version, lint and test.

Hooks

The following git hooks are installed by running npm run setup:

Versioning and publishing

Simply use npm version <version> and npm publish.

Tools

  • Asserted with must.
  • Linted with eslint and its recommended settings which I feel are good enough.
  • Tested with mocha.
  • Transpiled with babel from es2015 to node5.