chimpTooling that helps you do quality, faster.

联合创作 · 2023-09-19 00:31

chimp


Your development companion for doing quality, faster. For a full documentation please go to chimpjs.com.


oclif Version Downloads/week License



Usage



$ npm install -g chimp
$ chimp COMMAND
running command...
$ chimp (-v|--version|version)
chimp/0.0.0-development darwin-x64 node-v12.16.2
$ chimp --help [COMMAND]
USAGE
$ chimp COMMAND
...


Commands



chimp create [NAME]


create (scaffold) a new app



USAGE
$ chimp create [NAME]

ARGUMENTS
NAME name of the new app, also used as the directory

OPTIONS
-a, --appPrefix=appPrefix [default: ~app] prefix that points to the sourcecode of your app
-g, --generatedPrefix=generatedPrefix [default: ~generated] prefix that points to the generated by chimp helper code
-h, --help show CLI help

EXAMPLES
$ chimp create my-new-app
$ chimp create my-new-app -a ~src -g ~chimp-helpers


See code: src/commands/create.ts


chimp generate


generate GraphQL code



USAGE
$ chimp generate

OPTIONS
-a, --appPrefix=appPrefix [default: ~app] prefix that points to the sourcecode of your app
-g, --generatedPrefix=generatedPrefix [default: ~generated] prefix that points to the generated by chimp helper code
-h, --help show CLI help

-p, --modulesPath=modulesPath path to the graphQL modules, only use if you are migrating an existing Apollo
App and you want to use chimp only for a part of it

EXAMPLES
$ chimp generate
$ chimp generate -a ~src -g ~chimp-helpers


See code: src/commands/generate.ts


chimp help [COMMAND]


display help for chimp



USAGE
$ chimp help [COMMAND]

ARGUMENTS
COMMAND command to show help for

OPTIONS
--all see all commands in CLI


See code: @oclif/plugin-help


chimp init


init Chimp



USAGE
$ chimp init

OPTIONS
-h, --help show CLI help
-p, --modulesPath=modulesPath [default: ./src/modules] path to the GraphQL modules.

EXAMPLES
$ chimp init
$ chimp init -p ./src/chimp-modules


See code: src/commands/init.ts


Updating jest.config.js after chimp init


Please manually add pathsToModuleNameMapper like so:



const { pathsToModuleNameMapper } = require("ts-jest/utils");
const { compilerOptions } = require("./tsconfig");
// ...
module.exports = {
// ...,
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: "<rootDir>/"
})
}

浏览 13
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报