Skip to content

Commit

Permalink
Merge pull request #1867 from Accenture/bug/1866-buildtemplate-create…
Browse files Browse the repository at this point in the history
…s-ssjs-files-with-script-tags

bug/1866 fix buildTemplate/buildDefintiion/build creating ssjs files with <script> tags
  • Loading branch information
JoernBerkefeld authored Nov 15, 2024
2 parents 7b45bfa + 6522129 commit bda56e4
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 bda56e4

Please sign in to comment.