Comparing version 1.0.0-rc.4 to 1.0.0-rc.5
# Changelog | ||
## 1.0.0rc.5 | ||
* Improved view | ||
* Prevented some broken links | ||
* Made the documentation responsive | ||
* Added PrismJS | ||
* Fixed an issue with `@requires` type | ||
* Fixed some formatting issues with `@example` | ||
## 1.0.0rc.4 | ||
* Fixed an issue prevented `@requires` form working if there was any `@aliaw` | ||
* Fixed an issue prevented `@requires` form working if there was any `@alias` | ||
@@ -7,0 +16,0 @@ ## 1.0.0rc.3 |
@@ -6,3 +6,3 @@ { | ||
"contributors": ["Fabrice Weinberg", "Valérian Galliat"], | ||
"version": "1.0.0rc.4", | ||
"version": "1.0.0rc.5", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "repository": { | ||
"ncp": "^0.5.1", | ||
"scsscommentparser": "0.0.14" | ||
"scsscommentparser": "0.0.16" | ||
}, | ||
@@ -34,0 +34,0 @@ "bin": { |
'use strict'; | ||
var reqRegEx = /\s*(?:\{([\w-_]+)\}\s*)?(.*)/; | ||
module.exports = function (text) { | ||
return text.trim(); | ||
var match = reqRegEx.exec(text); | ||
return { | ||
type : match[1] || 'function', | ||
name : match[2] | ||
}; | ||
}; |
@@ -191,3 +191,3 @@ 'use strict'; | ||
logger.log(response.length + ' item' + (response.length > 1 ? 's' : '') + ' documented.'); | ||
var result = {}; | ||
@@ -198,3 +198,3 @@ var index = {}; | ||
Object.keys(obj).forEach(function (key) { | ||
if (typeof result[key] === 'undefined' ) { | ||
if (typeof result[key] === 'undefined' ) { | ||
result[key] = []; | ||
@@ -204,3 +204,3 @@ } | ||
obj[key].forEach(function (item) { | ||
index[item.context.name] = item; | ||
index[item.context.type + '_' + item.context.name] = item; | ||
result[key].push(item); | ||
@@ -220,11 +220,13 @@ }); | ||
// Alias | ||
if (utils.isset(item.alias)) { | ||
if (utils.isset(item.alias)) { | ||
item.alias.forEach(function (alias) { | ||
if (utils.isset(index[alias])) { | ||
if (!Array.isArray(index[alias].aliased)) { | ||
index[alias].aliased = []; | ||
var lookupKey = item.context.type + '_' + alias; // Alias has to be from same type | ||
if (utils.isset(index[lookupKey])) { | ||
if (!Array.isArray(index[lookupKey].aliased)) { | ||
index[lookupKey].aliased = []; | ||
} | ||
index[alias].aliased.push(item.context.name); | ||
} | ||
index[lookupKey].aliased.push(item.context.name); | ||
} | ||
@@ -235,15 +237,16 @@ else { | ||
}); | ||
} | ||
} | ||
// Requires | ||
if (utils.isset(item.requires)) { | ||
item.requires = item.requires.map(function (name) { | ||
if (utils.isset(index[name])) { | ||
var reqItem = index[name]; | ||
if (!Array.isArray(reqItem.usedBy)) { | ||
item.requires = item.requires.map(function (req) { | ||
var lookupKey = req.type + '_' + req.name; | ||
if (utils.isset(index[lookupKey])) { | ||
var reqItem = index[lookupKey]; | ||
if (!Array.isArray(reqItem.usedBy)) { | ||
reqItem.usedBy = []; | ||
} | ||
reqItem.usedBy.push({ | ||
reqItem.usedBy.push({ | ||
item: item.context.name, | ||
@@ -257,3 +260,3 @@ type: item.context.type | ||
else { | ||
logger.log('Item `' + item.context.name + ' requires `' + name + '` but this item doesn\'t exist.'); | ||
logger.log('Item `' + item.context.name + ' requires `' + req.name + '` from type `' + req.type + '` but this item doesn\'t exist.'); | ||
} | ||
@@ -260,0 +263,0 @@ }).filter(function (item) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
197646
102
1332
+ Addedcdocparser@0.0.10(transitive)
+ Addedscsscommentparser@0.0.16(transitive)
- Removedcdocparser@0.0.8(transitive)
- Removedscsscommentparser@0.0.14(transitive)
Updatedscsscommentparser@0.0.16