Browse Source

refactor: remove unnecessary fn calls in path utils

pull/5246/head
Arman Ozak 6 years ago
parent
commit
fc2f1ecfc6
  1. 4
      npm/ng-packs/packages/schematics/src/utils/path.ts

4
npm/ng-packs/packages/schematics/src/utils/path.ts

@ -3,12 +3,12 @@ import { kebab } from './text';
export function relativePathToEnum(namespace: string, enumNamespace: string, enumName: string) { export function relativePathToEnum(namespace: string, enumNamespace: string, enumName: string) {
const path = calculateRelativePath(namespace, enumNamespace); const path = calculateRelativePath(namespace, enumNamespace);
return removeDoubleSlash(path + `/${kebab(enumName)}.enum`); return path + `/${kebab(enumName)}.enum`;
} }
export function relativePathToModel(namespace: string, modelNamespace: string) { export function relativePathToModel(namespace: string, modelNamespace: string) {
const path = calculateRelativePath(namespace, modelNamespace); const path = calculateRelativePath(namespace, modelNamespace);
return removeTrailingSlash(path + '/models'); return path + '/models';
} }
function calculateRelativePath(ns1: string, ns2: string) { function calculateRelativePath(ns1: string, ns2: string) {

Loading…
Cancel
Save