UNPKG

acyort

Version:

A Node.js static website framework

20 lines (19 loc) 606 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path_1 = require("path"); exports.default = (acyort) => { const exec = (path) => { const pkg = require(path); const module = pkg.default || pkg; module(acyort); }; const { plugins = [], scripts = [] } = acyort.config; plugins.forEach((name) => { const npmPath = (0, path_1.join)(acyort.cwd, 'node_modules', name); exec(npmPath); }); scripts.forEach((path) => { const localPath = (0, path_1.join)(acyort.cwd, path); exec(localPath); }); };