Example #1
0
Contactus.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Contactus.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Contactus.menus.add({
    title: 'Contact Us',
    link: 'CreateContactUs',
    roles: ['anonymous','all'],
    menu: 'main'
  });
  
  Contactus.aggregateAsset('css', 'contactus.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Contactus.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Contactus.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Contactus.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Contactus;
});
Example #2
0
Jenkins.register(function(app, auth, database) {

	// We enable routing. By default the Package Object is passed to the routes
	Jenkins.routes(app, auth, database);

	// We are adding a link to the main menu for all authenticated users
	Jenkins.menus.add({
		'roles' : [ 'authenticated' ],
		'title' : 'Jenkins',
		'link' : 'all jobs'
	});

	Jenkins.aggregateAsset('css', 'jenkins.css');
	
	var db = mongoose.connection;
	db.once('open', function callback () {
		var params = require('./server/controllers/params')
		params.getInitialFrequency( initCrontab );
	});

	return Jenkins;
});
Example #3
0
Comments.register(function(app, auth, database, socket) {
  var io = socket.io; // note this is the socket object set in mean-socket and not the generic socket.io
  io.sockets.on('connection', function(socket) {
    socket.on('commentCreated', function(comment) {
      socket.broadcast.emit('commentCreated', {
        comment: comment
      });
    });

    socket.on('commentDeleted', function(comment) {
      socket.broadcast.emit('commentDeleted', {
        comment: comment
      });
    });

    socket.on('commentUpdated', function(comment) {
      socket.broadcast.emit('commentUpdated', {
        comment: comment
      });
    });
  });
  Comments.routes(app, auth, database);

  Comments.aggregateAsset('js', '../lib/angular-elastic/elastic.js');
  Comments.aggregateAsset('js', '../lib/angular-emoticons/javascripts/angular-emoticons.js');
  Comments.aggregateAsset('js', '../lib/angular-timeago/src/timeAgo.js');
  Comments.aggregateAsset('js', '../lib/ment.io/dist/mentio.js');
  Comments.aggregateAsset('js', '../lib/Autolinker.js/dist/Autolinker.min.js');
  Comments.aggregateAsset('css', '../lib/ment.io/ment.io/styles.css');
  Comments.aggregateAsset('css', '../lib/angular-emoticons/stylesheets/angular-emoticons.css');
  Comments.aggregateAsset('css', '../css/comments.css');

  Comments.angularDependencies(['yaru22.angular-timeago', 'emoticonizeFilter', 'monospaced.elastic', 'mentio', 'mean.socket']);

  return Comments;
});
Example #4
0
File: app.js Project: 80xer/m
Articles.register(function(app, auth, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Articles.routes(app, auth, database);

    //We are adding a link to the main menu for all authenticated users
    Articles.menus.add({
        'roles': ['authenticated'],
        'title': 'Articles',
        'link': 'all articles'
    });
    Articles.menus.add({
        'roles': ['authenticated'],
        'title': 'Create New Article',
        'link': 'create article'
    });

    /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Articles.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Articles.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settigns
    Articles.settings(function (err, settings) {
      //you now have the settings object
    });
    */
    Articles.aggregateAsset('css', 'articles.css');

    return Articles;
});
Example #5
0
System.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  System.routes(app, auth, database);

  System.aggregateAsset('css', 'common.css');

  // The middleware in config/express will run before this code

  //Static directory for error pages
  app.use('/errors', express.static(__dirname + '/public/views/errors'));

  // Set views path, template engine and default layout
  app.set('views', __dirname + '/server/views');

  // Setting the favicon and static folder
  app.use(favicon(__dirname + '/public/assets/img/favicon.ico'));

  // Adding robots and humans txt
  app.use(express.static(__dirname + '/public/assets/static'));

  return System;
});
Example #6
0
Players.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Players.routes(app, auth, database);

  Players.menus.add({
    title: 'Players',
    link: 'players page',
    menu: 'main'
  });
  
  Players.aggregateAsset('css', 'players.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Players.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Players.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Players.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Players;
});
Example #7
0
Articles.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Articles.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  /*
  Articles.menus.add({
    'roles': ['authenticated'],
    'title': 'Articles',
    'link': ''
  });*/
  //Articles.aggregateAsset('js','/packages/system/public/services/menus.js', {group:'footer', absolute:true, weight:-9999});
  //Articles.aggregateAsset('js', 'test.js', {group: 'footer', weight: -1});

  /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Articles.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Articles.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settings
    Articles.settings(function (err, settings) {
      //you now have the settings object
    });
    */
  Articles.aggregateAsset('css', 'articles.css');

  return Articles;
});
Example #8
0
General.register(function(app, auth, database, passport) {

  //We enable routing. By default the Package Object is passed to the routes
  General.routes(app, auth, database, passport);

  //We are adding a link to the main menu for all authenticated users
  General.menus.add({
    title: 'general example page',
    link: 'general example page',
    roles: ['authenticated'],
    menu: 'main'
  });
  
  General.aggregateAsset('css', 'general.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    General.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    General.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    General.settings(function(err, settings) {
        //you now have the settings object
    });
    */

	//class someClass {
	//	constructor(name, age) {
	//		this.name = name;
	//		this.age = age;
	//	}
	//
	//	sayName() {
	//		console.log('some class ' + this.name);
	//	}
	//}
	//
	//class Child extends someClass {
	//	constructor(name, age) {
	//		super(name, age);
	//	}
	//
	//	// Override the someClass method above
	//	sayName() {
	//		// This will call someClass.sayName() triggering the old alert
	//		// Which will just display our name
	//		super();
	//
	//		// This will trigger the new alert which has labels and our age
	//		console.log('Name:' + this.name + ' Age:' + this.age);
	//	}
	//}
	//
	//var myChild = new Child('dwayne', 27);
	//myChild.sayName();

  return General;
});
Example #9
0
File: app.js Project: jithu21/acme
Analytics.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Analytics.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Analytics.menus.add({
    title: 'Analytics',
    link: 'Analytics',
    roles: ['authenticated'],
    menu: 'main'
  });
  Analytics.menus.add({
    title: 'Online',
    link: 'Online',
    roles: ['authenticated']
  });
  Analytics.menus.add({
    title: 'Trending Product',
    link: 'Trending Product',
    roles: ['authenticated']
  });
  Analytics.menus.add({
    title: 'Same Product',
    link: 'Same Product',
    roles: ['authenticated']
  });
  Analytics.menus.add({
    title: 'Active Cart',
    link: 'Active Cart',
    roles: ['authenticated']
  });
  
  Analytics.aggregateAsset('css', 'analytics.css');
  Analytics.aggregateAsset('css', 'AdminLTE.css');
  Analytics.aggregateAsset('css', 'pivot.css');

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Analytics.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Analytics.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Analytics.settings(function(err, settings) {
        //you now have the settings object
    });
    */

  return Analytics;
});
Transparency.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Transparency.routes(app, auth, database);

  var icons = 'transparency/assets/img/icons/';

  //We are adding a link to the main menu for all authenticated users

  Transparency.menus.add({
    title: 'UPLOAD',
    link: 'add_report',
    roles: ['admin'],
    menu: 'admin',
    icon: icons + 'hard-drive-upload.png'
  });
  //Menu item for address-upload
  Transparency.menus.add({
    title: 'ORGANISATIONS',
    link: 'add_organisation',
    roles: ['admin'],
    menu: 'admin',
    icon: icons + 'hard-drive-upload.png'
  });
  //Menu item for address-upload
  Transparency.menus.add({
    title: 'ZIP',
    link: 'add_zipCode',
    roles: ['admin'],
    menu: 'admin',
    icon: icons + 'hard-drive-upload.png'
  });
  Transparency.menus.add({
    title: 'Overview',
    link: 'overview',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });
  Transparency.menus.add({
    title: 'Top Player',
    link: 'top',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });
  Transparency.menus.add({
    title: 'Money Flow',
    link: 'showflow',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });
  Transparency.menus.add({
    title: 'Organisations',
    link: 'listOrgs',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });

  Transparency.menus.add({
    title: 'Media',
    link: 'listMedia',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });
  Transparency.menus.add({
    title: 'Events',
    link: 'events',
    roles: ['can manage events'],
    menu: 'main'
  });
  Transparency.menus.add({
    title: 'Impress',
    link: 'impress',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });
  Transparency.menus.add({
    title: 'Search',
    link: 'search',
    roles: ['authenticated', 'anonymous'],
    menu: 'main'
  });


  Transparency.aggregateAsset('css', 'transparency.css');
  Transparency.aggregateAsset('css', '../lib/datatables/media/css/jquery.dataTables.css');
  Transparency.aggregateAsset('css', '../lib/nvd3/build/nv.d3.css');
  Transparency.aggregateAsset('css', '../lib/angularjs-slider/dist/rzslider.css',{weight:-2});
  Transparency.aggregateAsset('css', '../lib/ng-tags-input/ng-tags-input.min.css', {weight:-5})
  Transparency.aggregateAsset('css', '../lib/ng-tags-input/ng-tags-input.bootstrap.min.css', {weight:-4});
  Transparency.aggregateAsset('js', '../lib/ng-file-upload/ng-file-upload.js',{weight:-5});
  Transparency.aggregateAsset('js', '../lib/d3/d3.js',{weight:-4});
  Transparency.aggregateAsset('js', '../lib/nvd3/build/nv.d3.js',{weight:-3});
  Transparency.aggregateAsset('js', '../lib/datatables/media/js/jquery.dataTables.js',{weight:-3});
  Transparency.aggregateAsset('js', '../lib/d3-plugins-sankey/sankey.js',{weight:-2});
  Transparency.aggregateAsset('js', '../lib/angular-datatables/dist/angular-datatables.js',{weight:-2});
  Transparency.aggregateAsset('js', '../lib/angularjs-slider/dist/rzslider.js',{weight:-2});
  Transparency.aggregateAsset('js', '../lib/angular-datatables/dist/plugins/buttons/angular-datatables.buttons.js',{weight:-2});
  Transparency.aggregateAsset('js', '../lib/angular-nvd3/dist/angular-nvd3.js',{weight:-1});
  Transparency.aggregateAsset('js', '../lib/ng-tags-input/ng-tags-input.min.js', {weight:-6});

  /**
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Transparency.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Transparency.settings({
        'anotherSettings': 'some value'
    });

    // Get settings. Retrieves latest saved settigns
    Transparency.settings(function(err, settings) {
        //you now have the settings object
    });
    */
  //Transparency.angularDependencies(['angularFileUpload','datatables','gettext']);
  Transparency.angularDependencies(['gettext','ngFileUpload','nvd3','datatables','ui.bootstrap','datatables.buttons','rzModule','ngTagsInput']);
  return Transparency;
});
Example #11
0
  Gmap.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Gmap.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Gmap.menus.add({
    title: 'gmap example page',
    link: 'gmap example page',
    roles: ['authenticated'],
    menu: 'main'
  });



  Gmap.angularDependencies(['google-maps']);

  // Aggregate css
  Gmap.aggregateAsset('css', 'gmap.css');

  
  /*
  Gmap.aggregateAsset('js', '/packages/map/public/assets/lib/lodash/dist/lodash.min.js', {
        absolute: true,
        weight:1   , // We want the googleapis to be loaded before
        global: true
    });
  
  Gmap.aggregateAsset('js', '/gmap/assets/lib/googleapis/maps.js', {
        absolute: true,
        global: true
    });

  // Satisfy dependencies
  
  Gmap.aggregateAsset('js', '/gmap/assets/lib/angular-google-maps/dist/angular-google-maps.min.js', {
        absolute: true,
        group:
        global: true
    });
*/
/*
  Gmap.aggregateAsset('js', 'googleapis/maps.js',{
    global: true,
    weight: 1,
    group: 'header'
  });
*/
  Gmap.aggregateAsset('js', 'googleapis/places.js',{
    global: true,
    weight: 2,
    group: 'header'
  });

  Gmap.aggregateAsset('js', '../lib/angular-google-maps/dist/angular-google-maps.min.js',{
    weight: 4,
    absolute: false
  });
  
  Gmap.aggregateAsset('js', '../lib/lodash/dist/lodash.min.js',{
    weight: 3,
    global: true,
    absolute: false
  });

  /*

  Gmap.aggregateAsset('js', '../lib/lodash/dist/lodash.min.js', {
        absolute: false,
        weight:1   , // We want the googleapis to be loaded before
        global: true
    });
*/


  return Gmap;
});
Example #12
0
Cateos.register(function(app, auth, database) {

  //We enable   routing. By default the Package Object is passed to the routes
  Cateos.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Cateos.menus.add({
    roles: ['authenticated'],
    title: 'Videos',
    link: 'all videos'
  });

  /*
  Cateos.menus.add({
    roles: ['authenticated'],
    title: 'Create',
    link: 'create video'
  });
  */

  Cateos.menus.add({
    roles: ['authenticated'],
    title: 'Config',
    link: 'configuration'
  });

  // TODO : use for resources needs
  app.use('/{{package}}/assets/img/', express.static(config.root + '/img'));

  //Cateos.aggregateAsset('js','/packages/system/public/services/menus.js', {group:'footer', absolute:true, weight:-9999});
  //Cateos.aggregateAsset('js', 'test.js', {group: 'footer', weight: -1});

  /*
    //Uncomment to use. Requires meanio@0.3.7 or above
    // Save settings with callback
    // Use this for saving data from administration pages
    Cateos.settings({'someSetting':'some value'},function (err, settings) {
      //you now have the settings object
    });

    // Another save settings example this time with no callback
    // This writes over the last settings.
    Cateos.settings({'anotherSettings':'some value'});

    // Get settings. Retrieves latest saved settings
    Articles.settings(function (err, settings) {
      //you now have the settings object
    });
    */
  Cateos.aggregateAsset('css', 'cateos.css');
  Cateos.aggregateAsset('css', 'bower_components/isteven-angular-multiselect/angular-multi-select.css',{
    absolute: true
  });
  Cateos.aggregateAsset('js', 'bower_components/isteven-angular-multiselect/angular-multi-select.js',{
    absolute: true
  });



  return Cateos;
});
Example #13
0
'use strict';

/*
 * Defining the Package
 */
var Module = require('meanio').Module;

var Competitor = new Module('competitor');


Competitor.aggregateAsset('css','competitor.css');


/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Competitor.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  Competitor.routes(app, auth, database);

  //We are adding a link to the main menu for all authenticated users
  Competitor.menus.add({
    title: 'Anmeldung',
    link: 'subscription',
    menu: 'main'
  });

  //We are adding a link to the main menu for all authenticated users
  Competitor.menus.add({
Example #14
0
File: app.js Project: ellman/root
ICU.register(function (app, auth, database,swagger) {


     swagger.add(__dirname);
    //We enable routing. By default the Package Object is passed to the routes
    ICU.routes(app, auth, database);

    app.set('views', __dirname + '/server/views');

    

    //We are adding a link to the main menu for all authenticated users
    ICU.menus.add({
        title: 'ICU example page',
        link: 'ICU example page',
        menu: 'main'
    });

    ICU.aggregateAsset('css', 'styles.css');
    ICU.aggregateAsset('css', '../lib/angular-ui-select/dist/select.css');
    ICU.aggregateAsset('css', '../lib/jquery-ui/themes/pepper-grinder/jquery-ui.min.css');
    ICU.aggregateAsset('css', '../lib/angularjs-color-picker/angularjs-color-picker.css');

    ICU.aggregateAsset('js', '../lib/underscore/underscore.js');
    ICU.aggregateAsset('js', '../lib/angular-ui-select/dist/select.js');
    ICU.aggregateAsset('js', '../lib/jquery-ui/jquery-ui.js');
    ICU.aggregateAsset('js', '../lib/angular-ui-date/src/date.js');
    ICU.aggregateAsset('js', '../lib/moment/moment.js');
    ICU.aggregateAsset('js', '../lib/ng-file-upload/ng-file-upload.min.js');
    ICU.aggregateAsset('js', '../lib/ngInfiniteScroll/build/ng-infinite-scroll.min.js');
    ICU.aggregateAsset('js', '../lib/querystring/querystring.min.js');

    ICU.aggregateAsset('js', '../lib/tinycolor/tinycolor.js', {weight: 0});
    ICU.aggregateAsset('js', '../lib/angularjs-color-picker/angularjs-color-picker.js', {weight: 1});

    ICU.aggregateAsset('js', '../lib/angular-sanitize/angular-sanitize.js', {weight: 0});
    ICU.aggregateAsset('js', '../lib/i18next/i18next.min.js', {weight: 1});
    ICU.aggregateAsset('js', '../lib/ng-i18next/dist/ng-i18next.js', {weight: 2});

    ICU.angularDependencies([
        'jm.i18next',
        'mean.medium-editor',
        'ui.select',
        'ui.date',
        'ngFileUpload',
        'color.picker',
        'mean.system',
        'mean.users',
        'mean.icu.ui.autofocus',
        'mean.icu.ui.login',
        'mean.icu.ui.register',
        'mean.icu.ui.profile',
        'mean.icu.ui.displayby',
        'mean.icu.ui.sidepane',
        'mean.icu.ui.middlepane',
        'mean.icu.ui.detailspane',
        'mean.icu.ui.userlist',
        'mean.icu.ui.userdetails',
        'mean.icu.ui.tasklist',
        'mean.icu.ui.tasklistdirective',
        'mean.icu.ui.taskdetails',
        'mean.icu.ui.projectlist',
        'mean.icu.ui.projectlistdirective',
        'mean.icu.ui.projectdetails',
        'mean.icu.ui.discussionlist',
        'mean.icu.ui.discussionlistdirective',
        'mean.icu.ui.discussiondetails',
        'mean.icu.ui.attachmentdetails',
        'mean.icu.ui.notificationsheader',
        'mean.icu.ui.membersfooter',
        'mean.icu.ui.tabs',
        'mean.icu.ui.rows',
        'mean.icu.ui.changecontent',
        'mean.icu.ui.avatar',
        'mean.icu.ui.colorpicker',
        'mean.icu.ui.search',
        'mean.icu.ui.searchlist',
        'mean.icu.data.activitiesservice',
        'mean.icu.data.documentsservice',
        'mean.icu.data.usersservice',
        'mean.icu.data.notificationsservice',
        'mean.icu.data.projectsservice',
        'mean.icu.data.discussionsservice',
        'mean.icu.data.tasksservice',
        'mean.icu.data.settingsservice',
        'mean.icu.data.searchservice',
        'mean.icu.data.paginationservice',
        'mean.icu.data.constants',
        'mean.icu.data.circlesservice',
        'mean.icu.decorators.pdsDecorator',
        'infinite-scroll',
        'mean.icu.ui.modaldeletetasksbyentity',
        'mean.icu.ui.modalcompartmentalization',
    ]);


console.yon = function(data, inspect) {
    
    console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
    
    if (typeof data === 'object') {
        
        if (inspect) {
            return console.dir(data);
        }
        
        return console.dir(data);
    }
    
    console.log('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<')
    
    console.log(data);

}
    ICU.settings({
        'language': 'en-US'
    }, function (err, settings) {
        //you now have the settings object
    });

    /**
     //Uncomment to use. Requires meanio@0.3.7 or above
     // Save settings with callback
     // Use this for saving data from administration pages
     ICU.settings({
        'someSetting': 'some value'
    }, function(err, settings) {
        //you now have the settings object
    });

     // Another save settings example this time with no callback
     // This writes over the last settings.
     ICU.settings({
        'anotherSettings': 'some value'
    });

     // Get settings. Retrieves latest saved settigns
     ICU.settings(function(err, settings) {
        //you now have the settings object
    });
     */

    //class someClass {
    //	constructor(name, age) {
    //		this.name = name;
    //		this.age = age;
    //	}
    //
    //	sayName() {
    //		console.log('some class ' + this.name);
    //	}
    //}
    //
    //class Child extends someClass {
    //	constructor(name, age) {
    //		super(name, age);
    //	}
    //
    //	// Override the someClass method above
    //	sayName() {
    //		// This will call someClass.sayName() triggering the old alert
    //		// Which will just display our name
    //		super();
    //
    //		// This will trigger the new alert which has labels and our age
    //		console.log('Name:' + this.name + ' Age:' + this.age);
    //	}
    //}
    //
    //var myChild = new Child('dwayne', 27);
    //myChild.sayName();

   
    return ICU;
});
Example #15
0
File: app.js Project: Patris/avalon
SystemPackage.register(function(app, auth, database) {

  //We enable routing. By default the Package Object is passed to the routes
  SystemPackage.routes(app, auth, database);

  SystemPackage.aggregateAsset('css', 'common.css');
  SystemPackage.angularDependencies(['ui.router', 'mean-factory-interceptor']);

  var themeFolder = '../theme/';
  SystemPackage.aggregateAsset('css', themeFolder+'css/font-awesome.css');
  SystemPackage.aggregateAsset('css', themeFolder+'css/ace-fonts.css');
  SystemPackage.aggregateAsset('css', themeFolder+'css/ace.css');
  //SystemPackage.aggregateAsset('css', themeFolder+'css/ace-part2.css');
  //SystemPackage.aggregateAsset('css', themeFolder+'css/ace-ie.css');
  SystemPackage.aggregateAsset('css', themeFolder+'css/bootstrap.css');

  SystemPackage.aggregateAsset('js', themeFolder+'js/bootstrap.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace-extra.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.scroller.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.colorpicker.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.fileinput.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.typeahead.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.wysiwyg.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.spinner.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.treeview.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.wizard.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/elements.aside.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.ajax-content.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.touch-drag.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.sidebar.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.sidebar-scroll-1.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.submenu-hover.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.widget-box.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.settings.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.settings-rtl.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.settings-skin.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.widget-on-reload.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/ace/ace.searchbox-autocomplete.js');

  SystemPackage.aggregateAsset('js', themeFolder+'js/jquery.js');
  SystemPackage.aggregateAsset('js', themeFolder+'js/jquery-ui.custom.js');


  // The middleware in config/express will run before this code

  // Set views path, template engine and default layout
  app.set('views', __dirname + '/server/views');

  // Setting the favicon and static folder
  app.use(favicon(__dirname + '/public/assets/img/favicon.ico'));

  // Adding robots and humans txt
  app.useStatic(__dirname + '/public/assets/static');

  SystemPackage.menus.add({
    title: 'Log Out',
    link: 'Log Out',
    roles: ['authenticated'],
    menu: 'account'
  });
  

  return SystemPackage;

});