Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
locals: function(options) {
let moduleName = options.entity.name;
if (options.resetNamespace) {
moduleName = moduleName.split('/').pop();
}
return {
moduleName: stringUtil.dasherize(moduleName),
};
},
locals(options) {
const addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name();
const addonName = stringUtil.dasherize(addonRawName);
const fileName = stringUtil.dasherize(options.entity.name);
return {
modulePath: [addonName, 'components', fileName, 'component'].join('/'),
path: getPathOption(options),
};
},
};
locals: function(options) {
let addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name();
let addonName = stringUtil.dasherize(addonRawName);
let fileName = stringUtil.dasherize(options.entity.name);
let importPathName = [addonName, 'components', fileName].join('/');
if (options.pod) {
importPathName = [addonName, 'components', fileName, 'component'].join('/');
}
return {
modulePath: importPathName,
path: getPathOption(options),
};
},
};
locals (options) {
const addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name()
const addonName = stringUtil.dasherize(addonRawName)
const fileName = stringUtil.dasherize(options.entity.name)
let importPathName = [addonName, 'components', fileName].join('/')
if (options.pod) {
importPathName = [addonName, 'components', fileName, 'component'].join('/')
}
return {
modulePath: importPathName,
path: getPathOption(options)
}
},
locals: function(options) {
var addonRawName = options.inRepoAddon ? options.inRepoAddon : options.project.name();
var addonName = stringUtil.dasherize(addonRawName);
var fileName = stringUtil.dasherize(options.entity.name);
var importPathName = [addonName, 'components', fileName].join('/');
if (options.pod) {
importPathName = [addonName, 'components', fileName,'component'].join('/');
}
return {
modulePath: importPathName,
path: getPathOption(options)
};
}
};
afterInstall: function(options) {
if (options.dryRun) {
return;
}
const returns = [];
const className = stringUtils.classify(`${options.entity.name}Pipe`);
const fileName = stringUtils.dasherize(`${options.entity.name}.pipe`);
const fullGeneratePath = path.join(this.project.root, this.generatePath);
const moduleDir = path.parse(this.pathToModule).dir;
const relativeDir = path.relative(moduleDir, fullGeneratePath).toLowerCase();
const importPath = relativeDir ? `./${relativeDir}/${fileName}` : `./${fileName}`;
if (!options['skip-import']) {
returns.push(
astUtils.addDeclarationToModule(this.pathToModule, className, importPath)
.then(change => change.apply(NodeHost)));
}
return Promise.all(returns);
}
};
locals: function (options: any) {
this.fileName = stringUtils.dasherize(options.entity.name);
return {
dynamicPath: this.dynamicPath.dir,
flat: options.flat,
fileName: this.fileName
};
},
locals: function (options: any) {
const interfaceType = options.args[2];
this.fileName = stringUtils.dasherize(options.entity.name);
if (interfaceType) {
this.fileName += '.' + interfaceType;
}
const prefix = CliConfig.getValue('defaults.interface.prefix');
return {
dynamicPath: this.dynamicPath.dir,
flat: options.flat,
fileName: this.fileName,
prefix: prefix
};
},
locals: function (options) {
this.fileName = stringUtils.dasherize(options.entity.name);
return {
dynamicPath: this.dynamicPath.dir,
flat: options.flat,
fileName: this.fileName
};
},
fileMapTokens: function () {
locals: function (options) {
const interfaceType = options.args[2];
this.fileName = stringUtils.dasherize(options.entity.name);
if (interfaceType) {
this.fileName += '.' + interfaceType;
}
const prefix = config_1.CliConfig.getValue('defaults.interface.prefix');
return {
dynamicPath: this.dynamicPath.dir,
flat: options.flat,
fileName: this.fileName,
prefix: prefix
};
},
fileMapTokens: function () {