Skip to content

Commit 3b3eae1

Browse files
committed
build: failed if any phoenix pro files are not inlineable
1 parent 242feb7 commit 3b3eae1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gulpfile.js/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,11 @@ function inlineTextRequire(file, content, srcDir) {
565565
if((requirePath.endsWith(".js") && !requirePath.includes("./")) // js files that are relative paths are ok
566566
|| excludeSuffixPathsInlining.some(ext => requirePath.endsWith(ext))) {
567567
console.warn("Not inlining JS/JSON file:", requirePath, filePath);
568+
if(filePath.includes("phoenix-pro")) {
569+
// this is needed as we will delete the extension sources when packaging for release.
570+
// so non inlined content will not be available in the extension. throw early to detect that.
571+
throw new Error(`All Files in phoenix pro extension should be inlineable!: failed for ${filePath}`);
572+
}
568573
} else {
569574
console.log("Inlining", requireStatement);
570575
if((requireStatement.includes(".html") || requireStatement.includes(".js"))

0 commit comments

Comments
 (0)