@jay-framework/jay-cli 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +5 -3
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -22,7 +22,8 @@ function checkFileExists(filepath) {
22
22
  });
23
23
  });
24
24
  }
25
- async function generateFiles(dir, codeGenerationFunction, afterGenerationFunction, outputExtension, destinationDir, compilationTarget) {
25
+ async function generateFiles(dir, codeGenerationFunction, afterGenerationFunction, outputExtension, destinationDir, compilationTarget, projectRoot) {
26
+ const resolvedProjectRoot = projectRoot || process.cwd();
26
27
  console.log(chalk.whiteBright("Jay generating files for ", dir));
27
28
  let jayFiles = await findAllJayFiles(dir);
28
29
  console.log(dir, jayFiles);
@@ -35,7 +36,8 @@ async function generateFiles(dir, codeGenerationFunction, afterGenerationFunctio
35
36
  path.basename(jayFile.replace(".jay-html", "")),
36
37
  path.dirname(jayFile),
37
38
  {},
38
- JAY_IMPORT_RESOLVER
39
+ JAY_IMPORT_RESOLVER,
40
+ resolvedProjectRoot
39
41
  )
40
42
  );
41
43
  const generateTarget = compilationTarget === "react" ? GenerateTarget.react : GenerateTarget.jay;
@@ -105,7 +107,7 @@ const noop = () => void 0;
105
107
  program.command("definitions").argument("<source>", "source folder to scan for .jay-html files").description("generate definition files (.d.ts) for jay files").action(async (source) => {
106
108
  await rollup({
107
109
  input: getJayHtmlOrContractFileInputs(source),
108
- plugins: [jayDefinitions()]
110
+ plugins: [jayDefinitions(process.cwd())]
109
111
  });
110
112
  });
111
113
  program.command("runtime").argument("<source>", "source folder to scan for .jay-html files").argument("[destination]", "destination folder for generated files").argument("[compilationTarget]", "jay | react. target runtime to compile for. Defaults to jay").description("generate code files (.ts) for jay files").action(async (source, dest, compilationTarget) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/jay-cli",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "bin": "dist/index.js",
@@ -21,15 +21,15 @@
21
21
  "test:watch": "vitest"
22
22
  },
23
23
  "dependencies": {
24
- "@jay-framework/compiler": "^0.9.0",
25
- "@jay-framework/rollup-plugin": "^0.9.0",
24
+ "@jay-framework/compiler": "^0.10.0",
25
+ "@jay-framework/rollup-plugin": "^0.10.0",
26
26
  "chalk": "^4.1.2",
27
27
  "commander": "^14.0.0",
28
28
  "glob": "^10.4.5",
29
29
  "rollup": "^4.9.5"
30
30
  },
31
31
  "devDependencies": {
32
- "@jay-framework/dev-environment": "^0.9.0",
32
+ "@jay-framework/dev-environment": "^0.10.0",
33
33
  "@types/node": "^20.11.5",
34
34
  "@types/shelljs": "^0.8.15",
35
35
  "rimraf": "^5.0.5",