speculate
Version:
Automatically generates an RPM Spec file for your Node.js project
27 lines (23 loc) • 672 B
JavaScript
;
const path = require('path');
module.exports = {
serviceFileName: function (name) {
return `${name}.service`;
},
serviceFile: function (root, pkg) {
return path.resolve(root, this.serviceFileName(pkg.name));
},
specsDirectory: function (root) {
return path.resolve(root, 'SPECS');
},
specFile: function (root, pkg) {
return path.resolve(root, pkg.name + '.spec');
},
sourcesDirectory: function (root) {
return path.resolve(root, 'SOURCES');
},
sourcesArchive: function (root, pkg) {
const sourcesDirectory = this.sourcesDirectory(root);
return path.resolve(sourcesDirectory, pkg.name + '.tar.gz');
}
};