UNPKG

react-principal

Version:

A state management with react context for apps which using hooks.

20 lines 969 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const path_1 = __importDefault(require("path")); const fs_extra_1 = __importDefault(require("fs-extra")); function generateStore(destination, { cwd, type, }) { if (type === "single") { fs_extra_1.default.copySync(path_1.default.join(__dirname, "../../templates/singleStore"), path_1.default.join(cwd, destination)); return; } if (type === "reducer") { fs_extra_1.default.copySync(path_1.default.join(__dirname, "../../templates/singleReducer"), path_1.default.join(cwd, destination)); return; } fs_extra_1.default.copySync(path_1.default.join(__dirname, "../../templates/sample"), path_1.default.join(cwd, destination, "store")); } exports.default = generateStore; //# sourceMappingURL=generate.js.map