From e8bb890c82905a1b060a7297ddef18071eb56820 Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Tue, 31 Mar 2015 15:19:40 +0100 Subject: [PATCH] removed next-mustard dependency --- bower.json | 3 +-- layouts/vanilla.html | 11 ++++++++--- layouts/wrapper.html | 13 +++++++++++-- test/app.test.js | 8 ++++---- .../next-js-setup/templates/ctm.html | 1 + .../next-js-setup/templates/script-loader.html | 1 + .../bower_components/next-mustard/addscripts.html | 1 - .../app/bower_components/next-mustard/check.html | 1 - 8 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 test/fixtures/app/bower_components/next-js-setup/templates/ctm.html create mode 100644 test/fixtures/app/bower_components/next-js-setup/templates/script-loader.html delete mode 100644 test/fixtures/app/bower_components/next-mustard/addscripts.html delete mode 100644 test/fixtures/app/bower_components/next-mustard/check.html diff --git a/bower.json b/bower.json index 3a1033ca..4c46077f 100644 --- a/bower.json +++ b/bower.json @@ -1,8 +1,7 @@ { "name": "next-express", "dependencies": { - "next-mustard": "^3.0.0", - "next-js-setup": "^v1.3.0", + "next-js-setup": "^v1.9.0", "next-header": "*", "next-footer": "^1.0.0", "next-welcome": "^1.0.0" diff --git a/layouts/vanilla.html b/layouts/vanilla.html index f5f9084a..f6c4044f 100644 --- a/layouts/vanilla.html +++ b/layouts/vanilla.html @@ -6,12 +6,17 @@ - {{#title}}{{{this}}} — {{/title}}Financial Times - {{>next-mustard/check}} + {{#title}}{{{this}}} — {{/title}}FT.com + {{>next-js-setup/templates/ctm}} {{{body}}} - {{>next-mustard/addscripts}} + {{#if @root.flags.javascript.isSwitchedOn }} + + {{/if}} + {{>next-js-setup/templates/script-loader}} {{>next-js-setup/templates/tracking}} diff --git a/layouts/wrapper.html b/layouts/wrapper.html index 2edbd8ee..aa704ce5 100644 --- a/layouts/wrapper.html +++ b/layouts/wrapper.html @@ -7,7 +7,7 @@ {{#title}}{{{this}}} — {{/title}}FT.com - {{>next-mustard/check}} + {{>next-js-setup/templates/ctm}} {{>next-header/templates/main}} @@ -23,7 +23,16 @@ window.nextFeatureFlags = {{{json @root.flags}}}; {{/if}} - {{>next-mustard/addscripts}} + {{>next-js-setup/templates/script-loader}} {{>next-js-setup/templates/tracking}} + + + + + + {{{body}}} + + + diff --git a/test/app.test.js b/test/app.test.js index e32d5526..c454eebe 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -139,7 +139,7 @@ describe('simple app', function() { request(app) .get('/wrapped') // doctype ... header ... script loader ... end page - .expect(200, /^(.|[\r\n])*header(.|[\r\n])*addscripts(.|[\r\n])*<\/html>/, done); + .expect(200, /^(.|[\r\n])*header(.|[\r\n])*script-loader(.|[\r\n])*<\/html>/, done); }); it('wrapper should expose app name to client side code', function(done) { @@ -151,14 +151,14 @@ describe('simple app', function() { it('wrapper should expose offy flags to client side code', function(done) { request(app) .get('/wrapped') - .expect(200, /(.|[\r\n])*([^a-z])*

(.|[\r\n])*addscripts([\t]+)tracking*/, done); + .expect(200, /^(.|[\r\n])*([^a-z])*

(.|[\r\n])*script-loader([\t]+)tracking*/, done); }); it('vanilla should expose app name to client side code', function(done) { @@ -169,7 +169,7 @@ describe('simple app', function() { it('vanilla should expose offy flags to client side code', function(done) { request(app) .get('/wrapped') - .expect(200, /