Skip to content

Commit

Permalink
fixes #402
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Nov 28, 2019
1 parent d069386 commit 157c01c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,9 +941,12 @@ export async function pack(options: IPackageOptions = {}): Promise<IPackageResul
manifest = await prepublish(cwd, manifest, options.useYarn);

const files = await collect(manifest, options);
if (files.length > 100) {
console.log(`This extension consists of ${files.length} separate files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore`);
const jsFiles = files.filter(f => /\.js$/i.test(f.path));

if (files.length > 5000 || jsFiles.length > 100) {
console.log(`This extension consists of ${files.length} files, out of which ${jsFiles.length} are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore`);
}

const packagePath = await writeVsix(files, path.resolve(options.packagePath || defaultPackagePath(cwd, manifest)));

return { manifest, packagePath, files };
Expand Down

0 comments on commit 157c01c

Please sign in to comment.