diff --git a/greenkeeper.json b/greenkeeper.json new file mode 100644 index 0000000..291ec66 --- /dev/null +++ b/greenkeeper.json @@ -0,0 +1,9 @@ +{ + "groups": { + "default": { + "packages": [ + "templates/package.json" + ] + } + } +} diff --git a/index.yml b/index.yml index 4abfe24..2e316a4 100644 --- a/index.yml +++ b/index.yml @@ -1,6 +1,8 @@ version: 1.0.0 requires: fbl: '>=0.4.3' + applications: + - yarn pipeline: '--': @@ -11,8 +13,14 @@ pipeline: - prompt: message: 'What is the name of the plugin?' + default: <%- $.require('path').basename(cwd) %> assignResponseTo: ctx: $.name + schema: + type: string + maxLength: 214 + minLength: 1 + pattern: "^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$" - prompt: message: 'What license you want to use?' @@ -27,7 +35,7 @@ pipeline: ctx: $.destination - prompt: - message: 'Who is the author of it?' + message: 'Who is the author?' assignResponseTo: ctx: $.author @@ -54,3 +62,8 @@ pipeline: contentFromFile: templates/<$- path $> path: <%- $.fs.getAbsolutePath(ctx.destination, cwd) %>/<$- path $> <$ }); $> + + - exec: + command: yarn + args: + - install \ No newline at end of file diff --git a/templates/package.json b/templates/package.json index f1ed3fc..d4631b3 100644 --- a/templates/package.json +++ b/templates/package.json @@ -11,8 +11,7 @@ "test": "nyc --reporter=html --reporter=text mocha", "build": "rimraf ./dist/ && tsc", "lint": "tslint -c tslint.json 'src/**/*.ts' 'test/**/*.ts'", - "prepublishOnly": "npm run build", - "precommit": "npm run lint" + "prepublishOnly": "npm run build && npm run lint" }, "author": "<%- ctx.author %>", "license": "<%- ctx.license %>", @@ -29,7 +28,7 @@ "@types/joi": "13.4.4", "@types/node": "10.9.4", "chai": "4.1.2", - "git-pre-commit": "2.1.4", + "husky": "1.1.2", "mocha": "5.2.0", "mocha-typescript": "1.1.17", "mochawesome": "3.0.3", @@ -40,6 +39,11 @@ "typescript": "3.0.3", "yarn-check": "0.0.3" }, + "husky": { + "hooks": { + "pre-commit": "yarn lint" + } + }, "nyc": { "check-coverage": true, "per-file": true,