We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bbc8e9 commit 40d2994Copy full SHA for 40d2994
lib/lbt/resources/ResourceInfoList.js
@@ -1,6 +1,7 @@
1
const ResourceInfo = require("./ResourceInfo");
2
3
const DEBUG_RESOURCES_PATTERN = /-dbg((?:\.view|\.fragment|\.controller|\.designtime|\.support)?\.js|\.css)$/;
4
+const RESOURCES_PATTERN = /((?:\.view|\.fragment|\.controller|\.designtime|\.support)?\.js|\.css)$/;
5
6
/**
7
* A list of ResourceInfo objects, suitable for (but not dependent on) JSON serialization.
@@ -113,6 +114,15 @@ class ResourceInfoList {
113
114
}
115
return null;
116
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
126
127
128
module.exports = ResourceInfoList;
0 commit comments