Skip to content

Commit

Permalink
Merge pull request #34 from ramitos/upgrade
Browse files Browse the repository at this point in the history
update dependencies
  • Loading branch information
sergioramos committed Feb 22, 2016
2 parents 77da820 + 673bfa3 commit bf2ded1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 29 deletions.
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsctags",
"version": "4.0.0",
"version": "4.0.1",
"description": "jsctags generator",
"keywords": [
"ctags",
Expand Down Expand Up @@ -32,41 +32,41 @@
"coverage": "nyc report --reporter=text-lcov | codeclimate-test-reporter"
},
"dependencies": {
"acorn": "^2.6.4",
"async": "^1.5.0",
"acorn": "^3.0.2",
"async": "^1.5.2",
"collect-stream": "^1.1.1",
"deepmerge": "^0.2.10",
"force-array": "^3.1.0",
"is-string": "^1.0.4",
"lodash.clonedeep": "^3.0.2",
"lodash.defaults": "^3.1.2",
"lodash.get": "^3.7.0",
"lodash.includes": "^3.1.3",
"lodash.isarray": "^3.0.4",
"lodash.isfunction": "^3.0.6",
"lodash.isplainobject": "^3.2.0",
"lodash.clonedeep": "^4.3.0",
"lodash.defaults": "^4.0.1",
"lodash.get": "^4.1.2",
"lodash.includes": "^4.1.0",
"lodash.isarray": "^4.0.0",
"lodash.isfunction": "^3.0.8",
"lodash.isplainobject": "^4.0.2",
"lodash.isstring": "^4.0.1",
"lodash.isundefined": "^3.0.1",
"lodash.sortby": "^3.1.5",
"lodash.without": "^3.2.1",
"lodash.sortby": "^4.2.0",
"lodash.without": "^4.1.0",
"node-uuid": "^1.4.7",
"object-hash": "^0.9.2",
"object-hash": "^1.1.2",
"once": "^1.3.3",
"optimist": "^0.6.1",
"tern": "^0.16.0",
"tern": "^0.17.0",
"tern-react": "^0.1.0",
"tryor": "^0.1.2"
},
"devDependencies": {
"codeclimate-test-reporter": "^0.1.1",
"codeclimate-test-reporter": "^0.3.1",
"eslint": "^1.10.1",
"eslint-config-standard": "^4.4.0",
"eslint-plugin-standard": "^1.3.1",
"glob": "^6.0.1",
"lodash.take": "^3.0.0",
"longjohn": "^0.2.10",
"nyc": "^3.2.2",
"semistandard": "^7.0.3",
"snazzy": "^2.0.1"
"glob": "^7.0.0",
"lodash.take": "^4.0.1",
"longjohn": "^0.2.11",
"nyc": "^5.6.0",
"semistandard": "^7.0.5",
"snazzy": "^3.0.0"
},
"semistandard": {
"ignore": [
Expand Down
16 changes: 10 additions & 6 deletions src/condenser.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ module.exports = function (options, fn) {
options.server = server(config(options.dir, options.file), options.dir);
}

options.server.request({files: [{
name: options.file,
text: options.content,
type: 'full'
}]}, function (err) {
var filename = options.server.normalizeFilename(options.file);

options.server.request({
files: [{
name: filename,
text: options.content,
type: 'full'
}]
}, function (err) {
_fn(err);
});

Expand All @@ -96,7 +100,7 @@ module.exports = function (options, fn) {
return _fn(err);
}

_fn(null, condense.condense(options.file, options.file, {
_fn(null, condense.condense(filename, filename, {
spans: true,
server: options.server
}));
Expand Down
12 changes: 11 additions & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var format = require('util').format;
var isString = require('is-string');
var isString = require('lodash.isstring');
var includes = require('lodash.includes');
var isUndefined = require('lodash.isundefined');
var isObject = require('lodash.isplainobject');
Expand All @@ -11,6 +11,7 @@ var get = require('lodash.get');
var objectHash = require('object-hash');
var clone = require('lodash.clonedeep');
var uuid = require('node-uuid');
var path = require('path');

var condense = require('./condenser');

Expand Down Expand Up @@ -77,6 +78,11 @@ var Parser = function (ctx) {
return new Parser(ctx);
}

var extname = path.extname(ctx.file);
var basename = path.basename(ctx.file, extname);

this.fileId = format('%s%s', basename, extname.replace(/\./, '`'));

this.ctx = ctx;
this.condense = ctx.condense || {};
this.tags = [];
Expand Down Expand Up @@ -163,6 +169,10 @@ Parser.prototype.namespace = function (node, parent) {
return;
}

if (parent.name === this.fileId) {
return;
}

return parent.name;
};

Expand Down

0 comments on commit bf2ded1

Please sign in to comment.