Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: created basic section and their forms #355

Closed
wants to merge 11 commits into from
84 changes: 84 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"@rollup/rollup-linux-x64-gnu": "4.6.1"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=16.0.0"
},
"workspaces": [
"apps/*",
"packages/*"
Expand Down
10 changes: 5 additions & 5 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const tsup = require("tsup");
const { program } = require("commander");
const { execSync } = require("child_process");
const fs = require("fs");
const { npmDir } = require("./utils.js");
const { npmDir, normalizePath } = require("./utils.js");
const path = require("path");
const { reactDir } = require("./utils.js");

Expand Down Expand Up @@ -120,10 +120,10 @@ nextTask("Building source", async () => {
format: "esm",
target: "es2017",
entry: [
`${sourceDir}/index.ts`,
...(await fg(`${sourceDir}/components/**/!(*.(test)).ts`)),
...(await fg(`${sourceDir}/react/**/*.ts`)),
...(await fg(`${sourceDir}/utilities/**/*.ts`)),
normalizePath(`${sourceDir}/index.ts`),
...(await fg(normalizePath(`${sourceDir}/components/**/!(*.(test)).ts`))),
...(await fg(normalizePath(`${sourceDir}/react/**/*.ts`))),
...(await fg(normalizePath(`${sourceDir}/utilities/**/*.ts`))),
],
splitting: true,
treeshake: true,
Expand Down
7 changes: 6 additions & 1 deletion scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ function pascalCase(str) {
.join("");
}

function normalizePath(filename) {
return filename.split(path.win32.sep).join(path.posix.sep);
}

module.exports = {
componentsPrefix,
npmDir,
getAllComponents,
pascalCase,
reactDir: path.join(cwd(), "./src/react"),
reactDir: path.join(cwd(), ".", "src", "react"),
normalizePath,
};