kii-gateway-agent
kii-gateway-agent for node module
Last updated 2 years ago by ashramwen .
Apache 2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kii-gateway-agent 
SYNC missed versions from official npm registry.

kii-gateway-agent

kii-gateway-agent for node modules written in TypeScript.

DX & minimizing tech-debt

This package take an opinioned view on the Developer-Experience with an eye towards minimizing tech-debt. There are two operations that will be part of a developer experience:

  • npm build: cleans, lints, builds and tests with coverage metrics.
  • npm build:dist: generates distribution artifacts

The process is meant to serve as an early-warning mechanism to catch issues that will cause potentially expensive mishaps or re-work later in the project life-cycle.

run-scripts

Since "lean"-ness is a primary goal, npm is used as a build tool.

The run-scripts used: aside: To help with these, we recommend npm-completion?

clean       : removes all generated directories
prebuild    : cleans build and runs tslint (for large projects, remove the automatic clean)
build       : builds the project
postbuild   : runs tests
test        : runs tests with coverage on generated JavaScript
posttest    : remaps coverage report to source TypeScript
build:watch : watch project files and rebuild when anything changes
build:dist  : build a distribution (no tests)
npm-sh      : spawn a new shell with local npm installs in path
secure      : checks all installed dependencies for vulnerabilities
check       : checks all installed dependencies for updates
lcheck      : list dependencies not in compliance with project license requirements
coverage    : prints coverage report over typescript source

Structure

The src directory structure of a typical project:

├── KiiHelper
│   ├── KiiBase.ts
│   ├── KiiHelper.ts
│   ├── KiiMqttHelper.ts
│   └── index.ts
├── model
│   ├── App.ts
│   ├── EndNode.ts
│   ├── Gateway.ts
│   ├── User.ts
│   └── index.ts
├── mqtt
│   ├── mqttws31.d.ts
│   └── mqttws31.js
├── index.ts
└── test.ts

In addition, these directories are auto-created by the various scripts. The coverage & build directories are .gitignored. By design, dist directories are - for pure-Type/JavaScript packages, this is an advantage. If your package included native/compiled artifacts, it might need to be reconsidered.

├── coverage
├── dist
└── build

Why are there two tsconfig*.json files?

TypeScript compiler configuration, tsconfig.json does not support multiple build targets. To create separate builds then, one has to use multiple config files and invoke atleast one of them explicitly like we do.

Further, our opinioned preferences is to keep source and associated tests together in the source tree. This requires to compile time configurations - a regular build that includes

License

Apache 2.0

Support

Bugs, PRs, comments, suggestions welcomed!

Current Tags

  • 0.2.9                                ...           latest (2 years ago)

26 Versions

  • 0.2.9                                ...           2 years ago
  • 0.2.8                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.10                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.12                                ...           2 years ago
  • 0.0.11                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (6)
Dev Dependencies (35)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |