From e2f4c51af6adaa3a02a484f26988de40763f4d88 Mon Sep 17 00:00:00 2001 From: Marcel Mokos Date: Wed, 13 Mar 2019 10:31:44 +0100 Subject: [PATCH] docs: update generator to use param-case, add badges --- README.md | 1 + _templates/package/with-prompt/LICENSE | 4 ++-- _templates/package/with-prompt/README.ejs | 5 ----- _templates/package/with-prompt/README.md.t | 10 ++++++++++ _templates/package/with-prompt/index.ejs.t | 2 +- _templates/package/with-prompt/index.test.ejs.t | 6 +++--- _templates/package/with-prompt/package.ejs.t | 8 ++++---- _templates/package/with-prompt/package2.babelrc.ejs.t | 4 ++-- _templates/package/with-prompt/prompt.js | 2 +- packages/eslint-config-ableneo/README.md | 2 +- yarn.lock | 2 +- 11 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 _templates/package/with-prompt/README.ejs create mode 100644 _templates/package/with-prompt/README.md.t diff --git a/README.md b/README.md index ffe3261..a5f6005 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) +[![Build Status](https://travis-ci.org/ableneo/tools)](https://travis-ci.org/ableneo/tools) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![dependency](https://david-dm.org/ableneo/tools/status.svg)](https://david-dm.org/ableneo/tools) [![devDep](https://david-dm.org/ableneo/tools/dev-status.svg)](https://david-dm.org/ableneo/tools?type=dev) diff --git a/_templates/package/with-prompt/LICENSE b/_templates/package/with-prompt/LICENSE index db135db..05a678f 100644 --- a/_templates/package/with-prompt/LICENSE +++ b/_templates/package/with-prompt/LICENSE @@ -1,9 +1,9 @@ --- -to: packages/<%= name.toLowerCase() %>/LICENSE +to: packages/<%= h.changeCase.paramCase(name) %>/LICENSE --- MIT License -Copyright (c) 2019 Marcel Mokoš +Copyright (c) 2019 Marcel Mokoš, ableneo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/_templates/package/with-prompt/README.ejs b/_templates/package/with-prompt/README.ejs deleted file mode 100644 index 476fcee..0000000 --- a/_templates/package/with-prompt/README.ejs +++ /dev/null @@ -1,5 +0,0 @@ ---- -to: packages/<%= name.toLowerCase() %>/README.md ---- - -# <%= name.toLowerCase() %> diff --git a/_templates/package/with-prompt/README.md.t b/_templates/package/with-prompt/README.md.t new file mode 100644 index 0000000..4140780 --- /dev/null +++ b/_templates/package/with-prompt/README.md.t @@ -0,0 +1,10 @@ +--- +to: packages/<%= h.changeCase.paramCase(name) %>/README.md +--- +# <%= h.changeCase.paramCase(name) %> + +[![npm version](https://img.shields.io/npm/v/<%= h.changeCase.paramCase(name) %>.svg?style=flat)](https://www.npmjs.com/package/@ableneo/<%= h.changeCase.paramCase(name) %>) +[![Build Status](https://travis-ci.org/ableneo/tools)](https://travis-ci.org/ableneo/tools) +[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) +[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) + diff --git a/_templates/package/with-prompt/index.ejs.t b/_templates/package/with-prompt/index.ejs.t index 0817583..921dc2a 100644 --- a/_templates/package/with-prompt/index.ejs.t +++ b/_templates/package/with-prompt/index.ejs.t @@ -1,5 +1,5 @@ --- -to: packages/<%= name.toLowerCase() %>/src/index.js +to: packages/<%= h.changeCase.paramCase(name) %>/src/index.js --- export default () => null; diff --git a/_templates/package/with-prompt/index.test.ejs.t b/_templates/package/with-prompt/index.test.ejs.t index d476e87..fdd1c4e 100644 --- a/_templates/package/with-prompt/index.test.ejs.t +++ b/_templates/package/with-prompt/index.test.ejs.t @@ -1,10 +1,10 @@ --- -to: packages/<%= name.toLowerCase() %>/src/index.test.js +to: packages/<%= h.changeCase.paramCase(name) %>/src/index.test.js --- -import indexFn from "./"; +import indexFn from "."; it("indexFn", () => { expect(indexFn()).toBe(null); -}) +}); diff --git a/_templates/package/with-prompt/package.ejs.t b/_templates/package/with-prompt/package.ejs.t index 71859d5..ad5ce3c 100644 --- a/_templates/package/with-prompt/package.ejs.t +++ b/_templates/package/with-prompt/package.ejs.t @@ -1,10 +1,10 @@ --- -to: packages/<%= name.toLowerCase() %>/package.json +to: packages/<%= h.changeCase.paramCase(name) %>/package.json --- { - "name": "@ableneo/<%= name.toLowerCase() %>", + "name": "@ableneo/<%= h.changeCase.paramCase(name) %>", "version": "0.0.0", - "description": "@ableneo/tools/<%= name.toLowerCase() %>", + "description": "@ableneo/tools/<%= h.changeCase.paramCase(name) %>", "main": "dist/index.js", "module": "dist/index.es.js", "author": "Marcel Mokoš ", @@ -26,7 +26,7 @@ to: packages/<%= name.toLowerCase() %>/package.json }, "repository": { "type": "git", - "url": "https://github.com/ableneo/tools/packages/<%= name.toLowerCase() %>/" + "url": "https://github.com/ableneo/tools/packages/<%= h.changeCase.paramCase(name) %>/" } } diff --git a/_templates/package/with-prompt/package2.babelrc.ejs.t b/_templates/package/with-prompt/package2.babelrc.ejs.t index 4436faa..99a08bb 100644 --- a/_templates/package/with-prompt/package2.babelrc.ejs.t +++ b/_templates/package/with-prompt/package2.babelrc.ejs.t @@ -1,6 +1,6 @@ --- -to: packages/<%= name.toLowerCase() %>/.babelrc -sh: cd <%= cwd %>/packages/<%= name.toLowerCase() %> && yarn add -D @babel/core @babel/preset-env babel-jest +to: packages/<%= h.changeCase.paramCase(name) %>/.babelrc +sh: cd <%= cwd %>/packages/<%= h.changeCase.paramCase(name) %> && yarn add -D @babel/core @babel/preset-env babel-jest --- { "presets": [ diff --git a/_templates/package/with-prompt/prompt.js b/_templates/package/with-prompt/prompt.js index fb7a682..98dc1e3 100644 --- a/_templates/package/with-prompt/prompt.js +++ b/_templates/package/with-prompt/prompt.js @@ -5,6 +5,6 @@ module.exports = [ { type: "input", name: "name", - message: "What's the NAME of your package? (@ableneo/NAME)", + message: "What's the NAME of your package? (@ableneo/NAME) use param-case", }, ]; diff --git a/packages/eslint-config-ableneo/README.md b/packages/eslint-config-ableneo/README.md index 9c10cb0..2d2e82c 100644 --- a/packages/eslint-config-ableneo/README.md +++ b/packages/eslint-config-ableneo/README.md @@ -2,7 +2,7 @@ [![npm version](https://img.shields.io/npm/v/eslint-config-ableneo.svg?style=flat)](https://www.npmjs.com/package/eslint-config-ableneo) -[![Build Status](https://travis-ci.org/ableneo/tools)](https://travis-ci.org/ableneo/eslint-config-ableneo) +[![Build Status](https://travis-ci.org/ableneo/tools)](https://travis-ci.org/ableneo/tools) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) diff --git a/yarn.lock b/yarn.lock index 6aa208f..e26e7c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3466,7 +3466,7 @@ escodegen@^1.9.1: source-map "~0.6.1" "eslint-config-ableneo@file:packages/eslint-config-ableneo": - version "0.0.0" + version "0.0.1" eslint-config-airbnb-base@^13.1.0: version "13.1.0"