diff --git a/.hgignore b/.hgignore
index 19916357f47..619012cedad 100644
--- a/.hgignore
+++ b/.hgignore
@@ -81,3 +81,15 @@ GPATH
# Git clone directory for updating web-platform-tests
^testing/web-platform/sync/
+
+# Loop web client build/deploy dependencies
+^browser/components/loop/standalone/bower_components
+
+# Loop legal content build/deploy artifacts
+
+# XXX Once a grunt contrib-clean command has been added (bug 1066491), or
+# once legal has centralized their ToS and PP hosting infrastructure,
+# (expected Q4 2014) the legal doc build stuff for Loop can be removed,
+# including the following three lines
+^browser/components/loop/standalone/content/legal/styles/.*\.css$
+^browser/components/loop/standalone/content/legal/terms/en_US\.html$
diff --git a/browser/components/loop/standalone/.gitignore b/browser/components/loop/standalone/.gitignore
index a7605a5125a..eebe546eca5 100644
--- a/browser/components/loop/standalone/.gitignore
+++ b/browser/components/loop/standalone/.gitignore
@@ -1,5 +1,14 @@
.module-cache
node_modules
+bower_components
*.pyc
content/config.js
content/VERSION.txt
+
+# XXX Once a grunt contrib-clean command has been added (bug 1066491), or
+# once legal has centralized their ToS and PP hosting infrastructure,
+# (expected Q4 2014) the legal doc build stuff for Loop can be removed,
+# including the following three lines:
+content/legal/styles/*.css
+content/legal/terms/*.html
+content/legal/terms/!index.html
diff --git a/browser/components/loop/standalone/Gruntfile.js b/browser/components/loop/standalone/Gruntfile.js
new file mode 100644
index 00000000000..ae7321d031d
--- /dev/null
+++ b/browser/components/loop/standalone/Gruntfile.js
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+module.exports = function (grunt) {
+ 'use strict';
+
+ // show elapsed time at the end
+ require('time-grunt')(grunt);
+
+ // load all grunt tasks
+ require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
+
+ grunt.initConfig({
+ });
+
+ grunt.loadTasks('grunttasks');
+}
+;
diff --git a/browser/components/loop/standalone/Makefile b/browser/components/loop/standalone/Makefile
index eab59b2ae34..7b8f2d84c2d 100644
--- a/browser/components/loop/standalone/Makefile
+++ b/browser/components/loop/standalone/Makefile
@@ -2,15 +2,31 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+# Note that this Makefile is not invoked by the Mozilla build
+# system, which is why it can have dependencies on things the
+# build system at-large doesn't yet support.
+
+# XXX In the interest of making the build logic simpler and
+# more maintainable, we should be trying to implement new
+# functionality in Gruntfile.js rather than here.
+# Bug 1066176 tracks moving all functionality currently here
+# to the Gruntfile and getting rid of this Makefile entirely.
+
LOOP_SERVER_URL := $(shell echo $${LOOP_SERVER_URL-http://localhost:5000})
NODE_LOCAL_BIN=./node_modules/.bin
-install:
+install: npm_install tos
+
+npm_install:
@npm install
test:
@echo "Not implemented yet."
+tos:
+ @$(NODE_LOCAL_BIN)/grunt replace marked
+ @$(NODE_LOCAL_BIN)/grunt sass
+
lint:
@$(NODE_LOCAL_BIN)/jshint *.js content test
diff --git a/browser/components/loop/standalone/README.md b/browser/components/loop/standalone/README.md
index ca4b1756e14..3766fe025cc 100644
--- a/browser/components/loop/standalone/README.md
+++ b/browser/components/loop/standalone/README.md
@@ -9,8 +9,13 @@ NodeJS and npm installed.
Installation
------------
+Fetch and install/build any NPM and bower dependencies, as well as the
+localized Terms-of-Service content:
+
$ make install
+Some of the above is driven by Gruntfile.js.
+
Configuration
-------------
diff --git a/browser/components/loop/standalone/bower.json b/browser/components/loop/standalone/bower.json
new file mode 100644
index 00000000000..9a34ea77848
--- /dev/null
+++ b/browser/components/loop/standalone/bower.json
@@ -0,0 +1,7 @@
+{
+ "name": "loop-client",
+ "dependencies": {
+ "tos-pp": "https://github.com/mozilla/legal-docs.git"
+ },
+ "devDependencies": {}
+}
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.eot b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.eot
new file mode 100644
index 00000000000..04284b6f8b3
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.eot differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.svg b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.svg
new file mode 100644
index 00000000000..6ed7ff2f491
--- /dev/null
+++ b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.svg
@@ -0,0 +1,28060 @@
+
+
+
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.ttf b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.ttf
new file mode 100644
index 00000000000..dd15aa1aba3
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.ttf differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.woff b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.woff
new file mode 100644
index 00000000000..f4aacf79dac
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/clearsans-regular.woff differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.eot b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.eot
new file mode 100755
index 00000000000..b0d272fd2d6
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.eot differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.otf b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.otf
new file mode 100755
index 00000000000..7282b576179
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.otf differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.svg b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.svg
new file mode 100755
index 00000000000..37f5067db5e
--- /dev/null
+++ b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.svg
@@ -0,0 +1,9762 @@
+
+
+
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.ttf b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.ttf
new file mode 100755
index 00000000000..9dc6a161e84
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.ttf differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.woff b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.woff
new file mode 100755
index 00000000000..e6232a8bcf8
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-light.woff differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.eot b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.eot
new file mode 100755
index 00000000000..dd3123364c2
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.eot differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.otf b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.otf
new file mode 100755
index 00000000000..c5d81f8e208
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.otf differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.svg b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.svg
new file mode 100755
index 00000000000..397a7821338
--- /dev/null
+++ b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.svg
@@ -0,0 +1,9818 @@
+
+
+
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.ttf b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.ttf
new file mode 100755
index 00000000000..93561ae5a2c
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.ttf differ
diff --git a/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.woff b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.woff
new file mode 100755
index 00000000000..4a142e45fad
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/fonts/latin/firasans-regular.woff differ
diff --git a/browser/components/loop/standalone/content/legal/images/firefox.png b/browser/components/loop/standalone/content/legal/images/firefox.png
new file mode 100644
index 00000000000..3f4d8d12ad4
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/images/firefox.png differ
diff --git a/browser/components/loop/standalone/content/legal/images/mozilla.png b/browser/components/loop/standalone/content/legal/images/mozilla.png
new file mode 100644
index 00000000000..f2c348d1356
Binary files /dev/null and b/browser/components/loop/standalone/content/legal/images/mozilla.png differ
diff --git a/browser/components/loop/standalone/content/legal/js/loader.js b/browser/components/loop/standalone/content/legal/js/loader.js
new file mode 100644
index 00000000000..284331cf295
--- /dev/null
+++ b/browser/components/loop/standalone/content/legal/js/loader.js
@@ -0,0 +1,33 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+// Set the current translation content
+function setBody(data) {
+ $("#legal-copy").html(data);
+}
+
+function normalizeLocale(lang) {
+ return lang.replace(/-/g, "_");
+}
+
+$(document).ready(function() {
+ // Get the favorite language
+ var lang, defaultLang = "en-US";
+ $.get(loop.config.serverUrl, function(data) {
+ if (data.hasOwnProperty("i18n")) {
+ lang = normalizeLocale(data.i18n.lang);
+ defaultLang = normalizeLocale(data.i18n.defaultLang);
+ }
+ if (lang === undefined) {
+ lang = normalizeLocale(defaultLang);
+ }
+
+ $.get(lang + ".html")
+ .done(setBody)
+ .fail(function() {
+ $.get(defaultLang + ".html")
+ .done(setBody);
+ });
+ });
+});
diff --git a/browser/components/loop/standalone/content/legal/styles/main.scss b/browser/components/loop/standalone/content/legal/styles/main.scss
new file mode 100644
index 00000000000..6403f5be61d
--- /dev/null
+++ b/browser/components/loop/standalone/content/legal/styles/main.scss
@@ -0,0 +1,235 @@
+@font-face { font-family: 'Clear Sans'; font-style: normal; font-weight: 400; src: local(Clear Sans), local(ClearSans), url(/legal/fonts/latin/clearsans-regular.eot?#iefix) format(embedded-opentype), url(/legal/fonts/latin/clearsans-regular.woff) format(woff), url(/legal/fonts/latin/clearsans-regular.ttf) format(truetype), url(/legal/fonts/latin/clearsans-regular.svg#clearsans-regular) format(svg); }
+
+@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; src: local(Fira Sans), local(FiraSans-Regular), url(/legal/fonts/latin/firasans-regular.eot?#iefix) format(embedded-opentype), url(/legal/fonts/latin/firasans-regular.woff) format(woff), url(/legal/fonts/latin/firasans-regular.ttf) format(truetype), url(/legal/fonts/latin/firasans-regular.svg#firasans-regular) format(svg); }
+
+@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 300; src: local(Fira Sans Light), local(FiraSans-Light), url(/legal/fonts/latin/firasans-light.eot?#iefix) format(embedded-opentype), url(/legal/fonts/latin/firasans-light.woff) format(woff), url(/legal/fonts/latin/firasans-light.ttf) format(truetype), url(/legal/fonts/latin/firasans-light.svg#firasans-light) format(svg); }
+
+@media (min-width: 321px) and (max-width: 480px) {
+ #about-mozilla {
+ display: none;
+ }
+
+ #main-content {
+ -webkit-box-shadow: rgb(138, 155, 168) 0px 1px 5px;
+ border-radius: 2px 2px;
+ box-shadow: rgb(138, 155, 168) 0px 1px 5px;
+ margin-top: 0px;
+ max-width: 360px;
+ min-height: 300px;
+ min-width: 300px;
+ padding-bottom: 10px;
+ padding-left: 20px;
+ padding-right: 20px;
+ padding-top: 45px;
+ position: relative;
+ top: -28px;
+ width: 94%;
+ }
+
+ .static {
+ -webkit-background-size: 48px 51px;
+ background-position-x: 50%;
+ background-position-y: 0%;
+ background-repeat: no-repeat;
+ background-size: 48px 51px;
+ height: 51px;
+ margin-top: 10px;
+ top: 0px;
+ width: 100%;
+ }
+
+ body {
+ padding-bottom: 20px;
+ }
+
+ h1 {
+ font-size: 20px;
+ margin-bottom: 20px;
+ }
+
+ html {
+ background-color: rgb(242, 242, 242);
+ }
+
+}
+
+@media (min-width: 481px) {
+ #main-content {
+ -webkit-box-shadow: rgb(138, 155, 168) 0px 1px 5px;
+ border-radius: 4px 4px;
+ box-shadow: rgb(138, 155, 168) 0px 1px 5px;
+ margin-top: -5px;
+ min-height: 450px;
+ padding-bottom: 40px;
+ padding-left: 40px;
+ padding-right: 40px;
+ padding-top: 60px;
+ width: 420px;
+ }
+
+ .static {
+ -webkit-background-size: 80px 85px;
+ background-size: 80px 85px;
+ height: 85px;
+ margin-top: 0px;
+ top: 40px;
+ width: 80px;
+ }
+
+ body {
+ padding-bottom: 20px;
+ }
+
+ h1 {
+ font-size: 24px;
+ margin-bottom: 32px;
+ }
+
+ html {
+ background-color: rgb(242, 242, 242);
+ }
+
+}
+
+@media (max-width: 319px) {
+ #about-mozilla {
+ display: none;
+ }
+
+ #main-content {
+ -webkit-box-shadow: none;
+ background-position-x: 0px;
+ background-position-y: 0px;
+ border-radius: 2px 2px;
+ box-shadow: none;
+ margin-top: 10px;
+ max-width: 360px;
+ min-height: 0px;
+ min-width: 250px;
+ padding: 0px;
+ position: relative;
+ top: 0px;
+ width: 250px;
+ }
+
+ .static {
+ -webkit-background-size: 48px 51px;
+ background-position-x: 50%;
+ background-position-y: 0%;
+ background-repeat: no-repeat;
+ background-size: 48px 51px;
+ display: none;
+ height: 51px;
+ margin-top: 10px;
+ top: 0px;
+ width: 100%;
+ }
+
+ body {
+ margin: 0px;
+ padding: 0px;
+ }
+
+ h1 {
+ font-size: 18px;
+ margin-bottom: 10px;
+ }
+
+ html {
+ background-color: rgb(255, 255, 255);
+ }
+
+}
+
+#about-mozilla {
+ -webkit-background-size: 69px 19px;
+ -webkit-transition-duration: 150ms;
+ -webkit-transition-property: opacity;
+ background-image: url(/legal/images/mozilla.png);
+ background-size: 69px 19px;
+ height: 19px;
+ opacity: 0.5;
+ position: absolute;
+ right: 12px;
+ top: 12px;
+ width: 69px;
+}
+
+#main-content {
+ background-color: rgb(255, 255, 255);
+ margin-bottom: 0px;
+ margin-left: auto;
+ margin-right: auto;
+ text-align: center;
+}
+
+* {
+ box-sizing: border-box;
+}
+
+.static {
+ background-image: url(/legal/images/firefox.png);
+ margin-bottom: 0px;
+ margin-left: auto;
+ margin-right: auto;
+ opacity: 1;
+ background-size: 102px 96px;
+ height: 102px;
+ width: 96px;
+ position: relative;
+ position: relative;
+ z-index: 999;
+}
+
+a {
+ color: rgb(0, 149, 221);
+ cursor: pointer;
+}
+
+article {
+ text-align: left;
+}
+
+body {
+ color: rgb(66, 79, 89);
+ font-family: 'Clear Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ font-size: 14px;
+}
+
+h1, h2 {
+ font-family: 'Fira Sans', Helvetica, Arial, sans-serif;
+ font-weight: 200;
+ line-height: 1em;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 0px;
+}
+
+h3 {
+ font-family: 'Fira Sans', Helvetica, Arial, sans-serif;
+ font-size: 12px;
+ line-height: 1em;
+ margin: 0px;
+ padding-bottom: 10px;
+ padding-left: 0px;
+ padding-right: 0px;
+ padding-top: 5px;
+}
+
+html {
+ height: 100%;
+}
+
+ol {
+ margin-left: 0px;
+ padding-left: 20px;
+}
+
+p {
+ font-size: 14px;
+}
+
+ul {
+ margin-left: 0px;
+ padding-left: 20px;
+}
diff --git a/browser/components/loop/standalone/content/legal/terms/index.html b/browser/components/loop/standalone/content/legal/terms/index.html
new file mode 100644
index 00000000000..b908acfa7b8
--- /dev/null
+++ b/browser/components/loop/standalone/content/legal/terms/index.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+ WebRTC: Terms of Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/browser/components/loop/standalone/grunttasks/marked.js b/browser/components/loop/standalone/grunttasks/marked.js
new file mode 100644
index 00000000000..727ca1e6b5d
--- /dev/null
+++ b/browser/components/loop/standalone/grunttasks/marked.js
@@ -0,0 +1,36 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+var path = require('path');
+var i18n = require('i18n-abide');
+
+module.exports = function (grunt) {
+ 'use strict';
+
+ // convert localized TOS agreement from markdown to html partials.
+
+ function rename(destPath, srcFile) {
+ // Normalize the filenames to use the locale name.
+ var lang = srcFile.replace('.md', '');
+ return path.join(destPath, i18n.localeFrom(lang) + '.html');
+ }
+
+ grunt.config('marked', {
+ options: {
+ sanitize: false,
+ gfm: true
+ },
+ tos: {
+ files: [
+ {
+ expand: true,
+ cwd: '<%= project_vars.tos_md_src %>',
+ src: ['**/*.md'],
+ dest: '<%= project_vars.tos_html_dest %>',
+ rename: rename
+ }
+ ]
+ }
+ });
+};
diff --git a/browser/components/loop/standalone/grunttasks/project_vars.js b/browser/components/loop/standalone/grunttasks/project_vars.js
new file mode 100644
index 00000000000..b9a7c00c129
--- /dev/null
+++ b/browser/components/loop/standalone/grunttasks/project_vars.js
@@ -0,0 +1,18 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+module.exports = function (grunt) {
+ 'use strict';
+
+ var TEMPLATE_ROOT = 'content/legal';
+ var TOS_PP_REPO_ROOT = 'bower_components/tos-pp';
+
+ grunt.config('project_vars', {
+ app: "content",
+ // Translated TOS/PP agreements.
+ tos_pp_repo_dest: TOS_PP_REPO_ROOT,
+ tos_md_src: TOS_PP_REPO_ROOT + '/WebRTC_ToS/',
+ tos_html_dest: TEMPLATE_ROOT + '/terms'
+ });
+};
diff --git a/browser/components/loop/standalone/grunttasks/replace.js b/browser/components/loop/standalone/grunttasks/replace.js
new file mode 100644
index 00000000000..4d426204bcd
--- /dev/null
+++ b/browser/components/loop/standalone/grunttasks/replace.js
@@ -0,0 +1,37 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+module.exports = function (grunt) {
+ 'use strict';
+
+ grunt.config('replace', {
+ tos: {
+ src: [
+ '<%= project_vars.tos_md_src %>/*.md'
+ ],
+ overwrite: true,
+ replacements: [{
+ // remove tags not handle by the markdown-to-HTML conversation
+ from: /{:\s.*?\s}/g,
+ to: ''
+ }, {
+ // remove unhandled comments
+ from: /^#\s.*?\n$/m,
+ to: ''
+ }, {
+ // fix "smart quotes"
+ from: /(“|”)/g,
+ to: """
+ }, {
+ // fix "smart quotes"
+ from: /’/g,
+ to: "'"
+ }, {
+ from: /–/g,
+ to: "—"
+ }
+ ]
+ }
+ });
+};
diff --git a/browser/components/loop/standalone/grunttasks/sass.js b/browser/components/loop/standalone/grunttasks/sass.js
new file mode 100644
index 00000000000..1d8b61ba488
--- /dev/null
+++ b/browser/components/loop/standalone/grunttasks/sass.js
@@ -0,0 +1,16 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+module.exports = function (grunt) {
+ 'use strict';
+
+ grunt.config('sass', {
+ styles: {
+ files: {
+ '<%= project_vars.app %>/legal/styles/main.css':
+ '<%= project_vars.app %>/legal/styles/main.scss'
+ }
+ }
+ });
+};
diff --git a/browser/components/loop/standalone/package.json b/browser/components/loop/standalone/package.json
index 364ffab9549..dd461a05dad 100644
--- a/browser/components/loop/standalone/package.json
+++ b/browser/components/loop/standalone/package.json
@@ -1,19 +1,33 @@
{
- "name": "Loop-client",
- "description": "Video conferencing app powered by WebRTC.",
+ "name": "loop-client",
+ "description": "Video conferencing app powered by WebRTC",
"version": "0.0.1",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:mozilla/loop-client.git"
+ },
"engines": {
"node": "0.10.x",
- "npm":"1.3.x"
- },
- "dependencies": {
- "express": "3.x"
+ "npm": "1.3.x"
},
+ "dependencies": {},
"devDependencies": {
- "jshint": "2.x"
+ "bower": "1.3.9",
+ "express": "3.x",
+ "grunt": "0.4.5",
+ "grunt-cli": "0.1.13",
+ "grunt-marked": "0.1.1",
+ "grunt-sass": "0.14.1",
+ "grunt-text-replace": "0.3.12",
+ "i18n-abide": "0.0.22",
+ "jshint": "2.x",
+ "load-grunt-tasks": "0.6.0",
+ "time-grunt": "0.4.0"
},
"scripts": {
"test": "make test",
- "start": "make runserver"
- }
+ "start": "make runserver",
+ "prepublish": "bower install --config.interactive=false -s"
+ },
+ "license": "MPL-2.0"
}
diff --git a/browser/components/loop/standalone/server.js b/browser/components/loop/standalone/server.js
index d37fe4f9bd9..ba8fdfb93dc 100644
--- a/browser/components/loop/standalone/server.js
+++ b/browser/components/loop/standalone/server.js
@@ -8,20 +8,29 @@ var app = express();
var port = process.env.PORT || 3000;
var loopServerPort = process.env.LOOP_SERVER_PORT || 5000;
-app.get('/content/config.js', function (req, res) {
+function getConfigFile(req, res) {
"use strict";
res.set('Content-Type', 'text/javascript');
res.send(
"var loop = loop || {};" +
"loop.config = loop.config || {};" +
- "loop.config.serverUrl = 'http://localhost:" + loopServerPort + "';"
+ "loop.config.serverUrl = 'http://localhost:" + loopServerPort + "';" +
+ "loop.config.pendingCallTimeout = 20000;"
);
+}
-});
+app.get('/content/config.js', getConfigFile);
// This lets /test/ be mapped to the right place for running tests
app.use('/', express.static(__dirname + '/../'));
+
+// Magic so that the legal content works both in the standalone server
+// and as static content in the loop-client repo
+app.use('/', express.static(__dirname + '/content/'));
+app.use('/shared', express.static(__dirname + '/../content/shared/'));
+app.get('/config.js', getConfigFile);
+
// This lets /content/ be mapped right for the static contents.
app.use('/', express.static(__dirname + '/'));
// This lets standalone components load images into the UI showcase