defiant-builder
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -6,2 +6,3 @@ | ||
const terser = require("terser") | ||
const { rollupImportMapPlugin } = require("rollup-plugin-import-map") | ||
@@ -57,2 +58,3 @@ const { FS } = require("./common") | ||
let xApp = appXmlDom.Application | ||
if (!xApp.Build || !xApp.Build.task) return | ||
@@ -117,4 +119,14 @@ | ||
let bundle | ||
let conf = { | ||
input, | ||
treeshake: false, | ||
context: "window", | ||
} | ||
// importmap | ||
if (task._attributes.importmap) { | ||
let importmap = FS.path.join(appPath, task._attributes.importmap) | ||
conf.plugins = [ rollupImportMapPlugin(importmap) ] | ||
} | ||
try { | ||
bundle = await rollup.rollup({ input, treeshake: false, context: "window" }) | ||
bundle = await rollup.rollup(conf) | ||
} catch (err) { | ||
@@ -163,2 +175,3 @@ // delete temp input entry file | ||
let id = getMetaValue(meta, "id") | ||
let importmap = getMetaValue(meta, "script", "importmap") | ||
let namespace = getMetaValue(meta, "author", "namespace") | ||
@@ -212,4 +225,15 @@ let filePath = FS.path.join(appPath, getMetaValue(meta, "script")) | ||
let bundle | ||
let conf = { | ||
input, | ||
treeshake: false, | ||
context: "window", | ||
} | ||
// importmap | ||
if (importmap) { | ||
importmap = FS.path.join(appPath, importmap) | ||
conf.plugins = [ rollupImportMapPlugin(importmap) ] | ||
} | ||
try { | ||
bundle = await rollup.rollup({ input, treeshake: false, context: "window" }) | ||
bundle = await rollup.rollup(conf) | ||
} catch (err) { | ||
@@ -216,0 +240,0 @@ // delete temp input entry file |
{ | ||
"name": "defiant-builder", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "", | ||
@@ -23,2 +23,3 @@ "main": "./lib", | ||
"rollup": "^1.29.1", | ||
"rollup-plugin-import-map": "^2.2.2", | ||
"terser": "^4.6.3", | ||
@@ -25,0 +26,0 @@ "xml-js": "^1.6.11" |
@@ -5,3 +5,3 @@ | ||
let source = path.join(__dirname, "temp/eniac") | ||
let source = path.join(__dirname, "temp/degas") | ||
let destination = path.join(__dirname, "temp/_build") | ||
@@ -8,0 +8,0 @@ let uglify = false |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59847
650
6
+ Addedrollup-plugin-import-map@2.2.2(transitive)