Merge pull request #1 from cwiki-us-docs/angular.ossez.com

从官方版本中合并
This commit is contained in:
YuCheng Hu 2021-08-11 09:34:44 -04:00 committed by GitHub
commit 4756fd9573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 34 additions and 228 deletions

View File

@ -1,7 +1,6 @@
{
// Docs on Firebase hosting configuration: https://firebase.google.com/docs/hosting/full-config
"hosting": {
"target": "aio",
"public": "dist",
"cleanUrls": true,
//////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh
[[ -n "$TRAVIS" ]] && . ./scripts/env-info-and-check.sh
(set -x; npm install -g gulp --no-optional)

View File

@ -1,56 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh > /dev/null
if [[ "x$1" == "x-v" ]]; then VERBOSE=1; shift; fi
SITE=./www
CHECK_FOR=bad-code-excerpt
LOGFILE_PREFIX=$CHECK_FOR-log
LOGFILE_FULL=$TMP/$LOGFILE_PREFIX-full.txt
LOGFILE=$TMP/$LOGFILE_PREFIX.txt
SKIPFILE_BASE=$CHECK_FOR-skip-patterns.txt
SKIPFILE_SRC=./scripts/config/$SKIPFILE_BASE
SKIPFILE=$TMP/$SKIPFILE_BASE
if [[ ! -d $SITE ]]; then
echo "Missing site folder $SITE"
exit 1;
fi
travis_fold start $CHECK_FOR
echo "Searching site for HTML files containing bad code excerpts (BAD FILENAME)."
echo
if [[ -n "$VERBOSE" ]]; then
travis_fold start $CHECK_FOR-details
echo "Full file list with grep details:"
find $SITE -type f -name "*.html" -exec grep -Hne "BAD FILENAME" {} \; | tee $LOGFILE_FULL
travis_fold end $CHECK_FOR-details
echo
else
echo "Full file list:"
find $SITE -type f -name "*.html" -exec grep -le "BAD FILENAME" {} \; | tee $LOGFILE_FULL
fi
echo
echo "Skip patterns for paths of files known to have issues ($SKIPFILE_SRC):"
perl -pe 's/(\s+|\s*#.*)$/\n/g' $SKIPFILE_SRC | \
# Remove blank lines \
grep '.' > $SKIPFILE
cat $SKIPFILE
echo
echo "File list excluding those matching skip patterns:"
grep -v -E -f $SKIPFILE $LOGFILE_FULL | tee $LOGFILE || true
if [[ ! -s $LOGFILE ]]; then
echo "No matches, all is good!"
travis_fold end $CHECK_FOR
else
exit 1;
fi

View File

@ -1,4 +0,0 @@
# Comments & blank lines are ignored. Entry format (make pattern as specific as possible):
# <grep-pattern-to-match-file-path> # reason / issue number
/[jt]s/.*/api/forms/index/NG_VALIDATORS-let.html # RC6 contains broken example tags

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
./scripts/deploy-install.sh
(cd ../angular && git checkout $PREVIEW_BRANCH)

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh
if [[ -e "$NG2_REPO" ]]; then
echo Angular repo is already present at: $NG2_REPO
else
travis_fold start install.ng2
echo GETTING Angular from GitHub ...
set -x
git clone https://github.com/angular/angular.git $NG2_REPO
git -C $NG2_REPO checkout $LATEST_RELEASE
set +x
travis_fold end install.ng2
fi
echo INSTALLED repos:
ls -ld ../a*

View File

@ -1,49 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh
travis_fold start env_info
echo ENVIRONMENT INFO
travis_fold start env_info.path
echo Path:
echo $PATH | tr : '\n'
echo
travis_fold end env_info.path
travis_fold start env_info.home
echo Home: $HOME
ls -la ~
echo
travis_fold end env_info.home
travis_fold start env_info.pwd
echo Pwd: `pwd`
ls -la
echo
travis_fold end env_info.pwd
if [[ 0 ]]; then
# Not needed anymore, but keeping it at least for the first commit for archival purposes.
travis_fold start env_info.bash_profile
echo Bash profile ------------------------------------------------------------
cat ~/.bash_profile
travis_fold end env_info.bash_profile
travis_fold start env_info.bashrc
echo Bashrc ------------------------------------------------------------------
cat ~/.bashrc
echo -------------------------------------------------------------------------
travis_fold end env_info.bashrc
travis_fold start env_info.build
echo build.sh ----------------------------------------------------------------
cat ~/build.sh
echo -------------------------------------------------------------------------
travis_fold end env_info.build
fi
travis_fold end env_info
echo ENVIRONMENT CONFIG CHECK:
if [[ -z "$NGIO_ENV_DEFS" ]]; then
echo Environment variables are not being set. Aborting.
exit 1;
else
echo Environment variables successfully set.
fi

View File

@ -1,39 +0,0 @@
#!/usr/bin/env bash
if [[ -z "$NGIO_ENV_DEFS" ]]; then
export ANSI_YELLOW="\033[33;1m"
export ANSI_RESET="\033[0m"
echo -e "${ANSI_YELLOW}Setting environment variables from scripts/env-set.sh${ANSI_RESET} "
export NGIO_ENV_DEFS=1
export NG2_REPO=../angular
export NG2DART_REPO=$NG2_REPO-dart
if [ ! $(type -t travis_fold) ]; then
# In case this is being run locally. Turn travis_fold into a noop.
travis_fold () { true; }
# Alternative definition:
# travis_fold () { echo -en "travis_fold:${1}:${2}"; }
fi
export -f travis_fold
case "$(uname -a)" in
Darwin\ *) _OS_NAME=macos ;;
Linux\ *) _OS_NAME=linux ;;
*) _OS_NAME=linux ;;
esac
export _OS_NAME
: ${TMP:=$HOME/tmp}
: ${PKG:=$TMP/pkg}
export TMP
export PKG
if [[ -z "$(type -t dart)" && ! $PATH =~ */dart-sdk/* ]]; then
export DART_SDK="$PKG/dart-sdk"
# echo Updating PATH to include access to Dart bin.
export PATH="$DART_SDK/bin:$PATH"
export PATH="$HOME/.pub-cache/bin:$PATH"
fi
fi

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
./scripts/examples-install.sh
# For master branches (ng4) also install typescript@^2.1.5
if [[ "$PREVIEW_BRANCH" == "master" ]]; then
EXTRA_PACKAGES="typescript@^2.1.5"
fi
(cd public/docs/_examples && npm install angular/{animations,core,common,compiler,compiler-cli,platform-browser,platform-browser-dynamic,platform-server,http,forms,router,tsc-wrapped,upgrade}-builds#$PREVIEW_BRANCH $EXTRA_PACKAGES --no-optional)

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
set -ex -o pipefail
(cd public/docs/_examples && npm install --no-optional)
npm run webdriver:update --prefix public/docs/_examples
gulp add-example-boilerplate

View File

@ -1,28 +0,0 @@
#!/usr/bin/env bash
set -e -o pipefail
cd `dirname $0`/..
if [[ "$(node --version)" < "v5" ]]; then
echo "ERROR: bad version of node detected. If you have nvm installed, type:"
echo " nvm use"
echo "Aborting installation."
exit 1;
else
echo "Node version: $(node --version)"
fi
echo "Installing main packages ..."
npm install --no-optional
if [ -z "$TRAVIS" ]; then
echo "Rebuilding node-sass, just in case ..."
npm rebuild node-sass;
fi
echo "Installing packages for examples ..."
source ./scripts/examples-install.sh
set +x
echo "Installation done"

View File

@ -0,0 +1,34 @@
/**
* @license
* Copyright Google LLC 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
*/
// Mapping of puppeteer releases to their default Chrome version
// derived from https://github.com/puppeteer/puppeteer/blob/master/docs/api.md.
// The puppeteer package.json file contains the compatible Chrome revision such as
// "chromium_revision": "722234" but this does not map easily to the Chrome version
// so we use this mapping here instead.
module.exports = {
'9.0.0': '91.0.4472.19',
'5.4.1': '87.0.4280.0',
'5.3.1': '86.0.4240.0',
'5.2.1': '85.0.4182.0',
'5.1.0': '84.0.4147.0',
'3.3.0': '83.0.4103.0',
'3.2.0': '83.0.4103.0',
'3.1.0': '83.0.4103.0',
'3.0.0': '81.0.4044.0',
'2.1.1': '80.0.3987.0',
'2.1.0': '80.0.3987.0',
'2.0.0': '79.0.3942.0',
'1.20.0': '78.0.3882.0',
'1.19.0': '77.0.3803.0',
'1.17.0': '76.0.3803.0',
'1.15.0': '75.0.3765.0',
'1.13.0': '74.0.3723.0',
'1.12.2': '73.0.3679.0',
};