Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature angular material #1649

Merged
merged 13 commits into from
Sep 12, 2016
1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

92 changes: 0 additions & 92 deletions .jshintrc

This file was deleted.

5 changes: 3 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![Build Status](https://travis-ci.org/linnovate/mean.svg)](https://travis-ci.org/linnovate/mean)
[![Dependencies Status](https://david-dm.org/linnovate/mean.svg)](https://david-dm.org/linnovate/mean)
[![Gitter](https://badges.gitter.im/JoinChat.svg)](https://gitter.im/linnovate/mean?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Known Vulnerabilities](https://snyk.io/test/github/linnovate/mean/badge.svg)](https://snyk.io/test/github/linnovate/mean)

# [![MEAN Logo](http://mean.io/system/assets/img/logos/meanlogo.png)](http://mean.io/) MEAN Stack

Expand Down Expand Up @@ -147,11 +148,11 @@ MEAN is an acronym for *M*ongo, *E*xpress.js , *A*ngular.js and *N*ode.js
<dt>MongoDB</dt>
<dd>Go through <a href="https://www.mongodb.com/">MongoDB Official Website</a> and proceed to its <a href="https://docs.mongodb.com/manual">Great Manual</a>, which should help you understand NoSQL and MongoDB better.</dd>
<dt>Express</dt>
<dd>The best way to understand express is through its <a href="http://expressjs.com/">Official Website</a>, particularly <a href="http://expressjs.com/">The Express Guide</a>; you can also go through this StackOverflow thread for more resources.</dd>
<dd>The best way to understand express is through its <a href="http://expressjs.com/">Official Website</a>, particularly <a href="http://expressjs.com/">The Express Guide</a>; you can also go through <a href="http://stackoverflow.com/q/8144214/6115857">this StackOverflow thread</a> for more resources.</dd>
<dt>AngularJS</dt>
<dd>Angular's Official Website is a great starting point. CodeSchool and google created a <a href="https://www.codeschool.com/courses/shaping-up-with-angular-js">great tutorial</a> for beginners, and the angular videos by <a href="https://egghead.io/">Egghead</a>.</dd>
<dt>Node.js</dt>
<dd>Start by going through <a href="https://nodejs.org">Node.js Official Website</a> and the <a href="https://nodejs.org/en/docs/">documentation page</a> as well as this StackOverflow thread, which should get you going with the Node.js platform in no time.</dd>
<dd>Start by going through <a href="https://nodejs.org">Node.js Official Website</a> and the <a href="https://nodejs.org/en/docs/">documentation page</a> as well as <a href="http://stackoverflow.com/q/2353818/6115857">this StackOverflow thread</a>, which should get you going with the Node.js platform in no time.</dd>
</dl>

### Additional Tools
Expand Down
92 changes: 47 additions & 45 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
'use strict';

import 'angular/angular-csp.css';
import 'angular-ui-select/select.min.css';
import 'bootstrap/dist/css/bootstrap.min.css';

import jQuery from 'jquery';
import 'angular';
import 'angular-ui-select/select';
import 'angular-mocks';
import 'angular-cookies';
import 'angular-resource';
import 'angular-sanitize';
import 'angular-ui-router';
import 'angular-jwt';
import 'angular-bootstrap/ui-bootstrap-tpls';

window.$ = jQuery;
'use strict'

import 'angular/angular-csp.css'
import 'angular-ui-select/select.min.css'
import 'angular-material/angular-material.min.css'

import jQuery from 'jquery'
import 'angular'
import 'angular-ui-select/select'
import 'angular-mocks'
import 'angular-cookies'
import 'angular-resource'
import 'angular-sanitize'
import 'angular-ui-router'
import 'angular-jwt'
import 'angular-aria'
import 'angular-animate'
import 'angular-material'

window.$ = jQuery

angular.element(document).ready(function () {
//Fixing facebook bug with redirect
if (window.location.hash === '#_=_') window.location.hash = '#!';

//Then init the app
angular.bootstrap(document, ['mean']);

});

function processModules(modules) {

var packageModules = ['ngCookies', 'ngResource', 'ui.bootstrap', 'ui.router', 'ui.select', 'ngSanitize'], m, mn;
for (var index in modules) {
m = modules[index];
mn = 'mean.' + m.name;
angular.module(mn, m.angularDependencies || []);
packageModules.push(mn);
}

var req = require.context('./packages', true, /\/public\/(?!tests|assets|views)(.*)\.js$/);
req.keys().map(req);
req = require.context('./node_modules', true, /\/meanio-(.*)\/public\/(?!tests|assets|views)(.*)\.js$/);
req.keys().map(req);
angular.module('mean', packageModules);
// Fixing facebook bug with redirect
if (window.location.hash === '#_=_') window.location.hash = '#!'

// Then init the app
angular.bootstrap(document, ['mean'])
})

function processModules (modules) {
var packageModules = ['ngCookies', 'ngResource', 'ui.router', 'ui.select', 'ngSanitize', 'ngMaterial']
var m
var mn
for (var index in modules) {
m = modules[index]
mn = 'mean.' + m.name
angular.module(mn, m.angularDependencies || [])
packageModules.push(mn)
}

var req = require.context('./packages', true, /\/public\/(?!tests|assets|views)(.*)\.js$/)
req.keys().map(req)
req = require.context('./node_modules', true, /\/meanio-(.*)\/public\/(?!tests|assets|views)(.*)\.js$/)
req.keys().map(req)
angular.module('mean', packageModules)
}

jQuery.ajax('/_getModules', {
dataType: 'json',
async: false,
success: processModules
});
dataType: 'json',
async: false,
success: processModules
})
18 changes: 9 additions & 9 deletions config/env/default.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
'use strict'

var path = require('path'),
rootPath = path.normalize(__dirname + '/../..');
var path = require('path')
var rootPath = path.join(__dirname, '/../..')

module.exports = {
root: rootPath,
Expand Down Expand Up @@ -45,20 +45,20 @@ module.exports = {
public: {
languages: [{
locale: 'en',
direction: 'ltr',
direction: 'ltr'
}, {
locale: 'he',
direction: 'rtl',
direction: 'rtl'
}],
currentLanguage: 'en',
loginPage: '/auth/login',
cssFramework: 'bootstrap'
},
clusterSticky: false,
stickyOptions: {
proxy: false, //activate layer 4 patching
header: 'x-forwarded-for', //provide here your header containing the users ip
num: (process.env.CPU_COUNT || require('os').cpus().length) - 1,
proxy: false, // activate layer 4 patching
header: 'x-forwarded-for', // provide here your header containing the users ip
num: (process.env.CPU_COUNT || require('os').cpus().length) - 1
},
// The session cookie name
sessionName: 'connect.sid',
Expand All @@ -67,4 +67,4 @@ module.exports = {
json: {limit: '100kb'},
urlencoded: {limit: '100kb', extended: true}
}
};
}
6 changes: 3 additions & 3 deletions config/env/development.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

module.exports = {
db: 'mongodb://' + (process.env.DB_PORT_27017_TCP_ADDR || 'localhost') + '/mean-dev',
Expand Down Expand Up @@ -58,6 +58,6 @@ module.exports = {
user: 'EMAIL_ID',
pass: 'PASSWORD'
}
},
},
secret: 'SOME_TOKEN_SECRET'
};
}
4 changes: 2 additions & 2 deletions config/env/production.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

module.exports = {
db: 'mongodb://' + (process.env.DB_PORT_27017_TCP_ADDR || 'localhost') + '/mean-prod',
Expand Down Expand Up @@ -78,4 +78,4 @@ module.exports = {
}
},
secret: 'SOME_TOKEN_SECRET'
};
}
4 changes: 2 additions & 2 deletions config/env/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
'use strict'

module.exports = {
db: 'mongodb://' + (process.env.DB_PORT_27017_TCP_ADDR || 'localhost') + '/mean-test',
Expand Down Expand Up @@ -60,4 +60,4 @@ module.exports = {
}
},
secret: 'SOME_TOKEN_SECRET'
};
}
Loading