cacert-boardvoting/ui/semantic/tasks/admin/register.js
Jan Dittberner d7a742d97d Update UI framework
- add package.json for npm/npx
- update to fomantic-ui
- move ui files to ui directory
- add UI build documentation to README.md
- add ui target to Makefile
- add addPrefix handler in boardvoting.go to allow the same /static/
  prefix for static resources
2022-05-08 16:13:50 +02:00

55 lines
1.2 KiB
JavaScript

/*******************************
Register PM
*******************************/
/*
Task to register component repos with Package Managers
* Registers component with bower
* Registers component with NPM
*/
var
// node dependencies
process = require('child_process'),
// config
release = require('../config/admin/release'),
// register components and distributions
repos = release.distributions.concat(release.components),
total = repos.length,
index = -1,
stream,
stepRepo
;
module.exports = function(callback) {
console.log('Registering repos with package managers');
// Do Git commands synchronously per component, to avoid issues
stepRepo = function() {
index = index + 1;
if(index >= total) {
callback();
return;
}
var
repo = repos[index].toLowerCase(),
outputDirectory = release.outputRoot + repo + '/',
exec = process.exec,
execSettings = {cwd: outputDirectory},
updateNPM = 'npm publish;meteor publish;'
;
/* Register with NPM */
exec(updateNPM, execSettings, function(err, stdout, stderr) {
console.log(err, stdout, stderr);
stepRepo();
});
};
stepRepo();
};