Skip to content

Commit

Permalink
Merge pull request #97 from gofynd/bugfix-err
Browse files Browse the repository at this point in the history
Error message improved and config check added in sync
  • Loading branch information
ZaidRehman authored Jul 18, 2022
2 parents c5ac680 + 07b1904 commit 09a49ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gofynd/fdk-cli",
"version": "2.3.0",
"version": "2.3.1",
"main": "index.js",
"license": "MIT",
"bin": {
Expand Down
5 changes: 3 additions & 2 deletions src/lib/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export default class Theme {
// get asset cdn base url
const assetCdnUrl = await Theme.getAssetCdnBaseUrl();
Logger.warn('Building Assets...');
Theme.createVueConfig();
// build js css
await build({ buildFolder: Theme.BUILD_FOLDER, imageCdnUrl, assetCdnUrl, assetHash });

Expand Down Expand Up @@ -641,10 +642,10 @@ export default class Theme {
const fdkConfigPath = path.join(process.cwd(), 'fdk.config.js');
if (fs.existsSync(oldVueConfigPath)) {
if (fs.existsSync(fdkConfigPath)) {
throw "vue.config.js is not supported, move its file content to fdk.config,js"
throw new CommandError(`vue.config.js is not supported, move its file content to fdk.config.js`, ErrorCodes.NOT_KNOWN.code);
} else {
fs.renameSync(oldVueConfigPath, fdkConfigPath);
Logger.success('fdk.config.js file generated');
Logger.success('Renamed file from vue.config.js to fdk.config.js');
}
}
rimraf.sync(path.join(process.cwd(), Theme.VUE_CLI_CONFIG_PATH));
Expand Down

0 comments on commit 09a49ea

Please sign in to comment.