Skip to content

Commit b737817

Browse files
committed
use rollup-plugin-commonjs to handle commonjs style imports
1 parent e088b1c commit b737817

File tree

8 files changed

+400
-14
lines changed

8 files changed

+400
-14
lines changed

dist/leopard.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(function (global, factory) {
77
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
88
typeof define === 'function' && define.amd ? define(factory) :
9-
(global.leopard = factory());
9+
(global.Leopard = factory());
1010
}(this, (function () { 'use strict';
1111

1212
var escape = function(str) {
@@ -17,6 +17,11 @@ var escape = function(str) {
1717
.replace(/"/g, '"')
1818
};
1919

20+
var utils = {
21+
escape: escape
22+
};
23+
24+
var escape$1 = utils.escape;
2025
var escapeQuotes = function(str) {
2126
return str.replace(/"/g, '\\"')
2227
};
@@ -97,11 +102,12 @@ var parser = function(tpl, data) {
97102
var compiler = function(tpl, data) {
98103
var body = parser(tpl, data);
99104
var fun = new Function('escape', body);
100-
return fun.call(this, escape)
105+
return fun.call(this, escape$1)
101106
};
102107

103108
var leo = compiler;
109+
var src = leo;
104110

105-
return leo;
111+
return src;
106112

107113
})));

dist/leopard.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)