How to use the bower-config.DEFAULT_REGISTRY function in bower-config

To help you get started, we’ve selected a few bower-config 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 joeattardi / tailstreamer / node_modules / grunt-bower-task / node_modules / bower / lib / commands / register.js View on Github external
process.nextTick(function () {
        // Verify name
        // TODO: Verify with the new spec regexp?
        if (!name) {
            return logger.emit('error', createError('Please type a name', 'EINVNAME'));
        }

        // The public registry only allows git:// endpoints
        // As such, we attempt to convert URLs as necessary
        if (config.registry.register === Config.DEFAULT_REGISTRY) {
            url = convertUrl(url, logger);

            if (!mout.string.startsWith(url, 'git://')) {
                return logger.emit('error', createError('The registry only accepts URLs starting with git://', 'EINVFORMAT'));
            }
        }

        // Attempt to resolve the package referenced by the URL to ensure
        // everything is ok before registering
        repository = new PackageRepository(config, logger);
        repository.fetch({ name: name, source: url, target: '*' })
        .spread(function (canonicalDir, pkgMeta) {
            if (pkgMeta.private) {
                throw createError('The package you are trying to register is marked as private', 'EPRIV');
            }
github OrgCurrent / Android / node / bower / lib / commands / register.js View on Github external
process.nextTick(function () {
        // Verify name
        // TODO: Verify with the new spec regexp?
        if (!name) {
            return logger.emit('error', createError('Please type a name', 'EINVNAME'));
        }

        // The public registry only allows git:// endpoints
        // As such, we attempt to convert URLs as necessary
        if (config.registry.register === Config.DEFAULT_REGISTRY) {
            url = convertUrl(url, logger);

            if (!mout.string.startsWith(url, 'git://')) {
                return logger.emit('error', createError('The registry only accepts URLs starting with git://', 'EINVFORMAT'));
            }
        }

        tracker.track('register');

        // Attempt to resolve the package referenced by the URL to ensure
        // everything is ok before registering
        repository = new PackageRepository(config, logger);
        repository.fetch({ name: name, source: url, target: '*' })
        .spread(function (canonicalDir, pkgMeta) {
            if (pkgMeta.private) {
                throw createError('The package you are trying to register is marked as private', 'EPRIV');
github ippontech / tatami / web / node_modules / bower / lib / commands / register.js View on Github external
return Q.try(function () {
        // Verify name and url
        if (!name || !url) {
            throw createError('Usage: bower register  ', 'EINVFORMAT');
        }

        // The public registry only allows git:// endpoints
        // As such, we attempt to convert URLs as necessary
        if (config.registry.register === Config.DEFAULT_REGISTRY) {
            url = convertUrl(url, logger);

            if (!mout.string.startsWith(url, 'git://')) {
                throw createError('The registry only accepts URLs starting with git://', 'EINVFORMAT');
            }
        }

        tracker.track('register');

        // Attempt to resolve the package referenced by the URL to ensure
        // everything is ok before registering
        repository = new PackageRepository(config, logger);
        return repository.fetch({ name: name, source: url, target: '*' });
    })
    .spread(function (canonicalDir, pkgMeta) {

bower-config

The Bower config reader and writer.

MIT
Latest version published 5 years ago

Package Health Score

74 / 100
Full package analysis

Similar packages