0.1.3 • Published 6 years ago

@knotworkjs/core v0.1.3

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

Knotwork.js

JavaScript Style Guide NPM version build status Coveralls node version npm download license

KnotworkJS 是基于 koajs 开发的微型框架,主要解决项目前期快速迭代的需求和为团队后期全面接入 koajs 做准备,项目后期可迁移至 eggjs 或其他基于 koajs 开发的大型框架。

功能介绍

  • 支持多环境配置
  • 自动拓展 Koa.Context 对象
  • 支持上层框架拓展 (功能较弱)

环境要求

  • 因使用 koa2 所以 nodejs 最好使用目前最新 LTS 版本。

使用

第一个参数必填,是用于拼接约定的文件路径。

const KnotworkJS = require('@knotworkjs/core');

const app = new KnotworkJS(__dirname)
const router = require('router')(app)
app
  .use(router.routes())
  .use(router.allowedMethods())
  .startup()

使用文档

  • 待完善

可参考 boilerplate 搭建项目。

版本发布

# 发布里程碑版本
$ npm version major -m "Release %s milestone version"

# 常规版本发布
$ npm version minor -m "Release %s software version"

# 发布补丁修复版
$ npm version patch -m "Release %s hotfix version"

使用 npm 的 version 命令管理版本发布,更多命令可使用 npm version --help 查看

待办

  • 添加单元测试
  • 支持 service 自动查找

感谢

以下排名不分先后.

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago