Skip to content

Commit

Permalink
#1866: fix buildTemplate/buildDefintiion/build creating ssjs files wi…
Browse files Browse the repository at this point in the history
…th <script> tags
  • Loading branch information
JoernBerkefeld committed Nov 15, 2024
1 parent 7b45bfa commit 6522129
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion @types/lib/metadataTypes/Asset.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/metadataTypes/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,12 @@ class Asset extends MetadataType {
const targetDirArr = Array.isArray(targetDir) ? targetDir : [targetDir];
for (const targetDir of targetDirArr) {
for (const extractedFile of fileList) {
if (extractedFile.fileExt === 'ssjs') {
const ssjs = Util.getSsjs(extractedFile?.content);
if (ssjs) {
extractedFile.content = ssjs;
}
}
File.writeToFile(
[targetDir, ...extractedFile.subFolder],
extractedFile.fileName,
Expand Down

0 comments on commit 6522129

Please sign in to comment.