Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(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);
}));
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);
.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();
gulp.task('bower', function(cb){
bower.commands.install().on('end', function (installed){
console.log(installed);
cb();
});
});
gulp.task('install', ['git-check'], function() {
return bower.commands.install()
.on('log', function(data) {
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
});
});
gulp.task('install', ['git-check'], function () {
return bower.commands.install()
.on('log', function (data) {
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
});
});
gulp.task('install', ['git-check'], function() {
return bower.commands.install()
.on('log', function(data) {
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
});
});
.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 () {
gulp.task('install', ['git-check'], function() {
return bower.commands.install()
.on('log', function(data) {
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
});
});
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;
});
});