octo-block
v1.0.4
Published
`npm i octo-block`
Downloads
27
Readme
Как добавить в проект
npm i octo-block
Создать файл octo-config.js в корне frontend
const path = require("path");
const {addComponentsToFrontend} = require("octo-block");
const options = {
blocks: {
block: ["block-with-image3", "block-with-image"],
header: ["header-10"],
footer: ["footer-12", "footer"],
},
pathToDir: path.join(__dirname, "/frontend/components"), // указание пути до нужной папки
};
addComponentsToFrontend(options);
Создать файл octo-config.js в корне backend
const path = require("path");
const {addComponentsToBackend} = require("octo-block");
const options = {
blocks: {
block: ["block-with-image3", "block-with-image"],
header: ["header-10"],
footer: ["footer-12", "footer"],
},
pathToDir: path.join(__dirname, ".."), // можно не указывать
};
addComponentsToBackend(options);
Название файла конфига может быть любым.
После создания конфига чтобы добавить нужные файлы нужно запустить node octo-config.js