Skip to content

Commit

Permalink
feat: improve the vscode deployment (#307)
Browse files Browse the repository at this point in the history
Improve the Visual Studio Code deployment script to only copy the files
that are contained in a release.
  • Loading branch information
stevenh committed Oct 25, 2023
1 parent 16d349f commit d85705b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions script-deploy-in-vscode.js
Expand Up @@ -11,7 +11,7 @@ console.log('---- START DEPLOY IN VSCODE INSTALLED npm-groovy-lint PACKAGE ----'

const vsCodeGroovyLintPath = process.env.VSCODE_GROOVY_LINT_PATH || './../vscode-groovy-lint';

const targetPath = `${vsCodeGroovyLintPath}/server/node_modules/npm-groovy-lint/lib`;
const targetPath = `${vsCodeGroovyLintPath}/server/node_modules/npm-groovy-lint`;

console.info(`GroovyLint: Starting copying package in vscode for testing`);

Expand All @@ -23,9 +23,12 @@ else {
mkdirSync(targetPath);
}

// Copy files into dist folder (copied from lib folder)
copySync('./lib', targetPath);
console.info(`GroovyLint: Copied ./lib files into ${targetPath}`);
// Copy files into dest folder
for (const path of ['package.json', 'README.md', 'CHANGELOG.md', 'LICENSE', 'lib']) {
copySync(path, `${targetPath}/${path}`);
}

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

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

Expand Down

0 comments on commit d85705b

Please sign in to comment.