Skip to content

Commit

Permalink
vscode-groovy-lint script
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Aug 26, 2024
1 parent 6ec453b commit 5512425
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions scripts/deploy-in-vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Copy source files into vscode npm installation (avoid generate betas to test updates)
// npm-groovy-lint & vscode-groovy-lint must be in the same folder, else you have to override VSCODE_GROOVY_LINT_PATH env variable


// Imports
import { existsSync, emptyDirSync, mkdirSync, copySync } from 'fs-extra';
import fs from 'fs-extra';

console.log('---- START DEPLOY IN VSCODE INSTALLED npm-groovy-lint PACKAGE ----');

Expand All @@ -15,21 +14,20 @@ const targetPath = `${vsCodeGroovyLintPath}/server/node_modules/npm-groovy-lint`
console.info(`GroovyLint: Starting copying package in vscode for testing`);

// Reset target folder
if (existsSync(targetPath)) {
emptyDirSync(targetPath);
if (fs.existsSync(targetPath)) {
fs.emptyDirSync(targetPath);
}
else {
mkdirSync(targetPath);
fs.mkdirSync(targetPath);
}

// Copy files into dest folder
for (const path of ['package.json', 'README.md', 'CHANGELOG.md', 'LICENSE', 'lib']) {
copySync(path, `${targetPath}/${path}`);
fs.copySync(path, `${targetPath}/${path}`);
}

console.info(`GroovyLint: Copied files into ${targetPath}`);

console.log('---- END DEPLOY IN VSCODE INSTALLED npm-groovy-lint PACKAGE ----\n');

process.exit(0);

0 comments on commit 5512425

Please sign in to comment.