Skip to content

Commit

Permalink
feat(console): コンソールエディタにPromiseのpolyfill参照させるように
Browse files Browse the repository at this point in the history
ブラウザにPromiseが実装されてなくてもサンプルが実行できるようになる

 
fixes #124
  • Loading branch information
azu committed Jun 11, 2014
1 parent 73e135a commit f8b1a6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"codemirror": "^4.2.0",
"codemirror-console-ui": "^0.1.0",
"codemirror-console-ui": "^0.1.3",
"jquery": "^2.1.1",
"w3c-xmlhttprequest": "~1.1.0",
"ypromise": "~0.2"
Expand Down
4 changes: 4 additions & 0 deletions public/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
* LICENSE : MIT
*/
"use strict";
var Promise = require("ypromise");
module.exports.initilize = function () {
var consoleUI = require("codemirror-console-ui");
consoleUI.setUserContext({
Promise: Promise
});
var codeBlocks = document.querySelectorAll("div.listingblock");
for (var i = 0; i < codeBlocks.length; i++) {
var codeBlock = codeBlocks[i];
Expand Down

0 comments on commit f8b1a6d

Please sign in to comment.