atool-doc
Version:
Static demo site generator based on atool-build & dora.
14 lines (10 loc) • 430 B
JavaScript
;
var path = require('path');
module.exports = function Resource(cwd, demoPath, resourcePath) {
this.ext = path.extname(resourcePath);
this.name = path.basename(resourcePath, this.ext);
this.path = path.join(path.dirname(resourcePath), this.name);
this.demoPath = path.join(cwd, demoPath);
this.relativeToCwd = path.relative(cwd, this.path);
this.relativeToDemo = path.relative(demoPath, this.path);
};