Skip to content

Commit

Permalink
Merge branch 'feat/adding-type-module-to-package-json' of https://git…
Browse files Browse the repository at this point in the history
…hub.com/Refinitiv/refinitiv-ui into feat/adding-type-module-to-package-json
  • Loading branch information
wsuwt committed Oct 18, 2023
2 parents cf130ef + 6c852d5 commit a91c68c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/theme-compiler/bin/theme-compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
import chalk from 'chalk';
import fs from 'fs-extra';
import path from 'node:path';
import url from 'node:url';

import { getJSON } from '../../../scripts/helpers/index.js';
import options from '../src/cli-options.js';
import ThemeParser from '../src/themeParser.js';

try {
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
const { version } = await getJSON(path.resolve(__dirname, '../package.json'));
const { version } = await getJSON(path.resolve('./package.json'));

const cssOutDir = path.join(options.outdir, 'css');
const importsOutDir = path.join(options.outdir, 'imports');
Expand Down
4 changes: 1 addition & 3 deletions packages/theme-compiler/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ const generateOutput = (filename, output, variables) => {
};

const getThemeInfo = () => {
const packageJSON = JSON.parse(
fs.readFileSync(new URL(path.join(process.cwd(), './package.json'), import.meta.url))
);
const packageJSON = JSON.parse(fs.readFileSync(new URL(path.resolve('./package.json'), import.meta.url)));
return {
name: packageJSON['name'],
version: packageJSON['version']
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/api-analyzer.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const handler = async () => {
}

// Only write file if API is matched to element tag
if (await (isValidAPI(elementAPI, element))) {
if (await isValidAPI(elementAPI, element)) {
success(`Generating API for ${element}`);

// Create output directory path if not exist
Expand Down

0 comments on commit a91c68c

Please sign in to comment.