Permalink
Browse files

preperation for conditional cssFramework inclusion in the <head>

  • Loading branch information...
1 parent 660bca5 commit 96c06a556665a5210cd8e5d4f97de2f4a78915e9 @liorkesos liorkesos committed Aug 4, 2015
View
@@ -1,6 +1,6 @@
{
"dependencies": {},
"anonymizedData": true,
- "name": "zzz",
- "id": "55b794f96068afa56306313e"
+ "name": "m5",
+ "id": "55c04e9d5ba977234597413b"
}
@@ -3,7 +3,9 @@
/*
* Defining the Package
*/
-var Module = require('meanio').Module,
+var meanio = require('meanio');
+var Module = meanio.Module,
+ config = meanio.loadConfig(),
favicon = require('serve-favicon');
var SystemPackage = new Module('system');
@@ -19,6 +21,7 @@ SystemPackage.register(function(app, auth, database, circles) {
SystemPackage.aggregateAsset('css', 'common.css');
SystemPackage.angularDependencies(['mean-factory-interceptor']);
+
// The middleware in config/express will run before this code
@@ -1,7 +1,10 @@
'use strict';
var mean = require('meanio');
-
-exports.render = function(req, res) {
- res.render('index');
-};
+module.exports = function(System){
+ return {
+ render:function(req,res){
+ res.render('index',{ locals: { config: System.config.clean }});
+ }
+ };
+}
@@ -5,7 +5,7 @@ var mean = require('meanio');
module.exports = function(System, app, auth, database) {
// Home route
- var index = require('../controllers/index');
+ var index = require('../controllers/index')(System);
app.route('/')
.get(index.render);
@@ -19,6 +19,7 @@
<meta property="og:site_name" content="MEAN - A Modern Stack">
<meta property="fb:admins" content="APP_ADMIN">
+ <!-- {{locals.config.cssFramework}} -->
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.css">
{% for file in aggregatedassets.header.css %}

0 comments on commit 96c06a5

Please sign in to comment.