How to use vsce - 10 common examples

To help you get started, we’ve selected a few vsce examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github egodigital / vscode-powertools / publish.js View on Github external
(async () => {
    try {
        // npm run deploy 
        const PAT = process.argv[2].trim();
        if ('' === PAT) {
            throw new Error(`No Personal Access Token defined!`);
        }

        await vsce.publish({
            cwd: __dirname,
            pat: PAT,
            useYarn: false,
        });
    } catch (e) {
        console.error(e);

        process.exit(1);
    }
})();
github theia-ide / extension-registry / cli / src / publish.ts View on Github external
export async function publish(options: PublishOptions = {}): Promise {
    if (!options.registryUrl) {
        options.registryUrl = process.env.OVSX_REGISTRY_URL;
    }
    if (!options.pat) {
        options.pat = process.env.OVSX_PAT;
    }
    if (!options.extensionFile) {
        options.extensionFile = await createTempFile({ postfix: '.vsix' });
        await createVSIX({
            cwd: options.packagePath,
            packagePath: options.extensionFile,
            baseContentUrl: options.baseContentUrl,
            baseImagesUrl: options.baseImagesUrl,
            useYarn: options.yarn
        });
        console.log(); // new line
    }
    const registry = new Registry({ url: options.registryUrl });
    const extension = await registry.publish(options.extensionFile, options.pat);
    if (extension.error) {
        throw new Error(extension.error);
    }
    console.log(`\ud83d\ude80  Published ${extension.publisher}.${extension.name} v${extension.version}`);
}
github microsoft / vscode-js-debug / gulpfile.js View on Github external
gulp.task('publish:vsce', () =>
  vsce.publish({
    noVerify: true, // for proposed API usage
    pat: process.env.MARKETPLACE_TOKEN,
    useYarn: true,
    cwd: distDir,
  }),
);
github microsoft / vscode / build / lib / extensions.js View on Github external
function fromLocalWebpack(extensionPath, sourceMappingURLBase) {
    const result = es.through();
    const packagedDependencies = [];
    const packageJsonConfig = require(path.join(extensionPath, 'package.json'));
    if (packageJsonConfig.dependencies) {
        const webpackRootConfig = require(path.join(extensionPath, 'extension.webpack.config.js'));
        for (const key in webpackRootConfig.externals) {
            if (key in packageJsonConfig.dependencies) {
                packagedDependencies.push(key);
            }
        }
    }
    vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn, packagedDependencies }).then(fileNames => {
        const files = fileNames
            .map(fileName => path.join(extensionPath, fileName))
            .map(filePath => new File({
            path: filePath,
            stat: fs.statSync(filePath),
            base: extensionPath,
            contents: fs.createReadStream(filePath)
        }));
        const filesStream = es.readArray(files);
        // check for a webpack configuration files, then invoke webpack
        // and merge its output with the files stream. also rewrite the package.json
        // file to a new entry point
        const webpackConfigLocations = glob.sync(path.join(extensionPath, '/**/extension.webpack.config.js'), { ignore: ['**/node_modules'] });
        const packageJsonFilter = filter(f => {
            if (path.basename(f.path) === 'package.json') {
                // only modify package.json's next to the webpack file.
github microsoft / vscode / build / lib / extensions.js View on Github external
function fromLocalNormal(extensionPath) {
    const result = es.through();
    vsce.listFiles({ cwd: extensionPath, packageManager: vsce.PackageManager.Yarn })
        .then(fileNames => {
        const files = fileNames
            .map(fileName => path.join(extensionPath, fileName))
            .map(filePath => new File({
            path: filePath,
            stat: fs.statSync(filePath),
            base: extensionPath,
            contents: fs.createReadStream(filePath)
        }));
        es.readArray(files).pipe(result);
    })
        .catch(err => result.emit('error', err));
    return result.pipe(stats_1.createStatsStream(path.basename(extensionPath)));
}
const baseHeaders = {
github zowe / vscode-extension-for-zowe / gulpfile.js View on Github external
const vscePublishTask = function() {
	return vsce.publish();
};
github microsoft / vscode-node-debug2 / gulpfile.js View on Github external
gulp.task('vsce-publish', () => {
    return vsce.publish();
});
gulp.task('vsce-package', () => {
github Yesterday17 / ZenScript / gulpfile.js View on Github external
gulp.task("vsce:publish", function() {
  return vsce.publish();
});
github robsonrosilva / advpl-sintaxe / gulpfile.js View on Github external
gulp.task('vsce:publish', function () {
  return vsce.publish();
});
github microsoft / vscode-node-debug / gulpfile.js View on Github external
gulp.task('vsce-publish', function() {
	return vsce.publish();
});

vsce

VSCode Extension Manager

MIT
Latest version published 1 year ago

Package Health Score

53 / 100
Full package analysis