@nstudio/schematics
Version:
Cross-platform (xplat) tools for Nx workspaces.
24 lines • 835 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
function default_1(options) {
if (options.module && !options.feature) {
// parse feature from module path
const parts = options.module.split("features/");
if (parts.length > 1) {
// user is targeting a feature module
const featurePath = parts[1];
const featureParts = featurePath.split("/");
if (featureParts.length > 1) {
// get the feature name
options.feature = featureParts[0];
}
}
else {
// no feature determined so it will fallback to core
}
}
return utils_1.generate("state", options);
}
exports.default = default_1;
//# sourceMappingURL=index.js.map
;