File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11const ResourceInfo = require ( "./ResourceInfo" ) ;
22
33const DEBUG_RESOURCES_PATTERN = / - d b g ( (?: \. v i e w | \. f r a g m e n t | \. c o n t r o l l e r | \. d e s i g n t i m e | \. s u p p o r t ) ? \. j s | \. c s s ) $ / ;
4+ const RESOURCES_PATTERN = / ( (?: \. v i e w | \. f r a g m e n t | \. c o n t r o l l e r | \. d e s i g n t i m e | \. s u p p o r t ) ? \. j s | \. c s s ) $ / ;
45
56/**
67 * A list of ResourceInfo objects, suitable for (but not dependent on) JSON serialization.
@@ -113,6 +114,15 @@ class ResourceInfoList {
113114 }
114115 return null ;
115116 }
117+
118+ static getDebugName ( path ) {
119+ if ( RESOURCES_PATTERN . test ( path ) ) {
120+ if ( ! path . replace ( RESOURCES_PATTERN , "" ) . endsWith ( "-dbg" ) ) {
121+ return path . replace ( RESOURCES_PATTERN , "-dbg$1" ) ;
122+ }
123+ }
124+ return null ;
125+ }
116126}
117127
118128module . exports = ResourceInfoList ;
You can’t perform that action at this time.
0 commit comments