Socket
Socket
Sign inDemoInstall

dgeni-packages

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgeni-packages - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

7

CHANGELOG.md
## v0.7.0 03/11/2014
**Minor Features**
feat(api-docs): add configuration for paths 8ddcf647
feat(runnableExample template): provide the path to the example 353eef6e
## v0.7.0 03/11/2014
**New Features**

@@ -4,0 +11,0 @@

18

ngdoc/processors/api-docs.js

@@ -5,2 +5,3 @@ var _ = require('lodash');

var partialsPath;
var options;

@@ -18,3 +19,10 @@ module.exports = {

}
options = _.assign({
outputPath: '${area}/${module}/${docType}/${name}.html',
path: '${area}/${module}/${docType}/${name}',
moduleOutputPath: '${area}/${name}/index.html',
modulePath: '${area}/${name}'
}, config.get('processing.api-docs', {}));
},
process: function(docs, partialNames, moduleMap) {

@@ -30,4 +38,4 @@ var parts;

doc.outputPath = path.join(partialsPath, _.template('${area}/${name}/index.html', doc));
doc.path = _.template('${area}/${name}', doc);
doc.outputPath = path.join(partialsPath, _.template(options.moduleOutputPath, doc));
doc.path = _.template(options.modulePath, doc);

@@ -58,4 +66,4 @@ moduleMap[doc.name] = doc;

doc.outputPath = path.join(partialsPath, _.template('${area}/${module}/${docType}/${name}.html', doc));
doc.path = _.template('${area}/${module}/${docType}/${name}', doc);
doc.outputPath = path.join(partialsPath, _.template(options.outputPath, doc));
doc.path = _.template(options.path, doc);
}

@@ -139,2 +147,2 @@ }

}
};
};

@@ -1,2 +0,3 @@

var processor = require('../../processors/api-docs');
var rewire = require('rewire');
var processor = rewire('../../processors/api-docs');
var PartialNames = require('../../utils/partial-names').PartialNames;

@@ -7,2 +8,29 @@ var Config = require('dgeni/lib/utils/config').Config;

describe("api-docs config", function() {
it("should provide defaults for its options", function() {
var config = _.extend(Config);
config.set('rendering.contentsFolder', 'partials');
processor.init(config, new di.Module());
expect(processor.__get__('options')).toEqual({
outputPath: '${area}/${module}/${docType}/${name}.html',
path: '${area}/${module}/${docType}/${name}',
moduleOutputPath: '${area}/${name}/index.html',
modulePath: '${area}/${name}'
});
});
it("should let us override the options", function() {
var config = _.extend(Config);
config.set('rendering.contentsFolder', 'partials');
config.set('processing.api-docs.path', 'XXX');
processor.init(config, new di.Module());
expect(processor.__get__('options.path')).toEqual('XXX');
expect(processor.__get__('options.moduleOutputPath')).toEqual('${area}/${name}/index.html');
});
});
describe("api-docs processor", function() {

@@ -9,0 +37,0 @@ var config;

{
"name": "dgeni-packages",
"version": "0.7.0",
"version": "0.7.1",
"description": "A collection of dgeni packages for generating documentation from source code",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc