mackenzii/projects/sites/scripts/set-current.js

12 lines
291 B
JavaScript

import symlinkDir from 'symlink-dir';
(() => {
const site = process.env.npm_config_site;
if (!!site) {
symlinkDir(`sites/${site}`, '../frontend/content').then((res) => {
console.log('Done');
})
} else {
console.error('Parameter "site" was not provided!');
}
})();