Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(doc-gen): add a jquery deploy environment, and give examples one i... #6361

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ var _ = require('lodash');
var path = require('canonical-path');
var packagePath = __dirname;

var angularjsPackage = require('dgeni-packages/ngdoc');
var basePackage = require('dgeni-packages/ngdoc');
var examplesPackage = require('dgeni-packages/examples');

module.exports = function(config) {

config = angularjsPackage(config);
config = basePackage(config);
config = examplesPackage(config);

config.append('processing.processors', [
require('./processors/git-data'),
Expand Down
4 changes: 2 additions & 2 deletions docs/config/processors/index-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
init: function(config) {
deployment = config.deployment;
if ( !deployment || !deployment.environments ) {
throw new Errro('No deployment environments found in the config.');
throw new Error('No deployment environments found in the config.');
}
},
process: function(docs) {
Expand Down Expand Up @@ -39,4 +39,4 @@ module.exports = {
docs.push(indexDoc);
});
}
};
};
61 changes: 57 additions & 4 deletions docs/docs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ module.exports = function(config) {
{ pattern: '**/*.ngdoc', basePath: path.resolve(basePath, 'content') }
]);

config.set('processing.examples.commonFiles', {
scripts: [ '../../../angular.js' ],
stylesheets: []
});
config.set('processing.examples.dependencyPath', '../../..');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be removed as the dependencyPaths are now inside the deployments below.



Expand All @@ -41,6 +37,12 @@ module.exports = function(config) {
config.merge('deployment', {
environments: [{
name: 'debug',
examples: {
commonFiles: {
scripts: [ '../../../angular.js' ]
},
dependencyPath: '../../..'
},
scripts: [
'../angular.js',
'../angular-resource.js',
Expand Down Expand Up @@ -70,7 +72,52 @@ module.exports = function(config) {
},
{
name: 'default',
examples: {
commonFiles: {
scripts: [ '../../../angular.min.js' ]
},
dependencyPath: '../../..'
},
scripts: [
'../angular.min.js',
'../angular-resource.min.js',
'../angular-route.min.js',
'../angular-cookies.min.js',
'../angular-sanitize.min.js',
'../angular-touch.min.js',
'../angular-animate.min.js',
'components/marked-' + getVersion('marked', '../node_modules', 'package.json') + '/lib/marked.js',
'js/angular-bootstrap/bootstrap.js',
'js/angular-bootstrap/bootstrap-prettify.js',
'js/angular-bootstrap/dropdown-toggle.js',
'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js',
'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js',
'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/lang-css.js',
'js/versions-data.js',
'js/pages-data.js',
'js/docs.js'
],
stylesheets: [
'components/bootstrap-' + getVersion('bootstrap') + '/dist/css/bootstrap.min.css',
'components/open-sans-fontface-' + getVersion('open-sans-fontface') + '/open-sans.css',
'css/prettify-theme.css',
'css/docs.css',
'css/animations.css'
]
},
{
name: 'jquery',
examples: {
commonFiles: {
scripts: [
'../../components/jquery-' + getVersion('jquery') + '/jquery.js',
'../../../angular.js'
]
},
dependencyPath: '../../..'
},
scripts: [
'components/jquery-' + getVersion('jquery') + '/jquery.js',
'../angular.min.js',
'../angular-resource.min.js',
'../angular-route.min.js',
Expand Down Expand Up @@ -99,6 +146,12 @@ module.exports = function(config) {
},
{
name: 'production',
examples: {
commonFiles: {
scripts: [ cdnUrl + '/angular.min.js' ]
},
dependencyPath: cdnUrl
},
scripts: [
cdnUrl + '/angular.min.js',
cdnUrl + '/angular-resource.min.js',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"canonical-path": "0.0.2",
"winston": "~0.7.2",
"dgeni": "~0.1.0",
"dgeni-packages": "~0.1.0",
"dgeni-packages": "~0.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change this to "^0.2.2", since we'll need greater than 0.2.1 to get this working.

"gulp-jshint": "~1.4.2",
"jshint-stylish": "~0.1.5"
},
Expand Down