-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Schematics): Update parsed path logic to split path and name
Closes #1064
- Loading branch information
1 parent
d58ad9c
commit a1e9530
Showing
33 changed files
with
186 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
modules/router-store/schematics-core/utility/parse-name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
modules/store-devtools/schematics-core/utility/parse-name.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Path, basename, dirname, normalize } from '@angular-devkit/core'; | ||
|
||
export interface Location { | ||
name: string; | ||
path: Path; | ||
} | ||
|
||
export function parseName(path: string, name: string): Location { | ||
const nameWithoutPath = basename(name as Path); | ||
const namePath = dirname((path + '/' + name) as Path); | ||
|
||
return { | ||
name: nameWithoutPath, | ||
path: normalize('/' + namePath), | ||
}; | ||
} |