From 4fe67f9b969ae2a483699642eece01d90bf9f020 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 25 Jan 2017 15:16:50 -0500 Subject: [PATCH] Update PMO snippets for production steal This updates the PMO snippets to use `steal.production.js` as the production loader. --- docs/guides/guide.md | 5 --- guides/guide/steps/16-cdn/index.stache | 43 ------------------- guides/guide/steps/7-navigate/index.stache | 2 +- guides/guide/test.js | 18 +------- .../steps/additional/index.stache | 3 +- .../steps/loading-assets/index.stache | 5 +-- .../steps/switch-between/index.stache | 3 +- 7 files changed, 5 insertions(+), 74 deletions(-) delete mode 100644 guides/guide/steps/16-cdn/index.stache diff --git a/docs/guides/guide.md b/docs/guides/guide.md index 99f1b77a0..321cee15d 100644 --- a/docs/guides/guide.md +++ b/docs/guides/guide.md @@ -346,11 +346,6 @@ When prompted, enter the name of the application created when you set up the Fir node_modules/.bin/firebase login ``` -Update your index.stache to change the production steal path: - -@sourceref guides/guide/steps/16-cdn/index.stache -@highlight 36 - Then we can deploy the application by running: ``` diff --git a/guides/guide/steps/16-cdn/index.stache b/guides/guide/steps/16-cdn/index.stache deleted file mode 100644 index 691085ef6..000000000 --- a/guides/guide/steps/16-cdn/index.stache +++ /dev/null @@ -1,43 +0,0 @@ - - - {{title}} - - - - - - -
-
-
- {{#eq page 'chat'}} - - {{#if isPending}} - Loading... - {{else}} - - {{/if}} - - {{else}} - - {{#if isPending}} - Loading... - {{else}} - - {{/if}} - - {{/eq}} -
-
-
- - {{#switch env.NODE_ENV}} - {{#case "production"}} - - {{/case}} - {{#default}} - - {{/default}} - {{/switch}} - - diff --git a/guides/guide/steps/7-navigate/index.stache b/guides/guide/steps/7-navigate/index.stache index 1262bd7f4..691085ef6 100644 --- a/guides/guide/steps/7-navigate/index.stache +++ b/guides/guide/steps/7-navigate/index.stache @@ -33,7 +33,7 @@ {{#switch env.NODE_ENV}} {{#case "production"}} - + {{/case}} {{#default}} diff --git a/guides/guide/test.js b/guides/guide/test.js index ad1cc93d4..8bdc0daa3 100644 --- a/guides/guide/test.js +++ b/guides/guide/test.js @@ -287,23 +287,7 @@ guide.step("Stop production mode", function(){ guide.stepIf("Deploy to CDN", function() { return !!guide.options.app; }, function(){ - var appName = guide.options.app; - - var setConfig = function(pkg){ - pkg.donejs.deploy.services.production.config.firebase = appName; - if(!pkg.system.envs) { - pkg.system.envs = {}; - } - - if(!pkg.system.envs["server-production"]) { - pkg.system.envs["server-production"] = {}; - } - pkg.system.envs["server-production"].baseURL = "https://" + - appName + ".firebaseapp.com/"; - return pkg; - }; - return guide.replaceJson("package.json", - join(__dirname, "steps", "16-cdn", "deploy.json"), setConfig) + return guide.executeCommand("donejs", ["add", "firebase"]) .then(function(){ return guide.executeCommand("donejs", ["build"]); }) diff --git a/guides/place-my-order/steps/additional/index.stache b/guides/place-my-order/steps/additional/index.stache index b3d3bdc52..0c19186e0 100644 --- a/guides/place-my-order/steps/additional/index.stache +++ b/guides/place-my-order/steps/additional/index.stache @@ -54,8 +54,7 @@ {{#switch env.NODE_ENV}} {{#case "production"}} {{/case}} {{#default}} diff --git a/guides/place-my-order/steps/loading-assets/index.stache b/guides/place-my-order/steps/loading-assets/index.stache index 6b1455d21..f8f519185 100644 --- a/guides/place-my-order/steps/loading-assets/index.stache +++ b/guides/place-my-order/steps/loading-assets/index.stache @@ -12,10 +12,7 @@ {{#switch env.NODE_ENV}} {{#case "production"}} - + {{/case}} {{#default}} diff --git a/guides/place-my-order/steps/switch-between/index.stache b/guides/place-my-order/steps/switch-between/index.stache index a06b145fd..8df00cbf0 100644 --- a/guides/place-my-order/steps/switch-between/index.stache +++ b/guides/place-my-order/steps/switch-between/index.stache @@ -36,8 +36,7 @@ {{#switch env.NODE_ENV}} {{#case "production"}} {{/case}} {{#default}}