Skip to content

Commit

Permalink
fix: plop generation
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Apr 13, 2022
1 parent 12f3203 commit 3cfe0e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
6 changes: 3 additions & 3 deletions plop/utility/README.md.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# @zag-js/{{packageName}}
# @zag-js/{{name}}

{{description}}

## Installation

```sh
yarn add @zag-js/{{packageName}}
yarn add @zag-js/{{name}}
# or
npm i @zag-js/{{packageName}}
npm i @zag-js/{{name}}
```

## Contribution
Expand Down
6 changes: 3 additions & 3 deletions plop/utility/package.json.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@zag-js/{{packageName}}",
"name": "@zag-js/{{name}}",
"version": "0.0.0",
"description": "{{description}}",
"keywords": ["js", "utils", "{{packageName}}"],
"keywords": ["js", "utils", "{{name}}"],
"author": "Segun Adebayo <sage@adebayosegun.com>",
"homepage": "https://github.com/chakra-ui/zag#readme",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/{{packageName}}",
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/{{name}}",
"sideEffects": false,
"files": ["dist/**/*"],
"scripts": {
Expand Down
11 changes: 4 additions & 7 deletions plopfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = function main(plop) {
templateFiles: "machine/**",
destination: `../packages/machines/{{dashCase machine}}`,
base: "machine/",
data: { machine, packageName: machine },
data: { machine, name: machine },
abortOnFail: true,
})

Expand Down Expand Up @@ -60,13 +60,10 @@ module.exports = function main(plop) {

actions.push({
type: "addMany",
templateFiles: "util-template/**",
templateFiles: "utility/**",
destination: `../packages/utilities/${name}`,
base: "util-template/",
data: {
description,
packageName: name,
},
base: "utility/",
data: { description, name },
abortOnFail: true,
})

Expand Down

0 comments on commit 3cfe0e8

Please sign in to comment.