diff --git a/aio/build/docs-app.js b/aio/build/docs-app.js deleted file mode 100644 index d092bf7829..0000000000 --- a/aio/build/docs-app.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = (gulp) => () => { - // TODO:(petebd): hook up with whatever builds need doing for the webapp -}; diff --git a/aio/build/docs.js b/aio/build/docs.js deleted file mode 100644 index 8e6e042473..0000000000 --- a/aio/build/docs.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -module.exports = { - generate: (gulp) => () => { - const path = require('path'); - const Dgeni = require('dgeni'); - const angularDocsPackage = require(path.resolve(__dirname, '../transforms/angular.io-package')); - const dgeni = new Dgeni([angularDocsPackage]); - return dgeni.generate(); - }, - - test: (gulp) => () => { - const execSync = require('child_process').execSync; - execSync( - 'node ../dist/tools/cjs-jasmine/index-tools ../../transforms/**/*.spec.js', - {stdio: ['inherit', 'inherit', 'inherit']}); - } -}; diff --git a/aio/gulpfile.js b/aio/gulpfile.js deleted file mode 100644 index 7ea457f8f9..0000000000 --- a/aio/gulpfile.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -'use strict'; - -// THIS CHECK SHOULD BE THE FIRST THING IN THIS FILE -// This is to ensure that we catch env issues before we error while requiring other dependencies. -// NOTE: we are getting the value from the parent `angular/angular` package.json not the `/aio` one. -const engines = require('../package.json').engines; -require('../tools/check-environment')({ - requiredNodeVersion: engines.node, - requiredNpmVersion: engines.npm, - requiredYarnVersion: engines.yarn -}); - -const gulp = require('gulp'); - -// See `tools/gulp-tasks/README.md` for information about task loading. -function loadTask(fileName, taskName) { - const taskModule = require('./build/' + fileName); - const task = taskName ? taskModule[taskName] : taskModule; - return task(gulp); -} - -gulp.task('docs', ['doc-gen', 'docs-app']); -gulp.task('doc-gen', loadTask('docs', 'generate')); -gulp.task('doc-gen-test', loadTask('docs', 'test')); -gulp.task('docs-app', loadTask('docs-app')); -gulp.task('docs-app-test', () => {}); -gulp.task('docs-test', ['doc-gen-test', 'docs-app-test']); -gulp.task('check-env', () => { /* this is a noop because the env test ran already above */ }); diff --git a/aio/package.json b/aio/package.json index 6cb344c41a..b1d4db6cef 100644 --- a/aio/package.json +++ b/aio/package.json @@ -7,17 +7,19 @@ "license": "MIT", "angular-cli": {}, "scripts": { - "ng": "yarn run check-env && ng", - "start": "yarn run check-env && ng serve", - "build": "yarn run check-env && ng build", - "test": "yarn run check-env && ng test", - "lint": "yarn run check-env && ng lint", + "ng": "yarn check-env && ng", + "start": "yarn check-env && ng serve", + "build": "yarn check-env && yarn docs && ng build -prod -sm", + "test": "yarn check-env && ng test", + "lint": "yarn check-env && ng lint", "pree2e": "webdriver-manager update --standalone false --gecko false", - "e2e": "yarn run check-env && ng e2e --no-webdriver-update", - "deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn run ~~deploy", - "pre~~deploy": "yarn run check-env && ng build --prod", + "e2e": "yarn check-env && ng e2e --no-webdriver-update", + "deploy-staging": "firebase use staging --token \"$FIREBASE_TOKEN\" && yarn ~~deploy", + "pre~~deploy": "yarn build", "~~deploy": "firebase deploy --message \"Commit: $TRAVIS_COMMIT\" --non-interactive --token \"$FIREBASE_TOKEN\"", - "check-env": "gulp check-env" + "check-env": "node ../tools/check-environment.js", + "docs": "dgeni ./transforms/angular.io-package", + "docs-test": "node ../dist/tools/cjs-jasmine/index-tools ../../transforms/**/*.spec.js" }, "private": true, "dependencies": { diff --git a/scripts/ci-lite/test_aio.sh b/scripts/ci-lite/test_aio.sh new file mode 100755 index 0000000000..e69de29bb2 diff --git a/scripts/ci-lite/test_docs.sh b/scripts/ci-lite/test_docs.sh new file mode 100755 index 0000000000..e69de29bb2 diff --git a/scripts/ci/test-aio.sh b/scripts/ci/test-aio.sh index a15504465e..2a16433143 100755 --- a/scripts/ci/test-aio.sh +++ b/scripts/ci/test-aio.sh @@ -17,12 +17,6 @@ source ${thisDir}/_travis-fold.sh yarn run lint travisFoldEnd "test.aio.lint" - # Generate docs files - # TODO(i): why is this in 'test' phase and not in the 'build' phase? - travisFoldStart "test.aio.doc-gen" - $(npm bin)/gulp docs - travisFoldEnd "test.aio.doc-gen" - # Start xvfb for local Chrome used for testing if [[ ${TRAVIS} ]]; then diff --git a/scripts/ci/test-docs.sh b/scripts/ci/test-docs.sh index 9368d12898..74d8a90593 100755 --- a/scripts/ci/test-docs.sh +++ b/scripts/ci/test-docs.sh @@ -10,6 +10,6 @@ source ${thisDir}/_travis-fold.sh travisFoldStart "test.docs" ( cd ${PROJECT_ROOT}/aio - $(npm bin)/gulp docs-test + yarn docs-test ) travisFoldEnd "test.docs"