Comparing version 5.1.1 to 5.2.0
21
cli.js
@@ -8,3 +8,3 @@ #!/usr/bin/env node | ||
var razorleaf = require("./"); | ||
var DirectoryLoader = require("./directory-loader").DirectoryLoader; | ||
var DirectoryLoader = require("./directory-loader"); | ||
@@ -58,4 +58,4 @@ function showUsage() { | ||
function main() { | ||
var args = process.argv.slice(2); | ||
function mainWithOptions(options, args) { | ||
args = args.slice(); | ||
@@ -100,3 +100,3 @@ if (args[0] === "-h" || args[0] === "--help") { | ||
var loader = new DirectoryLoader("."); | ||
var loader = new DirectoryLoader(".", options); | ||
var template = razorleaf.compile(templateSource, loader.options); | ||
@@ -113,2 +113,13 @@ process.stdout.write(template(data)); | ||
main(); | ||
function main(args) { | ||
mainWithOptions(undefined, args); | ||
} | ||
module.exports = { | ||
main: main, | ||
mainWithOptions: mainWithOptions, | ||
}; | ||
if (module === require.main) { | ||
main(process.argv.slice(2)); | ||
} |
@@ -5,2 +5,3 @@ "use strict"; | ||
var path = require("path"); | ||
var util = require("util"); | ||
@@ -47,2 +48,13 @@ var parser = require("./parser"); | ||
exports.DirectoryLoader = DirectoryLoader; | ||
Object.defineProperty(DirectoryLoader, "DirectoryLoader", { | ||
configurable: true, | ||
get: util.deprecate(function () { | ||
return DirectoryLoader; | ||
}, "DirectoryLoader is now a direct export; const DirectoryLoader = require('razorleaf/directory-loader')"), | ||
set: function (value) { | ||
delete this.DirectoryLoader; | ||
this.DirectoryLoader = value; | ||
}, | ||
}); | ||
module.exports = DirectoryLoader; |
{ | ||
"name": "razorleaf", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "index.js", |
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
73122
2219