build(aio): move the `transforms` folder into the `tools` folder

This commit is contained in:
Peter Bacon Darwin 2017-04-16 21:31:21 +01:00 committed by Pete Bacon Darwin
parent 7c418a7e06
commit abecf3eb6d
160 changed files with 24 additions and 18 deletions

View File

@ -20,10 +20,10 @@
"deploy-staging": "scripts/deploy-staging.sh", "deploy-staging": "scripts/deploy-staging.sh",
"check-env": "node ../tools/check-environment.js", "check-env": "node ../tools/check-environment.js",
"predocs": "rimraf src/content", "predocs": "rimraf src/content",
"docs": "dgeni ./transforms/angular.io-package", "docs": "dgeni ./tools/transforms/angular.io-package",
"docs-watch": "node transforms/authors-package/watchr.js", "docs-watch": "node tools/transforms/authors-package/watchr.js",
"docs-lint": "eslint --ignore-path=\"transforms/.eslintignore\" transforms", "docs-lint": "eslint --ignore-path=\"tools/transforms/.eslintignore\" tools/transforms",
"docs-test": "node ../dist/tools/cjs-jasmine/index-tools ../../transforms/**/*.spec.js", "docs-test": "node ../dist/tools/cjs-jasmine/index-tools ../../tools/transforms/**/*.spec.js",
"~~update-webdriver": "webdriver-manager update --standalone false --gecko false", "~~update-webdriver": "webdriver-manager update --standalone false --gecko false",
"boilerplate:add": "node ./tools/examples/add-example-boilerplate add", "boilerplate:add": "node ./tools/examples/add-example-boilerplate add",
"boilerplate:remove": "node ./tools/examples/add-example-boilerplate remove", "boilerplate:remove": "node ./tools/examples/add-example-boilerplate remove",

View File

@ -11,7 +11,7 @@ var globby = require('globby');
var fileTranslator = require('./translator/fileTranslator'); var fileTranslator = require('./translator/fileTranslator');
var indexHtmlRules = require('./translator/rules/indexHtml'); var indexHtmlRules = require('./translator/rules/indexHtml');
var systemjsConfigExtrasRules = require('./translator/rules/systemjsConfigExtras'); var systemjsConfigExtrasRules = require('./translator/rules/systemjsConfigExtras');
var regionExtractor = require('../../transforms/examples-package/services/region-parser'); var regionExtractor = require('../transforms/examples-package/services/region-parser');
class PlunkerBuilder { class PlunkerBuilder {
constructor(basePath, destPath, options) { constructor(basePath, destPath, options) {

View File

@ -1,9 +1,9 @@
# Documentation Generation # Documentation Generation
The dgeni tool is used to generate the documentation from the source files held in this repository. The dgeni tool is used to generate the documentation from the source files held in this repository.
The documentation generation is configured by a dgeni package defined in `docs/angular.io-package/index.js`. The documentation generation is configured by a dgeni package defined in `tools/transforms/angular.io-package/index.js`.
This package, in turn requires a number of other packages, some are defined locally in the `docs` folder, This package, in turn requires a number of other packages, some are defined locally in the `tools/transforms` folder,
such as `docs/cheatsheet-package` and `docs/content-package`, etc. And some are brought in from the such as `tools/transforms/cheatsheet-package` and `tools/transforms/content-package`, etc. And some are brought in from the
`dgeni-packages` node modules, such as `jsdoc` and `nunjucks`. `dgeni-packages` node modules, such as `jsdoc` and `nunjucks`.
## Generating the docs ## Generating the docs

View File

@ -19,11 +19,11 @@ const targetPackage = require('../target-package');
const contentPackage = require('../content-package'); const contentPackage = require('../content-package');
const remarkPackage = require('../remark-package'); const remarkPackage = require('../remark-package');
const PROJECT_ROOT = path.resolve(__dirname, '../../..'); const PROJECT_ROOT = path.resolve(__dirname, '../../../..');
const API_SOURCE_PATH = path.resolve(PROJECT_ROOT, 'packages'); const API_SOURCE_PATH = path.resolve(PROJECT_ROOT, 'packages');
const AIO_PATH = path.resolve(PROJECT_ROOT, 'aio'); const AIO_PATH = path.resolve(PROJECT_ROOT, 'aio');
const CONTENTS_PATH = path.resolve(AIO_PATH, 'content'); const CONTENTS_PATH = path.resolve(AIO_PATH, 'content');
const TEMPLATES_PATH = path.resolve(AIO_PATH, 'transforms/templates'); const TEMPLATES_PATH = path.resolve(AIO_PATH, 'tools/transforms/templates');
const OUTPUT_PATH = path.resolve(AIO_PATH, 'src/content'); const OUTPUT_PATH = path.resolve(AIO_PATH, 'src/content');
const DOCS_OUTPUT_PATH = path.resolve(OUTPUT_PATH, 'docs'); const DOCS_OUTPUT_PATH = path.resolve(OUTPUT_PATH, 'docs');
@ -162,7 +162,7 @@ module.exports =
collectExamples.exampleFolders = ['examples', 'examples']; collectExamples.exampleFolders = ['examples', 'examples'];
generateKeywordsProcessor.ignoreWordsFile = 'aio/transforms/angular.io-package/ignore.words'; generateKeywordsProcessor.ignoreWordsFile = 'aio/tools/transforms/angular.io-package/ignore.words';
generateKeywordsProcessor.docTypesToIgnore = ['example-region']; generateKeywordsProcessor.docTypesToIgnore = ['example-region'];
}) })

View File

@ -18,11 +18,11 @@ const targetPackage = require('../target-package');
const contentPackage = require('../content-package'); const contentPackage = require('../content-package');
const remarkPackage = require('../remark-package'); const remarkPackage = require('../remark-package');
const PROJECT_ROOT = path.resolve(__dirname, '../../..'); const PROJECT_ROOT = path.resolve(__dirname, '../../../..');
const API_SOURCE_PATH = path.resolve(PROJECT_ROOT, 'packages'); const API_SOURCE_PATH = path.resolve(PROJECT_ROOT, 'packages');
const AIO_PATH = path.resolve(PROJECT_ROOT, 'aio'); const AIO_PATH = path.resolve(PROJECT_ROOT, 'aio');
const CONTENTS_PATH = path.resolve(AIO_PATH, 'content'); const CONTENTS_PATH = path.resolve(AIO_PATH, 'content');
const TEMPLATES_PATH = path.resolve(AIO_PATH, 'transforms/templates'); const TEMPLATES_PATH = path.resolve(AIO_PATH, 'tools/transforms/templates');
const OUTPUT_PATH = path.resolve(AIO_PATH, 'src/content'); const OUTPUT_PATH = path.resolve(AIO_PATH, 'src/content');
const DOCS_OUTPUT_PATH = path.resolve(OUTPUT_PATH, 'docs'); const DOCS_OUTPUT_PATH = path.resolve(OUTPUT_PATH, 'docs');

View File

@ -1,7 +1,7 @@
const fs = require('fs'); const fs = require('fs');
const {resolve} = require('canonical-path'); const {resolve} = require('canonical-path');
const {generateDocs} = require('./index.js'); const {generateDocs} = require('./index.js');
const rootPath = resolve(__dirname, '../../..'); const rootPath = resolve(__dirname, '../../../..');
const outputPath = resolve(rootPath, 'aio/src/content/docs'); const outputPath = resolve(rootPath, 'aio/src/content/docs');
describe('authors-package', () => { describe('authors-package', () => {

View File

@ -2,7 +2,7 @@
const watchr = require('watchr'); const watchr = require('watchr');
const {resolve, relative} = require('canonical-path'); const {resolve, relative} = require('canonical-path');
const {generateDocs} = require('./index.js'); const {generateDocs} = require('./index.js');
const rootPath = resolve(__dirname, '../../..'); const rootPath = resolve(__dirname, '../../../..');
const contentsPath = resolve(rootPath, 'aio/content'); const contentsPath = resolve(rootPath, 'aio/content');
const apiPath = resolve(rootPath, 'packages'); const apiPath = resolve(rootPath, 'packages');
@ -16,10 +16,16 @@ function listener(changeType, fullPath) {
} }
} }
function next(error) {
if (error) {
console.log(error);
}
}
console.log('Started watching files in:'); console.log('Started watching files in:');
console.log(' - ', contentsPath); console.log(' - ', contentsPath);
console.log(' - ', apiPath); console.log(' - ', apiPath);
console.log('Doc gen will run when you change a file in either of these folders.'); console.log('Doc gen will run when you change a file in either of these folders.');
watchr.open(contentsPath, listener); watchr.open(contentsPath, listener, next);
watchr.open(apiPath, listener); watchr.open(apiPath, listener, next);

View File

@ -18,7 +18,7 @@ module.exports = function testPackage(packageName, mockTemplateEngine) {
pkg.factory('log', function() { return require('dgeni/lib/mocks/log')(false); }); pkg.factory('log', function() { return require('dgeni/lib/mocks/log')(false); });
// overrides base packageInfo and returns the one for the 'angular/angular' repo. // overrides base packageInfo and returns the one for the 'angular/angular' repo.
const PROJECT_ROOT = path.resolve(__dirname, '../../..'); const PROJECT_ROOT = path.resolve(__dirname, '../../../..');
pkg.factory('packageInfo', function() { return require(path.resolve(PROJECT_ROOT, 'package.json')); }); pkg.factory('packageInfo', function() { return require(path.resolve(PROJECT_ROOT, 'package.json')); });

Some files were not shown because too many files have changed in this diff Show More