Skip to content

Commit

Permalink
updated: using umd export for the tmpl.csp file
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Apr 24, 2016
1 parent fb9370a commit 7c11ffc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions dist/csp.tmpl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
(function (exports) {
'use strict';
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.cspTmpl = global.cspTmpl || {})));
}(this, function (exports) { 'use strict';

var __commonjs_global = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this;
function __commonjs(fn, module) { return module = { exports: {} }, fn(module, module.exports, __commonjs_global), module.exports; }
Expand Down Expand Up @@ -6938,4 +6941,4 @@
exports.brackets = brackets;
exports.tmpl = tmpl;

}((this.cspTmpl = this.cspTmpl || {})));
}));
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
],
"devDependencies": {
"coveralls": "^2.11.9",
"eslint": "^2.7.0",
"eslint": "^2.8.0",
"esprima": "^2.7.2",
"expect.js": "^0.3.1",
"hoister": "0.0.2",
Expand All @@ -43,7 +43,7 @@
"mocha": "^2.4.5",
"phantomjs-prebuilt": "^2.1.7",
"riot-bump": "^1.0.0",
"rollup": "^0.25.8",
"rollup": "^0.26.0",
"rollup-plugin-commonjs": "^2.2.1",
"rollup-plugin-node-resolve": "^1.5.0"
},
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export default {
include: './node_modules/**'
})
],
format: 'iife'
format: 'umd'
}
2 changes: 1 addition & 1 deletion test/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var isNode = typeof window === 'undefined'

describe('Tmpl Tests', function () {
if (isNode) {
var _ = require('../dist/csp.tmpl').cspTmpl
var _ = require('../dist/tmpl')
expect = require('expect.js')
tmpl = _.tmpl
brackets = _.brackets
Expand Down

0 comments on commit 7c11ffc

Please sign in to comment.