Last active
October 11, 2015 16:44
-
-
Save wilmoore/72971fc5349fe22ed303 to your computer and use it in GitHub Desktop.
The new JS class syntax is no panacea as it is implied in the video. I mean, there are other ways to fix this: https://youtu.be/05Z6YGiZKmE?t=11m42s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/*! | |
* exports. | |
*/ | |
module.exports = initialize | |
/*! | |
* object initialization. | |
*/ | |
function initialize () { | |
return Object.assign({ files: { minified: [] } }) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/*! | |
* imports. | |
*/ | |
const infile = require('./infile') | |
/*! | |
* exports. | |
*/ | |
module.exports = initialize | |
/*! | |
* object initialization. | |
*/ | |
function initialize () { | |
return Object.assign(infile(), { addJavaScript }) | |
} | |
/*! | |
* Add JavaScript file. | |
*/ | |
function addJavaScript (data, sourceMap, path) { | |
this.files.minified.push({ data, sourceMap, path }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For more info on this concept, check out: https://github.com/wilmoore/polykata/tree/master/oloo-game-player-poc/js