devkeeper
Keeps node module development environment up to date. Installs config files, development dependencies and modifies your package.json file and keeps them updated.
Last updated 24 days ago by ozum .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install devkeeper 
SYNC missed versions from official npm registry.

devkeeper

Commitizen friendly Conventional Commits

Keeps node module development environment up to date. Installs config files, development dependencies and modifies your package.json file and keeps them updated.

Synopsis

OVERWRITE WARNING: Devkeeper creates and updates your node.js project boilerplate by updating and overwriting your configuration files.

Installation

$ npm install -D devkeeper
$ npx devkeeper update -d --features vuepress

Updating to latest version

$ npm run devkeeper:update

Usage

$ npm install -g devkeeper
$ devkeeper COMMAND
running command...
$ devkeeper (-v|--version|version)
devkeeper/0.1.75 darwin-x64 node-v14.1.0
$ devkeeper --help [COMMAND]
USAGE
  $ devkeeper COMMAND
...

Commands

devkeeper help [COMMAND]

display help for devkeeper

USAGE
  $ devkeeper help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

devkeeper uninstall

Uninstall files and configuration added previously.

USAGE
  $ devkeeper uninstall

OPTIONS
  -h, --help  show CLI help

EXAMPLE
  $ devkeeper uninstall

See code: dist/commands/uninstall.js

devkeeper update

Updates node module development environment by adding configuration files installing development dependencies and modifying 'package.json' file.

USAGE
  $ devkeeper update

OPTIONS
  -d, --addDependencies    Add dependencies to 'package.json'
  -f, --features=features  (CSV) Features to add. ('vuepress')
  -h, --help               show CLI help

EXAMPLES
  $ devkeeper update
  $ devkeeper update --features vuepress

See code: dist/commands/update.js

Features

Features are feature sets which is used by -f or --features flag or by adding .devkeeperrc.json features array.

$ npm run devkeeper:update -f vuepress

Feature Description
vuepress Adds vuepress related dependencies and scripts to package.json.
rollup Adds rollup related dependencies and scripts to package.json, updates related keys in package.json and adds rollup.config.ts.
microbundle Adds microbundle related dependencies and scripts to package.json, updates related keys in package.json.
ts-import-helpers Updates tsconfig.json as "importHelpers": true. Also adds tslib dependency to package.json.

.devkeeperrc.json

.devkeeperrc.json file in project root is used to configure additional options.

Key Description
features Adds features see feature in this document.
files Merges configuration stored in values to files corresponding key. i.e. "files": { "jest.config.json": { "coverageThreshold": ... } } merges given configuration to jest.config.json file.
vuepress VuePress configuration
vuepress.googleAnalytics.id Google Analytics Id for VuePress site. i.e. UA-00000000-0.

package.json Scripts

For projects

Script Description
build Builds project using TypeScript.
commit Commits staged files using commitizen and cz-conventional-changelog commits files with a preferred format.
commit:add Stages and commits all changed files and commits them using commitizen and cz-conventional-changelog
docs:build Builds VuePress web site for production. Should be used by netlify during build step in their servers.
docs:dev Starts VuePress development web site. Note: TypeDoc docs should be updated manually using npm run typedoc:html and npm run typedoc:md during development when TypeDoc comments are updated.
format Formats source codes.
lint Lints source codes and auto fixes when possible.
readme Updates README.md file using readmeasy.
release See details below Adds changed files to git, pushes source code to git repository and publishes to npm after validating (test & lint etc.) source code, updating README.
test Test project
test:watch Watches for file changes and re-runs tests.
typedoc:html Generates TypeDoc HTML documentation web site into api-docs-html directory.
typedoc:md Generates VuePress compatible Markdown files from TypeDoc comments into api-docs-md directory. Also renames all index.md files (i.e. for Index class) as index2.md. (Vuepress throws error for index.md files)
typedoc:single-md Generates Markdown files from TypeDoc and concatenates them into api.md file.
validate Lints and tests source code.

For Internal Use

Script Description
postinstall Runs update script after this module is installed into target project.
postpack Required by oclif CLI framework.
postreadme Inserts oclif documenatition into README.md after README.md is generated by readmeasy.
prepack Required by oclif CLI framework.
update Updates devkeeper using itself. Also runs update-packages.
update-packages Updates package.json files in module-files/package-json directory like npm update. Also informs if it founds difference between wanted version and latest version.

release

Descriptions of the parts of release script is as follows:

Part Description
&& The right side of && will only be evaluated if the exit status of the left side is zero (i.e. true).
|| The right side of || will only be evaluated if the exit status of the left side is non-zero (i.e. false).
(git diff --quiet && git diff --staged --quiet && echo No files has been changed) || If any git tracked file has been changed command continues, echoes a warning otherwise.
npm-run-all -p build commit:add Builds project, adds all changed files to git. After that commitizen prompt starts. Built files are for npm only and ignored by git, so those commands run parallel.
git checkout master && git pull origin master Checks master branch and pulls latest changes.
standard-version --no-verify Updates version number and changelog.
npm run readme && git add README.md && git commit --amend --no-edit Updates README.md, adds it to git. --amend adds README.md into previous commit. README template may need latest version number from package.json, so README build step is added after standard-version and to prevent additional commit everytime just for README, change is added to previous commit.
git push --follow-tags origin master && npm publish Adds version to tags, pushes to git and publishes to npm.

Files

Files Related Description
.czrc commitizen, cz-conventional-changelog Config and adapter settings for commitizen.
.commitlintrc @commitlint/cli & @commitlint/config-conventional Config and adapter settings for commitlint.
.editorconfig EditorConfig Config for defining coding styles that enable editors adhere to defined styles.
.eslintignore ESLint List of paths to be ignored by eslint.
.eslintrc.js ESLint Configuration for eslint.
.gitattributes .gitattributes File that gives Git attributes to pathnames.
.gitignore .gitignore File which specifies intentionally untracked files that Git should ignore.
.huskyrc husky Config to define what would be executed at each git stage.
.lintstagedrc lint-staged Config to define what should be done each type of changed files.
.mode-scriptsrc.json Config for this module.
.prettierrc prettier Config for prettier code formatter.
.jest.config.json jest Config for Jest testing framework.
README.njk readmeasy Template file for README.md
tsconfig.json tsconfig Config for TypeScript

Packages Used

Commitizen

Packages: commitizen, cz-conventional-changelog

When you commit with Commitizen, you'll be prompted to fill out any required commit fields at commit time.

images

Commit Lint & Standard Version

Packages: @commitlint/cli & @commitlint/config-conventional, standard-version,

commitlint checks if your commit messages meet the conventional commit format.

Standard Version: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org

Commitlint: Checks if your commit messages meet the conventional commit format.

First Release

standard-version --first-release will tag a release without bumping the version

standard-version will tag a release and bump the version

Husky

Packages: husky

Git hooks made easy. Husky can prevent bad git commit, git push and more. It is used here to execute

  • lint-staged at precommit,
  • commitlint at commit-msg,
  • commitizen at prepare-commit-msg (currently disabled, see this issue)

There is one disabled feature. See https://github.com/commitizen/cz-cli/issues/558#event-2490437059 for "prepare-commit-msg": "exec < /dev/tty && git cz --hook"

Lint Staged

Packages: lint-staged

Run linters against staged git files, so non-changed files are excluded from linters.

File Type What
js, ts Lint, test, coverage
json, md, css etc. Format
rc, json Lint

Documentation

TypeDoc

TypeDoc TypeDoc converts comments in TypeScript source code into rendered HTML documentation. Also it is possible to create multiple Markdown files using typedoc-plugin-markdown plugin. Using concat-md it is possible to create single Markdown file.

VuePress

VuePress is used to create documentation web sites. vuepress-bar is used to generate VuePress menu. Also TypeDoc HTML and typedoc-plugin-markdown generated API docs is included in VuePress site.

Netlify may be used to publish documentation.

Notes

.npmignore (or lack of)

.npmignore is not used, because this file overrides .gitignore and may results unpredictable behavior. Instead of using a blacklist for node modules, it is safer to write whitelisted files to be published in files key in package.json.

Development

File Locations

Fİles are grouped after feature names in module-files directory. common are included always and others are included if requested with -f flag i.e. (-f vuepress)

File Location Description
src/commands oclif commands
module-files/files/[feature name]/dont-overwrite Files to be copied if they don't exist in target project.
module-files/files/[feature name]/overwrite Files to be copied and overwritten even they exist in target project. Also those are deleted during uninstall.
module-files/package-json/[feature name]/package.json package.json entries to be added to target project's package.json. They are nunjucks templates which are passed { intermodular: intermodular, path: path module } object.

package.json entries are merged and added to target project's package.json. Also changes made by this project is tracked devkeeperModifications key in target project's package.json.

Current Tags

  • 0.1.75                                ...           latest (24 days ago)

73 Versions

  • 0.1.75                                ...           24 days ago
  • 0.1.74                                ...           a month ago
  • 0.1.73                                ...           a month ago
  • 0.1.72                                ...           a month ago
  • 0.1.71                                ...           a month ago
  • 0.1.70                                ...           a month ago
  • 0.1.69                                ...           a month ago
  • 0.1.68                                ...           a month ago
  • 0.1.67                                ...           a month ago
  • 0.1.66                                ...           a month ago
  • 0.1.65                                ...           2 months ago
  • 0.1.64                                ...           2 months ago
  • 0.1.63                                ...           2 months ago
  • 0.1.62                                ...           2 months ago
  • 0.1.61                                ...           2 months ago
  • 0.1.60                                ...           2 months ago
  • 0.1.59                                ...           2 months ago
  • 0.1.58                                ...           3 months ago
  • 0.1.57                                ...           3 months ago
  • 0.1.56                                ...           5 months ago
  • 0.1.55                                ...           5 months ago
  • 0.1.54                                ...           5 months ago
  • 0.1.53                                ...           5 months ago
  • 0.1.52                                ...           6 months ago
  • 0.1.51                                ...           6 months ago
  • 0.1.50                                ...           6 months ago
  • 0.1.49                                ...           6 months ago
  • 0.1.48                                ...           7 months ago
  • 0.1.47                                ...           7 months ago
  • 0.1.46                                ...           7 months ago
  • 0.1.45                                ...           7 months ago
  • 0.1.44                                ...           7 months ago
  • 0.1.43                                ...           7 months ago
  • 0.1.42                                ...           7 months ago
  • 0.1.41                                ...           7 months ago
  • 0.1.40                                ...           7 months ago
  • 0.1.39                                ...           7 months ago
  • 0.1.38                                ...           7 months ago
  • 0.1.37                                ...           7 months ago
  • 0.1.36                                ...           7 months ago
  • 0.1.35                                ...           7 months ago
  • 0.1.34                                ...           7 months ago
  • 0.1.33                                ...           7 months ago
  • 0.1.32                                ...           7 months ago
  • 0.1.31                                ...           7 months ago
  • 0.1.30                                ...           7 months ago
  • 0.1.29                                ...           7 months ago
  • 0.1.28                                ...           7 months ago
  • 0.1.27                                ...           7 months ago
  • 0.1.26                                ...           7 months ago
  • 0.1.25                                ...           7 months ago
  • 0.1.24                                ...           7 months ago
  • 0.1.23                                ...           8 months ago
  • 0.1.22                                ...           8 months ago
  • 0.1.21                                ...           8 months ago
  • 0.1.20                                ...           8 months ago
  • 0.1.19                                ...           8 months ago
  • 0.1.18                                ...           8 months ago
  • 0.1.16                                ...           8 months ago
  • 0.1.15                                ...           8 months ago
  • 0.1.14                                ...           8 months ago
  • 0.1.13                                ...           8 months ago
  • 0.1.12                                ...           8 months ago
  • 0.1.11                                ...           8 months ago
  • 0.1.10                                ...           8 months ago
  • 0.1.9                                ...           8 months ago
  • 0.1.8                                ...           8 months ago
  • 0.1.7                                ...           8 months ago
  • 0.1.6                                ...           8 months ago
  • 0.1.5                                ...           9 months ago
  • 0.1.3                                ...           10 months ago
  • 0.1.2                                ...           10 months ago
  • 0.1.1                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 151
Dependencies (64)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |