Comparing version 0.0.8 to 0.0.9
@@ -9,2 +9,3 @@ var inherit = require('inherit'); | ||
var ObjectProvider = require('./source/object-provider'); | ||
var TemplateProvider = require('./source/template-provider'); | ||
var YMProvider = require('./module-providers/ym'); | ||
@@ -24,3 +25,4 @@ | ||
new InheritProvider(), | ||
new ObjectProvider() | ||
new ObjectProvider(), | ||
new TemplateProvider() | ||
]; | ||
@@ -27,0 +29,0 @@ this._moduleProviders = [ |
@@ -12,15 +12,2 @@ var JsClass = require('../../object-model/class'); | ||
var inheritMethodName = 'inherit'; | ||
// file.iterateNodesByType('CallExpression', function(node) { | ||
// if (node.callee.type === 'Identifier' && node.callee.name === 'require') { | ||
// if (node.arguments.length && | ||
// node.arguments[0].type === 'Literal' && | ||
// node.arguments[0].value === 'inherit' | ||
// ) { | ||
// var parent = node.parentNode; | ||
// if (parent.type === 'VariableDeclarator') { | ||
// inheritMethodName = parent.id.name; | ||
// } | ||
// } | ||
// } | ||
// }); | ||
if (inheritMethodName) { | ||
@@ -27,0 +14,0 @@ file.iterateNodesByType('CallExpression', function(node) { |
@@ -54,3 +54,3 @@ var vowFs = require('vow-fs'); | ||
} else { | ||
if (filename.match(/^[a-z0-9_\-]+\.js$/g)) { | ||
if (filename.match(/.js$/g) && !filename.match(/test.js$/g)) { | ||
return vowFs.read(fullname, 'utf8').then(function (data) { | ||
@@ -57,0 +57,0 @@ var analyzer = new Analyzer(fullname); |
var JsClass = require('../object-model/class'); | ||
var JsObject = require('../object-model/object'); | ||
var JsFunction = require('../object-model/function'); | ||
var JsTemplate = require('../object-model/template'); | ||
@@ -78,6 +79,13 @@ module.exports = function (project) { | ||
text += '}\n'; | ||
text += '\n'; | ||
text += '}\n\n'; | ||
} else if (moduleMember instanceof JsObject) { | ||
text += dumpObject(moduleMember) + '\n'; | ||
} else if (moduleMember instanceof JsTemplate) { | ||
text += 'template ' + moduleMember.getName() + ' {\n'; | ||
text += moduleMember.getArguments().map( | ||
function (arg) { | ||
return '\t' + (arg.type || '*') + ' ' + arg.name; | ||
} | ||
).join('\n'); | ||
text += '\n}\n\n'; | ||
} else if (moduleMember instanceof JsFunction) { | ||
@@ -84,0 +92,0 @@ text += dumpFuncDecl(moduleMember, 0, false) + '\n'; |
{ | ||
"author": "Marat Dulin", | ||
"name": "analyze", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"engines": { | ||
@@ -6,0 +6,0 @@ "node": "0.10" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
123103
43
3216
0