From 1973fc904375e85f17fd5bcb2a4d2b42ce6d7d7c Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Mon, 12 Feb 2018 21:55:41 +0200 Subject: [PATCH] chore(docs.angular.js): do not break when deploying Follow-up to #16451. --- lib/grunt/utils.js | 4 ++-- scripts/docs.angularjs.org-firebase/firebase.json | 5 ----- scripts/docs.angularjs.org-firebase/functions/package.json | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js index 64ddc6f185ec..73e8b1efc790 100644 --- a/lib/grunt/utils.js +++ b/lib/grunt/utils.js @@ -302,8 +302,8 @@ module.exports = { var fileName = docsScriptFolder + '/firebase.json'; var json = grunt.file.readJSON(fileName); - json.hosting.public = 'deploy/docs'; - json.functions.source = docsScriptFolder + '/functions'; + (json.hosting || (json.hosting = {})).public = 'deploy/docs'; + (json.functions || (json.functions = {})).source = docsScriptFolder + '/functions'; grunt.file.write('firebase.json', JSON.stringify(json)); } diff --git a/scripts/docs.angularjs.org-firebase/firebase.json b/scripts/docs.angularjs.org-firebase/firebase.json index 880a5eca86de..bf080d386fd7 100644 --- a/scripts/docs.angularjs.org-firebase/firebase.json +++ b/scripts/docs.angularjs.org-firebase/firebase.json @@ -27,10 +27,5 @@ "function": "sendFile" } ] - }, - "functions": { - "predeploy": [ - "npm --prefix $RESOURCE_DIR run lint" - ] } } diff --git a/scripts/docs.angularjs.org-firebase/functions/package.json b/scripts/docs.angularjs.org-firebase/functions/package.json index fdfb9cf8b46d..381fbc501096 100644 --- a/scripts/docs.angularjs.org-firebase/functions/package.json +++ b/scripts/docs.angularjs.org-firebase/functions/package.json @@ -2,7 +2,7 @@ "name": "functions", "description": "Cloud Functions for Firebase", "scripts": { - "lint": "./node_modules/.bin/eslint .", + "lint": "eslint .", "serve": "firebase serve --only functions", "shell": "firebase experimental:functions:shell", "start": "npm run shell",