Comparing version 4.11.0 to 4.12.0
@@ -55,3 +55,2 @@ "use strict"; | ||
var _default = (input, options) => { | ||
console.log(`Now watching: ${input}`); | ||
const dependencies = {}; | ||
@@ -124,2 +123,3 @@ const outputToFile = (0, _outputToFile.default)(options.o); | ||
console.log(`Now watching file: ${filePath}`); | ||
const matchInputOption = input.reduce((found, file) => found || (0, _glob.default)(_path.default.resolve(file)).minimatch.match(filePath), false); | ||
@@ -126,0 +126,0 @@ |
@@ -14,5 +14,5 @@ "use strict"; | ||
const includeRegexp = /<mj-include\s+path=['"](.*[.mjml]?)['"]\s*(\/>|>\s*<\/mj-include>)/g; | ||
const includeRegexp = /<mj-include[^<>]+path=['"](.*(?:\.mjml|\.css|\.html))['"]\s*[^<>]*(\/>|>\s*<\/mj-include>)/gi; | ||
const ensureIncludeIsMJMLFile = file => file.trim().match(/.mjml/) && file || `${file}.mjml`; | ||
const ensureIncludeIsSupportedFile = file => _path.default.extname(file).match(/\.mjml|\.css|\.html/) ? file : `${file}.mjml`; | ||
@@ -41,3 +41,3 @@ const error = e => console.error(e.stack || e); // eslint-disable-line no-console | ||
const readIncludes = (dir, file, base) => { | ||
const currentFile = _path.default.resolve(dir ? _path.default.join(dir, ensureIncludeIsMJMLFile(file)) : ensureIncludeIsMJMLFile(file)); | ||
const currentFile = _path.default.resolve(dir ? _path.default.join(dir, ensureIncludeIsSupportedFile(file)) : ensureIncludeIsSupportedFile(file)); | ||
@@ -59,3 +59,3 @@ const currentDirectory = _path.default.dirname(currentFile); | ||
while (matchgroup != null) { | ||
const includedFile = ensureIncludeIsMJMLFile(matchgroup[1]); // when reading first level of includes we must join the path specified in filePath | ||
const includedFile = ensureIncludeIsSupportedFile(matchgroup[1]); // when reading first level of includes we must join the path specified in filePath | ||
// when reading further nested includes, just take parent dir as base | ||
@@ -62,0 +62,0 @@ |
{ | ||
"name": "mjml-cli", | ||
"description": "MJML: the only framework that makes responsive-email easy", | ||
"version": "4.11.0", | ||
"version": "4.12.0", | ||
"main": "bin/mjml", | ||
@@ -34,6 +34,6 @@ "bin": { | ||
"lodash": "^4.17.21", | ||
"mjml-core": "4.11.0", | ||
"mjml-migrate": "4.11.0", | ||
"mjml-parser-xml": "4.11.0", | ||
"mjml-validator": "4.11.0", | ||
"mjml-core": "4.12.0", | ||
"mjml-migrate": "4.12.0", | ||
"mjml-parser-xml": "4.12.0", | ||
"mjml-validator": "4.12.0", | ||
"yargs": "^16.1.0" | ||
@@ -45,3 +45,3 @@ }, | ||
}, | ||
"gitHead": "0f4c64196ab251e116f1c80a1066f911e82697cf" | ||
"gitHead": "afc85c09963ef25f0fd6fe60bdcdea740094ff22" | ||
} |
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
28289
+ Addedmjml-core@4.12.0(transitive)
+ Addedmjml-migrate@4.12.0(transitive)
+ Addedmjml-parser-xml@4.12.0(transitive)
+ Addedmjml-validator@4.12.0(transitive)
- Removedmjml-core@4.11.0(transitive)
- Removedmjml-migrate@4.11.0(transitive)
- Removedmjml-parser-xml@4.11.0(transitive)
- Removedmjml-validator@4.11.0(transitive)
Updatedmjml-core@4.12.0
Updatedmjml-migrate@4.12.0
Updatedmjml-parser-xml@4.12.0
Updatedmjml-validator@4.12.0