diff --git a/firebase.json b/firebase.json index e72184b069..2af13c01ba 100644 --- a/firebase.json +++ b/firebase.json @@ -105,7 +105,8 @@ "ignore": [ "firebase.json", "**/.*", - "**/node_modules/**" + "**/node_modules/**", + "docs/dart/**" ] } } \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 83750aff5e..771ca7aef5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -128,7 +128,7 @@ function configLangs(langOption) { const fullSiteBuildTasks = ['build-compile', 'check-deploy', 'harp-compile']; const buildAllDocs = argv['_'] && fullSiteBuildTasks.some((task) => argv['_'].indexOf(task) >= 0); - const langDefault = buildAllDocs ? 'all' : 'ts|js'; + const langDefault = /*buildAllDocs ? 'all' :*/ 'ts|js'; if (langOption === '') { lang = ''; langs = []; @@ -914,7 +914,7 @@ function harpCompile() { if(skipLangs && fs.existsSync(WWW) && backupApiHtmlFilesExist(WWW)) { gutil.log(`Harp site recompile: skipping recompilation of API docs for [${skipLangs}]`); - gutil.log(`API docs will be copied from existing ${WWW} folder.`) + gutil.log(`API docs will be copied from existing ${WWW} folder (if they exist).`) del.sync(`${WWW}-backup`); // remove existing backup if it exists renameIfExistsSync(WWW, `${WWW}-backup`); } else { @@ -1069,7 +1069,7 @@ function restoreApiHtml() { const relApiDir = path.join('docs', lang, vers, 'api'); const apiSubdir = path.join(WWW, relApiDir); const backupApiSubdir = path.join(`${WWW}-backup`, relApiDir); - if (fs.existsSync(backupApiSubdir) || argv.forceSkipApi !== true) { + if (fs.existsSync(backupApiSubdir)) { gutil.log(`cp ${backupApiSubdir} ${apiSubdir}`) fs.copySync(backupApiSubdir, apiSubdir); } @@ -1081,6 +1081,7 @@ function backupApiHtmlFilesExist(folderName) { const vers = 'latest'; var result = 1; skipLangs.forEach(lang => { + if (lang === 'dart') return true; const relApiDir = path.join('docs', lang, vers, 'api'); const backupApiSubdir = path.join(folderName, relApiDir); if (!fs.existsSync(backupApiSubdir)) { diff --git a/scripts/deploy-install.sh b/scripts/deploy-install.sh index 6364f8fb52..5f0b31d9d0 100755 --- a/scripts/deploy-install.sh +++ b/scripts/deploy-install.sh @@ -16,13 +16,5 @@ else travis_fold end install.ng2 fi -if [[ -e "$NG2DART_REPO" ]]; then - echo Angular2 Dart repo is already present at: $NG2DART_REPO -elif [[ -n "$TRAVIS" ]]; then - ./scripts/install-ng2dart.sh -# else -# echo WARNING: no Angular2 Dart repo found at: $NG2DART_REPO -fi - echo INSTALLED repos: ls -ld ../a* diff --git a/scripts/install-dart-sdk.sh b/scripts/install-dart-sdk.sh deleted file mode 100755 index 5eb4e7e7e1..0000000000 --- a/scripts/install-dart-sdk.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash - -set -e -o pipefail - -[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh - -if [[ -z "$(type -t dart)" ]]; then - travis_fold start install.dart - echo INSTALLING Dart SDK and Dartium ... - - # URLs for sdk and dartium: - # https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip - # https://storage.googleapis.com/dart-archive/channels/stable/release/latest/dartium/dartium-macos-x64-release.zip - - DART_ARCHIVE=https://storage.googleapis.com/dart-archive/channels - VERS=stable/release/latest - # VERS=stable/release/1.18.1 # If necessary, pin a specific version like this - - mkUrl() { - local dir=$1 - local pkg=$2 - local arch=$3 - local zip=$pkg-$_OS_NAME-$arch-release.zip - echo "$DART_ARCHIVE/$VERS/$dir/$zip"; - } - - getAndInstall() { - local dir=$1 - local pkg=${2:-$dir}; - local arch=${3:-x64} - local URL=$(mkUrl $dir $pkg $arch) - local exitStatus=0; - local zip=$(basename $URL) - - echo "Getting $pkg from:" - echo " $URL" - - [[ ! -d "$TMP" ]] && mkdir "$TMP" - [[ ! -d "$PKG" ]] && mkdir "$PKG" - - curl $URL > "$TMP/$zip" # 2> /dev/null - - if [[ "1000" -lt "$(wc -c $TMP/$zip | awk '{print $1}')" ]]; then - unzip "$TMP/$zip" -d "$PKG" > /dev/null - rm -f "$TMP/$zip" - # PATH is set in ./scripts/env-set.sh - else - echo FAILED to download Dart $pkg. Check URL. - exitStatus=1; - fi - } - - if getAndInstall sdk dartsdk; then - # Install Dartium - if [[ "$_OS_NAME" == "macos" ]]; then - getAndInstall dartium dartium ia32 - else - getAndInstall dartium - fi - echo - dart --version - fi - travis_fold end install.dart -else - echo Dart SDK appears to be installed: `type dart` - # PATH is set in ./scripts/env-set.sh - dart --version -fi diff --git a/scripts/install-ng2dart.sh b/scripts/install-ng2dart.sh deleted file mode 100755 index a0e0283073..0000000000 --- a/scripts/install-ng2dart.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -set -e -o pipefail - -[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh - -./scripts/install-dart-sdk.sh - -travis_fold start install.ng2dart -if [[ -z "$(type -t dart)" ]]; then - echo "No Dart SDK: aborting install of Angular2/Dart" - exit 1; -elif [[ -e "$NG2DART_REPO" ]]; then - echo Angular2/Dart found at: $NG2DART_REPO -else - echo GETTING Angular2/Dart from pub package ... - set -x - # Get ng2dart via pub on ng.io pubspec.yaml - pub upgrade > /dev/null - - NG2DART_PUB=`find ~/.pub-cache/ -type d -name "angular2*" | xargs ls -dtr | tail -1` - - cp -r $NG2DART_PUB $NG2DART_REPO -fi - -# Run pub on ng2dart -(cd $NG2DART_REPO && pub get) -set +x -travis_fold end install.ng2dart