Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,29 @@ module.exports = function( grunt ) {
apiPrefix: '/api',
apiBaseUrl: 'configure-to-specific-api',
proxyPort: '80',// change to 443 for https
proxyProtocol: 'http'//change to https if ssl is required
proxyProtocol: 'http', //change to https if ssl is required
livereload: true
}
},
prod: {
options: {
port: process.env.PORT || 8080,
hostname: '0.0.0.0',
base: 'build/www',
apiPrefix: '/api*'
apiPrefix: '/api*',
compress: true,
preRender: {
cache: {
size: 100
}
},
// Uncommenting will server all traffic through SPDY/HTTPS.
// ssl: {
// port: 443,
// key: 'keys/server.key',
// cert: 'keys/server.crt',
// ca: 'keys/server.csr'
// }
}
},
doc: {
Expand Down
5 changes: 3 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.3.3",
"homepage": "http://getlavaca.com",
"authors": [
"Mutual Mobile <george.henderson@mutualmobile.com>"
"Mutual Mobile <lavaca@mutualmobile.com>"
],
"license": "MIT",
"ignore": [
Expand All @@ -14,6 +14,7 @@
"tests"
],
"dependencies": {
"lavaca": "latest"
"lavaca": "latest",
"less.js": "1.7.x"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

less.js is already in lavaca core but is still on 1.4.2

I would recommend checking if its needed in both places as lavaca-starter should still have access.

}
}
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"fs-extra": "~0.6.3",
"grunt": "0.4.1",
"grunt-cli": "~0.1.9",
"express": "3.1.x",
"express": "4.1.1",
"underscore": "1.4.x",
"preprocess": "1.0.x",
"connect": "2.4.4",
Expand All @@ -30,7 +30,15 @@
"dustjs-linkedin": "2.0.2",
"dustjs-helpers": "1.1.1",
"grunt-shell": "0.3.x",
"bower": "1.2.x"
"bower": "1.2.x",
"node-phantom": "0.2.5",
"lru-cache": "2.5.0",
"body-parser": "^1.0.2",
"compression": "^1.0.2",
"errorhandler": "^1.0.1",
"vhost": "^1.0.0",
"express-livereload": "0.0.24",
"spdy": "^1.25.6"
},
"scripts": {
"postinstall": "./node_modules/bower/bin/bower install"
Expand Down
Binary file added src/www/favicon.ico
Binary file not shown.
33 changes: 18 additions & 15 deletions src/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,31 @@
<meta property="og:site_name" content="[TODO]" />
<meta property="og:locale" content="en_US" />

<link rel="icon" href="assets/img/favicon.png" />
<link rel="icon" href="/assets/img/favicon.png" />

<!--iPhone-->
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="assets/img/icon-57x57.png" />
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" href="assets/img/splash-320x460.png" />
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/assets/img/icon-57x57.png" />
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" href="/assets/img/splash-320x460.png" />
<!--iPhone (Retina)-->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/img/icon-114x114.png" />
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" href="assets/img/splash-640x920.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/img/icon-114x114.png" />
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)" href="/assets/img/splash-640x920.png" />
<!--iPhone 5-->
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" href="assets/img/splash-640x1096.png" />
<link rel="apple-touch-startup-image" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)" href="/assets/img/splash-640x1096.png" />
<!--iPad-->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/img/icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/img/icon-72x72.png" />
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" href="assets/img/splash-768x1004.png" />
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" href="assets/img/splash-1024x748.png" />
<!--iPad (Retina)-->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/img/icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/assets/img/icon-144x144.png" />
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" href="assets/img/splash-1536x2008.png" />
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" href="assets/img/splash-2048x1496.png" />


<!-- @exclude -->
<link rel="stylesheet/less" type="text/css" href="css/app/app.less" />
<link rel="stylesheet/less" type="text/css" href="/css/app/app.less" />
<!-- @endexclude -->
<!-- @echo css -->


</head>
<body>
<!--Customize this area with your application's code-->
Expand All @@ -61,22 +60,26 @@
var less=less||{};
less.env='development';
</script>
<script src="components/less.js/dist/less-1.4.2.js"></script>
<script src="/components/less.js/dist/less-1.7.0.js"></script>
<script>
//less.watch();
</script>
<!-- @endexclude -->

<!-- config -->
<!-- @exclude -->
<script type="text/x-config" data-name="local" data-src="configs/local.json" data-default></script>
<script type="text/x-config" data-name="local" data-src="/configs/local.json" data-default></script>
<!-- @endexclude -->
<!-- @echo config -->

<!-- translations -->
<script type="text/x-translation" data-name="en_US" data-src="messages/en_US.json" data-default></script>
<script type="text/x-translation" data-name="es_MX" data-src="messages/es_MX.json"></script>
<script type="text/x-translation" data-name="en_US" data-src="/messages/en_US.json" data-default></script>
<script type="text/x-translation" data-name="es_MX" data-src="/messages/es_MX.json"></script>

<!-- js -->
<!-- @exclude -->
<script data-main="js/app/boot.js" src="components/requirejs/require.js"></script>
<script data-main="/js/app/boot.js" src="/components/requirejs/require.js"></script>
<script src="http://localhost:35729/livereload.js"></script>
<!-- @endexclude -->
<!-- @echo js -->

Expand Down
6 changes: 4 additions & 2 deletions src/www/js/app/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
define(function(require) {
//require('less');
var History = require('lavaca/net/History');
var HomeController = require('./net/HomeController');
var Connectivity = require('lavaca/net/Connectivity');
Expand All @@ -11,7 +12,7 @@ define(function(require) {

// Uncomment this section to use hash-based browser history instead of HTML5 history.
// You should use hash-based history if there's no server-side component supporting your app's routes.
History.overrideStandardsMode();
// History.overrideStandardsMode();

/**
* Global application-specific object
Expand All @@ -21,7 +22,8 @@ define(function(require) {
var app = new Application(function() {
// Add routes
this.router.add({
'/': [HomeController, 'index']
'/': [HomeController, 'index'],
'/test': [HomeController, 'test']
});
// Initialize messages
Translation.init('en_US');
Expand Down
3 changes: 2 additions & 1 deletion src/www/js/app/boot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require.config({
baseUrl: 'js',
baseUrl: '/js',
paths: {
'es5-shim': '../components/es5-shim/es5-shim',
'$': '../components/jquery/jquery',
Expand All @@ -10,6 +10,7 @@ require.config({
'dust-helpers': '../components/dustjs-linkedin-helpers/dist/dust-helpers-1.1.1',
'rdust': '../components/require-dust/require-dust',
'iScroll': '../components/iscroll/dist/iscroll-lite-min',
'less': '../components/less.js/dist/less-1.7.0',
'lavaca': '../components/lavaca/src'
},
shim: {
Expand Down
7 changes: 7 additions & 0 deletions src/www/js/app/net/HomeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ define(function(require) {
return this
.view(null, HomeView, model)
.then(this.updateState(history, 'Home Page', params.url));
},
test: function(params, history) {
var model = new Model();
model.set('test', 'test');
return this
.view(null, HomeView, model)
.then(this.updateState(history, 'Home Page', params.url));
}
});

Expand Down
7 changes: 7 additions & 0 deletions src/www/js/app/ui/views/BaseView.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ define(function(require) {
var BaseView = View.extend(function() {
View.apply(this, arguments);
this.mapEvent('.cancel', 'tap', this.onTapCancel);
if (typeof window.callPhantom === 'function') {
this.on('entercomplete', function() {
window.callPhantom({
event: 'enterComplete'
});
});
}
}, {

/**
Expand Down
3 changes: 2 additions & 1 deletion src/www/js/templates/home.html
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<h1>{@msg key="headline"/}</h1>
{?test}<h1>TEST</h1>{/test}
<h1>{@msg key="headline"/}</h1>
1 change: 1 addition & 0 deletions src/www/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
User-agent: * Disallow: Sitemap: /seo
Loading