diff --git a/plop-templates/plopfile.hbs b/plop-templates/plopfile.hbs deleted file mode 100644 index c6a1a4b204..0000000000 --- a/plop-templates/plopfile.hbs +++ /dev/null @@ -1 +0,0 @@ -# This is a index for plop \ No newline at end of file diff --git a/plop-templates/machine-template/README.md.hbs b/plop/machine/README.md.hbs similarity index 100% rename from plop-templates/machine-template/README.md.hbs rename to plop/machine/README.md.hbs diff --git a/plop-templates/machine-template/package.json.hbs b/plop/machine/package.json.hbs similarity index 67% rename from plop-templates/machine-template/package.json.hbs rename to plop/machine/package.json.hbs index 7ed9c256dc..14ec3543f0 100644 --- a/plop-templates/machine-template/package.json.hbs +++ b/plop/machine/package.json.hbs @@ -11,16 +11,20 @@ "module": "dist/index.mjs", "repository": "https://github.com/chakra-ui/zag/tree/main/packages/{{machine}}", "sideEffects": false, - "files": [ - "dist" - ], + "files": ["dist/**/*"], + "scripts": { + "build:fast": "yarn zag build", + start: "yarn zag build --watch", + build: "yarn zag build --prod", + test: "jest --config ../../jest.config.js --rootDir tests", + lint: "eslint src --ext .ts,.tsx", + "test:ci": "yarn test --ci --runInBand --updateSnapshot", + "test:watch": "yarn test --watch", + }, "publishConfig": { "access": "public" }, "bugs": { "url": "https://github.com/chakra-ui/zag/issues" - }, - "scripts": { - "build": "tsc src/index.ts --declaration --emitDeclarationOnly --target es2018 --outDir dist --skipLibCheck --moduleResolution node --strict false" } } diff --git a/plop-templates/machine-template/src/index.ts.hbs b/plop/machine/src/index.ts.hbs similarity index 100% rename from plop-templates/machine-template/src/index.ts.hbs rename to plop/machine/src/index.ts.hbs diff --git a/plop-templates/machine-template/src/{{machine}}.connect.ts.hbs b/plop/machine/src/{{machine}}.connect.ts.hbs similarity index 92% rename from plop-templates/machine-template/src/{{machine}}.connect.ts.hbs rename to plop/machine/src/{{machine}}.connect.ts.hbs index 419f5a076b..1bc3fc74a8 100644 --- a/plop-templates/machine-template/src/{{machine}}.connect.ts.hbs +++ b/plop/machine/src/{{machine}}.connect.ts.hbs @@ -10,7 +10,7 @@ export function {{capitalize machine}}connect({ + rootProps: normalize.element({ }), } } diff --git a/plop-templates/machine-template/src/{{machine}}.dom.ts.hbs b/plop/machine/src/{{machine}}.dom.ts.hbs similarity index 100% rename from plop-templates/machine-template/src/{{machine}}.dom.ts.hbs rename to plop/machine/src/{{machine}}.dom.ts.hbs diff --git a/plop-templates/machine-template/src/{{machine}}.machine.ts.hbs b/plop/machine/src/{{machine}}.machine.ts.hbs similarity index 100% rename from plop-templates/machine-template/src/{{machine}}.machine.ts.hbs rename to plop/machine/src/{{machine}}.machine.ts.hbs diff --git a/plop-templates/machine-template/src/{{machine}}.types.ts.hbs b/plop/machine/src/{{machine}}.types.ts.hbs similarity index 100% rename from plop-templates/machine-template/src/{{machine}}.types.ts.hbs rename to plop/machine/src/{{machine}}.types.ts.hbs diff --git a/plop-templates/util-template/README.md.hbs b/plop/utility/README.md.hbs similarity index 100% rename from plop-templates/util-template/README.md.hbs rename to plop/utility/README.md.hbs diff --git a/plop-templates/util-template/package.json.hbs b/plop/utility/package.json.hbs similarity index 62% rename from plop-templates/util-template/package.json.hbs rename to plop/utility/package.json.hbs index 649d2ead4e..6c0fb3857a 100644 --- a/plop-templates/util-template/package.json.hbs +++ b/plop/utility/package.json.hbs @@ -11,9 +11,16 @@ "types": "dist/index.d.ts", "repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/{{packageName}}", "sideEffects": false, - "files": [ - "dist" - ], + "files": ["dist/**/*"], + "scripts": { + "build:fast": "yarn zag build", + start: "yarn zag build --watch", + build: "yarn zag build --prod", + test: "jest --config ../../../jest.config.js --rootDir tests", + lint: "eslint src --ext .ts,.tsx", + "test:ci": "yarn test --ci --runInBand --updateSnapshot", + "test:watch": "yarn test --watchAll", + }, "publishConfig": { "access": "public" }, diff --git a/plop-templates/util-template/src/index.ts b/plop/utility/src/index.ts similarity index 100% rename from plop-templates/util-template/src/index.ts rename to plop/utility/src/index.ts diff --git a/plop/utility/tests/.gitkeep b/plop/utility/tests/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plop-templates/util-template/tests/index.test.ts b/plop/utility/tests/index.test.ts similarity index 100% rename from plop-templates/util-template/tests/index.test.ts rename to plop/utility/tests/index.test.ts