How to use the bower.commands function in bower

To help you get started, we’ve selected a few bower 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 Polymer / tools / packages / cli / src / build / build.ts View on Github external
(resolve, _reject) =>
            bower.commands.list({}, {offline: true})
                .on('end',
                    // tslint:disable-next-line: no-any
                    (result: any) => {
                      if (result && result.dependencies &&
                          result.dependencies.polymer &&
                          result.dependencies.polymer.pkgMeta &&
                          result.dependencies.polymer.pkgMeta.version) {
                        resolve(result.dependencies.polymer.pkgMeta.version);
                      } else {
                        resolve('');
                      }
                    })
                .on('error', (oops: Error) => {
                  resolve('');
                  console.warn(oops.message);
                }));
github Backbase / bb-cli / commands / install.js View on Github external
componentPathAbsolute = path.join(baseUrl, output.fsPaths[componentEndpoint]);

                            console.log('componentPathAbsolute', componentPathAbsolute);

                        } else {
                            // If we're asked to install relative component, we can't get it's name and path
                            noName = true;
                        }
                    }

                    if (argCatalog) {
                        if (!noName) {
                            restUtils.submitToPortal(baseUrl, output.fsPaths, false, componentPathAbsolute);
                        } else {
                            // Get component name by endpoint
                            bower.commands.info(componentEndpoint)
                                .on('end', function (componentInfo) {
                                    var componentName = componentInfo.latest.name;
                                    var componentPath = path.join(baseUrl, output.fsPaths[componentName]);

                                    restUtils.submitToPortal(baseUrl, {}, false, componentPath);
                                });
                        }
                    }
                }).fail(function(err){
                    console.log(chalk.red('Something went wrong during requirejs configuration generation: '), err);
github adaptlearning / adapt_authoring / lib / bowermanager.js View on Github external
.on('end', function (results) {
      if (!results || results.length == 0) {
        logger.log('warn', 'Plugin ' + packageName + ' not found!');
        return callback('Plugin ' + packageName + ' not found!');
      }
      // The plugin exists -- remove any fuzzy matches, e.g. adapt-contrib-assessment would
      // also bring in adapt-contrib-assessmentResults, etc.
      var bowerPackage = _.findWhere(results, {name: pluginName});
      bower.commands.info(bowerPackage.url)
        .on('error', callback)
        .on('end', function (latestInfo) {
          // the versions will be in version order, rather than release date,
          // so no need for ordering
          installHelpers.getInstalledFrameworkVersion(function(error, installedFrameworkVersion) {
            if(error) {
              return callback(error);
            }
            var requiredFrameworkVersion;
            var index = -1;
            async.doUntil(function iterator(cb) {
              bower.commands.info(bowerPackage.url + '#' + latestInfo.versions[++index])
                .on('error', cb)
                .on('end', function (result) {
                  requiredFrameworkVersion = result.framework;
                  cb();
github DurianStallSingapore / ZILMiner / gulpfile.js View on Github external
gulp.task('bower', function(cb){
    bower.commands.install().on('end', function (installed){
        console.log(installed);
        cb();
    });
});
github ippontech / tatami / mobile / gulpfile.js View on Github external
gulp.task('install', ['git-check'], function() {
  return bower.commands.install()
    .on('log', function(data) {
      gutil.log('bower', gutil.colors.cyan(data.id), data.message);
    });
});
github jdnichollsc / Ionic-Starter-Template / gulpfile.js View on Github external
gulp.task('install', ['git-check'], function () {
    return bower.commands.install()
        .on('log', function (data) {
            gutil.log('bower', gutil.colors.cyan(data.id), data.message);
        });
});
github mappmechanic / ionic-firebase / gulpfile.js View on Github external
gulp.task('install', ['git-check'], function() {
  return bower.commands.install()
    .on('log', function(data) {
      gutil.log('bower', gutil.colors.cyan(data.id), data.message);
    });
});
github codice / ddf / modules / admin-modules-application / Gruntfile.js View on Github external
.on('error', function(data){
                grunt.log.writeln(data);
                grunt.log.writeln("Trying to install bower packages ONline.");
                bower.commands
                    .install()
                    .on('data', function(data){
                        grunt.log.write(data);
                    })
                    .on('error', function(data){
                        grunt.log.write(data);
                        done(false);
                    })
                    .on('end', function () {
                        grunt.log.write("Bower installed online.");
                        done();
                    });
            })
            .on('end', function () {
github yortch / modularIonicDemo1 / gulpfile.js View on Github external
gulp.task('install', ['git-check'], function() {
  return bower.commands.install()
    .on('log', function(data) {
      gutil.log('bower', gutil.colors.cyan(data.id), data.message);
    });
});
github mathieuancelin / js-repaint-perfs / lib / polymer2 / bower_components / webcomponentsjs / gulpfile.js View on Github external
return del('bower_components').then(() => {
    let resolve, reject;
    let p = new Promise((res, rej) => {resolve = res; reject = rej});
    bower.commands.install().on('end', () => resolve()).on('error', (e) => reject(e));
    return p;
  });
});