This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): buildNgMaterialDefinition RegExp updated
update buildNgMaterialDefinition() regExp to search for module definitions of 'material.*'. excludes any extraneous, demo-related module definitions. use `material.layout` to match `material.animate` Fixes #4305.
- Loading branch information
1 parent
d5c3edb
commit 391cff5
Showing
6 changed files
with
5 additions
and
11 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Regex adapted from https://github.com/ceymard/gulp-ngcompile | ||
|
||
module.exports = function processContent(fileContent) { | ||
var NG_MODULE_REGEX = /\.module\(('[^']*'|"[^"]*")\s*,(?:\s*\[([^\]]+)\])?/g; | ||
var NG_MODULE_REGEX = /\.module\((['|"]\material\..*'|"[^"]*")\s*,?\s*\[(([^\]]+)\])?/g; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ThomasBurleson
Author
Contributor
|
||
var match = NG_MODULE_REGEX.exec(fileContent || ''); | ||
var module = match && match[1] && match[1].slice(1, -1); //remove quotes | ||
var depsMatch = match && match[2] && match[2].trim(); | ||
|
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
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
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
Changing the non-capturing group breaks the dependency parsing below. The closing bracket
]
is now part of the capturing group.I think the change you were going for is