Skip to content

Commit

Permalink
Merge pull request #4 from vuelessjs/VL-142_Fix-web-types-path-issue_…
Browse files Browse the repository at this point in the history
…Dmytro-Holdobin

VL-142_Fix-web-types-path-issue_Dmytro-Holdobin
  • Loading branch information
Explicit12 authored Dec 26, 2024
2 parents 4260dc3 + b9966b3 commit 79b0562
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/webTypes/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function getSources(components, cwd) {
async function rebuild(config, files, cachedContent, vuelessConfig) {
const cacheWebTypesContent = async (filePath) => {
cachedContent[filePath.replace(/\\/g, "/")] = await extractInformation(
path.join(config.componentsRoot, filePath),
filePath,
config,
vuelessConfig,
);
Expand Down
6 changes: 2 additions & 4 deletions src/webTypes/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import esbuild from "esbuild";
const CACHE_PATH = "./node_modules/.cache/vueless";
const WEB_TYPES_CONFIG_FILE_NAME = "web-types.config";

export async function extractConfig(cwd, watch = false, configFileFromCmd, pathArray = []) {
const [outFileFromCmd] = pathArray;

export async function extractConfig(cwd, watch = false, configFileFromCmd) {
const fileContent = await readFile(path.join(cwd, "package.json"), "utf-8");
const packageJson = JSON.parse(fileContent);

Expand All @@ -26,7 +24,7 @@ export async function extractConfig(cwd, watch = false, configFileFromCmd, pathA
watch,
components,
componentsRoot: cwd,
outFile: outFileFromCmd || `${CACHE_PATH}/web-types.json`,
outFile: `${CACHE_PATH}/web-types.json`,
packageName: packageJson["name"],
packageVersion: packageJson["version"],
descriptionMarkup: "markdown",
Expand Down

0 comments on commit 79b0562

Please sign in to comment.