Skip to content

Commit

Permalink
Merge pull request #14 from riot/better/es6-export
Browse files Browse the repository at this point in the history
better es6 export
  • Loading branch information
aMarCruz committed Dec 21, 2015
2 parents 624c1b4 + 8d49efe commit 8176928
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
8 changes: 4 additions & 4 deletions dist/es6.tmpl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/**
* The riot template engine
* @version v2.3.19
* @version WIP
*/

/**
Expand All @@ -12,6 +12,7 @@
* `brackets.set ` Change the current riot brackets
*/

export
var brackets = (function (UNDEF) {

var
Expand Down Expand Up @@ -205,6 +206,7 @@ var brackets = (function (UNDEF) {
* tmpl.loopKeys - Get the keys for an 'each' loop (used by `_each`)
*/

export
var tmpl = (function () {

var _cache = {}
Expand Down Expand Up @@ -407,7 +409,5 @@ var tmpl = (function () {

})()

tmpl.version = brackets.version = 'v2.3.19'

export default {tmpl, brackets}
tmpl.version = brackets.version = 'WIP'

4 changes: 2 additions & 2 deletions dist/riot.tmpl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/**
* The riot template engine
* @version v2.3.19
* @version WIP
*/

/**
Expand Down Expand Up @@ -407,5 +407,5 @@ var tmpl = (function () {

})()

tmpl.version = brackets.version = 'v2.3.19'
tmpl.version = brackets.version = 'WIP'

5 changes: 2 additions & 3 deletions dist/tmpl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* riot-tmpl v2.3.19, @license MIT, (c) 2015 Muut Inc. + contributors */
/* riot-tmpl WIP, @license MIT, (c) 2015 Muut Inc. + contributors */
;(function (window) {
'use strict' // eslint-disable-line

Expand Down Expand Up @@ -405,7 +405,7 @@

})()

tmpl.version = brackets.version = 'v2.3.19'
tmpl.version = brackets.version = 'WIP'

/* istanbul ignore else */
if (typeof module === 'object' && module.exports) {
Expand All @@ -426,4 +426,3 @@
}

})(typeof window === 'object' ? /* istanbul ignore next */ window : void 0) // eslint-disable-line no-void

6 changes: 4 additions & 2 deletions lib/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ var
$_RIX_RAW = 10
//#endif

//#if ES6
export
//#endif
var brackets = (function (UNDEF) {

// Closure data
// --------------------------------------------------------------------------
var
Expand Down Expand Up @@ -311,4 +313,4 @@ var brackets = (function (UNDEF) {

return _brackets

})()
})()
5 changes: 0 additions & 5 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,4 @@
}

})(typeof window === 'object' ? /* istanbul ignore next */ window : void 0) // eslint-disable-line no-void

//#elif ES6

export default {tmpl, brackets}

//#endif
5 changes: 3 additions & 2 deletions lib/tmpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
* tmpl.loopKeys - Get the keys for an 'each' loop (used by `_each`)
*/
//#define LIST_GETTERS 0

// IIFE for tmpl()
//#if ES6
export
//#endif
var tmpl = (function () {

// Closure data
// --------------------------------------------------------------------------
var _cache = {}
Expand Down

0 comments on commit 8176928

Please sign in to comment.