Skip to content

Commit

Permalink
Updated dev-dependencies.
Browse files Browse the repository at this point in the history
src/.jshintrc Changed latedef to false. otherwise jshint complains about some
defined functions and objects that aren't wrong in our case.

build/tasks/debug Updated to the new Parse5 API.

lib/blocks/jsdebug Updated to new highlightjs names.

package.json Updated all the dev-dependencies.
  • Loading branch information
Joscha Rohmann authored and Kanaye committed Sep 10, 2016
1 parent 29b4ac2 commit 8d2b5b3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 36 deletions.
39 changes: 20 additions & 19 deletions build/tasks/debug.js
Expand Up @@ -19,26 +19,27 @@ module.exports = function (grunt) {
};
var current = root;
var parents = [];
var parser = new parse5.SimpleApiParser({
startTag: function (tagName, attrs) {
var node = {
name: attrs[0].value,
children: []
};
parents.push(current);
current.children.push(node);
current = node;
},

endTag: function () {
current = parents.pop();
},

text: function (text) {
current.children.push(text);
}
var parser = new parse5.SAXParser();

parser.on('startTag', function (tagName, attrs) {
var node = {
name: attrs[0].value,
children: []
};
parents.push(current);
current.children.push(node);
current = node;
});

parser.on('endTag', function () {
current = parents.pop();
});
parser.parse(hljs.highlightAuto(example.code, [example.language]).value);

parser.on('text', function (text) {
current.children.push(text);
});

parser.end(hljs.highlightAuto(example.code, [example.language]).value);
example.code = root;
});
}
Expand Down
3 changes: 3 additions & 0 deletions lib/blocks/jsdebug.js
Expand Up @@ -801,6 +801,9 @@ var highlightjs = {
'hljs-title': {
color: '#5cd94d'
},
'hljs-name': {
color: '#5cd94d'
},
'hljs-expression': {
color: '#7b521e'
},
Expand Down
33 changes: 17 additions & 16 deletions package.json
Expand Up @@ -12,26 +12,27 @@
"test": "grunt test:firefox"
},
"devDependencies": {
"blocks": "^0.1.4",
"blocks": "^0.3.4",
"escodegen": "^1.6.1",
"esprima": "^2.3.0",
"esprima": "^3.0.0",
"estraverse": "^4.1.0",
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-karma": "^0.10.1",
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-requirejs": "^1.0.0",
"grunt-contrib-uglify": "^2.0.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-karma": "^2.0.0",
"grunt-notify": "^0.4.1",
"grunt-preprocess": "^4.1.0",
"highlight.js": "^8.6.0",
"grunt-preprocess": "^5.1.0",
"highlight.js": "^9.6.0",
"jasmine-core": "^2.2.0",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.7",
"karma-firefox-launcher": "^0.1.4",
"karma-ie-launcher": "^0.1.5",
"karma-jasmine": "^0.3.5",
"karma": "^1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-ie-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-jasmine-jquery": "^0.1.1",
"parse5": "^1.4.1"
"parse5": "^2.2.1"
}
}
2 changes: 1 addition & 1 deletion src/.jshintrc
Expand Up @@ -11,7 +11,7 @@
"curly": true,
"freeze": true,
"immed": true,
"latedef": true,
"latedef": false,
"noarg": true,
"noempty": true,
"nonbsp": true,
Expand Down

0 comments on commit 8d2b5b3

Please sign in to comment.