Skip to content

Commit

Permalink
chore: nit
Browse files Browse the repository at this point in the history
  • Loading branch information
hongaar committed Nov 24, 2022
1 parent a7389e4 commit 1570241
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn doctoc
yarn prettier --write README.md
yarn todos
yarn prettier --write TODO.md
yarn lint-staged
yarn todos && git add TODO.md
yarn prettier --write TODO.md && git add TODO.md
yarn doctoc && git add README.md
yarn prettier --write README.md && git add README.md
yarn lint-staged
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# moker [![npm](https://img.shields.io/npm/v/moker)](https://www.npmjs.com/package/moker)

**No more struggles setting up monorepo tooling. Kick-start monorepos and
workspaces fast:**
**No more struggles setting up monorepos. Kick-start monorepos, workspaces and
tooling:**

```bash
# initialize a monorepo
yarn dlx moker create my-monorepo
cd my-monorepo

# install common tools
yarn moker use prettier husky lint-staged github-actions devcontainer
yarn moker use prettier husky lint-staged doctoc semantic-release

# create workspaces
yarn moker add --template express server
Expand Down Expand Up @@ -52,8 +52,8 @@ yarn moker add --template cra client
- [`todos` _workspace_](#todos-_workspace_)
- [`typescript` _workspace_](#typescript-_workspace_)
- [Available templates](#available-templates)
- [`common` _monorepo_](#common-_monorepo_)
- [`bandersnatch` _workspace_](#bandersnatch-_workspace_)
- [`common` _monorepo_](#common-_monorepo_)
- [`cra` _workspace_](#cra-_workspace_)
- [`express` _workspace_](#express-_workspace_)
- [`lib` _workspace_](#lib-_workspace_)
Expand Down Expand Up @@ -275,17 +275,17 @@ This plugin sets up [TypeScript](https://www.typescriptlang.org) and adds a
# Available templates
## `common` _monorepo_
This is the only monorepo template at this point. It simply installs all
available monorepo plugins.
## `bandersnatch` _workspace_
Scaffolds a simple [bandersnatch](https://github.com/hongaar/bandersnatch) CLI
app tool with the [typescript](#typescript-workspace) and
[jest](#jest-workspace) plugins.
## `common` _monorepo_
This is the only monorepo template at this point. It simply installs all
available monorepo plugins.
## `cra` _workspace_
Uses [create-react-app](https://create-react-app.dev/) to scaffold a React.js
Expand Down
5 changes: 3 additions & 2 deletions packages/plugins/src/doctoc/doctoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import {
removePreCommitHookCommand,
} from "../husky/husky.js";

const PRE_COMMIT_HOOK_COMMAND = "yarn doctoc";
const PRE_COMMIT_HOOK_COMMAND_FORMAT = "yarn prettier --write README.md";
const PRE_COMMIT_HOOK_COMMAND = "yarn doctoc && git add README.md";
const PRE_COMMIT_HOOK_COMMAND_FORMAT =
"yarn prettier --write README.md && git add README.md";

async function install({ directory }: PluginArgs) {
enqueueInstallDependency({ directory, identifier: "doctoc", dev: true });
Expand Down
5 changes: 3 additions & 2 deletions packages/plugins/src/todos/todos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import {
removePreCommitHookCommand,
} from "../husky/husky.js";

const PRE_COMMIT_HOOK_COMMAND = "yarn todos";
const PRE_COMMIT_HOOK_COMMAND_FORMAT = "yarn prettier --write TODO.md";
const PRE_COMMIT_HOOK_COMMAND = "yarn todos && git add TODO.md";
const PRE_COMMIT_HOOK_COMMAND_FORMAT =
"yarn prettier --write TODO.md && git add TODO.md";

async function install({ directory }: PluginArgs) {
enqueueInstallDependency({ directory, identifier: "leasot", dev: true });
Expand Down

0 comments on commit 1570241

Please sign in to comment.