Skip to content

Commit

Permalink
Merge pull request #762 from Availity/fix/convert-jsconfig
Browse files Browse the repository at this point in the history
feat: add rewriting jsconfig to tsconfig
  • Loading branch information
jordan-a-young authored Nov 14, 2024
2 parents c96de53 + e4a6937 commit 2b96c94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"about": "av about",
"lint": "av lint",
"help": "av help",
"upgrade:workflow": "./node_modules/.bin/upgrade-workflow",
"upgrade:workflow": "node ../packages/workflow-upgrade/bin.js",
"profile": "av profile",
"profile:production": "cross-env NODE_ENV=production av profile",
"build": "av build",
Expand Down
8 changes: 8 additions & 0 deletions packages/workflow-upgrade/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ module.exports = async (cwd) => {
fs.unlinkSync(yarnLock);
}

const jsconfigPath = path.join(cwd, 'jsconfig.json');
const hasJsconfig = fs.existsSync(jsconfigPath);

if (hasJsconfig) {
const tsconfigPath = path.join(cwd, 'tsconfig.json');
fs.renameSync(jsconfigPath, tsconfigPath);
}

// Delete node_modules
Logger.info('Deleting node_modules...');
rimraf.sync(path.join(cwd, 'node_modules'));
Expand Down

0 comments on commit 2b96c94

Please sign in to comment.