- #2049, support ng.io doc relative links and code-regions - Change dartdoc output folder to `docs/api` (from `doc/api`).
		
			
				
	
	
		
			27 lines
		
	
	
		
			742 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			742 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
// This file is likely outdated.
 | 
						|
// To run, cd to this dir and
 | 
						|
//   node test.js
 | 
						|
 | 
						|
const path = require('canonical-path');
 | 
						|
const Dgeni = require('dgeni');
 | 
						|
const dartPkg = require(path.resolve('.'));
 | 
						|
 | 
						|
const ANGULAR_IO_PROJECT_PATH = '../../..';
 | 
						|
const DOCS_PATH = path.join(ANGULAR_IO_PROJECT_PATH, 'public/docs');
 | 
						|
const apiDocPath = path.join(DOCS_PATH, 'dart/latest/api');
 | 
						|
 | 
						|
dartPkg.config(function (dartPkgConfigInfo) {
 | 
						|
    dartPkgConfigInfo.ngIoDartApiDocPath = apiDocPath;
 | 
						|
    dartPkgConfigInfo.ngDartDocPath = path.join(ANGULAR_IO_PROJECT_PATH, '../angular-dart/docs/api');
 | 
						|
});
 | 
						|
 | 
						|
const dgeni = new Dgeni([dartPkg]);
 | 
						|
 | 
						|
dgeni.generate().catch(function (err) {
 | 
						|
    console.log(err);
 | 
						|
    console.log(err.stack);
 | 
						|
    throw err;
 | 
						|
});
 |