Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
217 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
'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; | ||
|
||
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); | ||
var req = require.context("./node_modules", true, /\/meanio-(admin|system|users|circles)\/public\/(?!tests|assets|views)(.*)\.js$/); | ||
req.keys().map(req); | ||
|
||
angular.module('mean', packageModules); | ||
} | ||
|
||
jQuery.ajax('/_getModules', { | ||
dataType: 'json', | ||
async: false, | ||
success: processModules | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
{ | ||
"name": "mean", | ||
"dependencies": { | ||
"jquery": "latest", | ||
"angular": "latest", | ||
"angular-resource": "latest", | ||
"angular-cookies": "latest", | ||
"angular-mocks": "latest", | ||
"angular-route": "latest", | ||
"bootstrap": "latest", | ||
"angular-bootstrap": "latest", | ||
"angular-ui-router": "#master", | ||
"web-bootstrap": "./node_modules/meanio/resources/web-bootstrap.js", | ||
"angular-ui-select": "latest", | ||
"angular-sanitize": "latest" | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,128 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'), | ||
gulpLoadPlugins = require('gulp-load-plugins'), | ||
through = require('through'), | ||
gutil = require('gulp-util'), | ||
plugins = gulpLoadPlugins(), | ||
coffee = require('gulp-coffee'), | ||
paths = { | ||
js: ['./*.js', 'config/**/*.js', 'gulp/**/*.js', 'tools/**/*.js', 'packages/**/*.js', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**', '!packages/**/assets/**/js/**'], | ||
html: ['packages/**/*.html', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'], | ||
css: ['packages/**/*.css', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**','!packages/core/**/public/assets/css/*.css'], | ||
less: ['packages/**/*.less', '!packages/**/_*.less', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'], | ||
sass: ['packages/**/*.scss', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'], | ||
coffee: ['packages/**/*.coffee', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'] | ||
}; | ||
gulpLoadPlugins = require('gulp-load-plugins'), | ||
through = require('through'), | ||
gutil = require('gulp-util'), | ||
plugins = gulpLoadPlugins(), | ||
paths = { | ||
js: ['./*.js', 'config/**/*.js', 'gulp/**/*.js', 'tools/**/*.js', 'packages/**/*.js', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**', '!packages/**/assets/**/js/**'], | ||
html: ['packages/**/*.html', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'], | ||
css: ['packages/**/*.css', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**', '!packages/core/**/public/assets/css/*.css'], | ||
less: ['packages/**/*.less', '!packages/**/_*.less', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'], | ||
sass: ['packages/**/*.scss', '!packages/**/node_modules/**', '!packages/**/assets/**/lib/**'], | ||
webpack: ['./app.js', 'packages/**/public/**/*.css', 'packages/**/public/**/*.js', '!packages/**/public/assets/lib/**', '!packages/**/node_modules/**'] | ||
}; | ||
var webpack = require("webpack"); | ||
var webpackConfig = require("../webpack.config.js"); | ||
|
||
/*var defaultTasks = ['clean', 'jshint', 'less', 'csslint', 'devServe', 'watch'];*/ | ||
var defaultTasks = ['coffee','clean', 'less', 'sass', 'csslint', 'devServe', 'watch']; | ||
var defaultTasks = ['webpack:build-dev','clean', 'less', 'sass', 'csslint', 'devServe', 'watch']; | ||
|
||
gulp.task('env:development', function () { | ||
process.env.NODE_ENV = 'development'; | ||
process.env.NODE_ENV = 'development'; | ||
}); | ||
|
||
gulp.task('jshint', function () { | ||
return gulp.src(paths.js) | ||
.pipe(plugins.jshint()) | ||
.pipe(plugins.jshint.reporter('jshint-stylish')) | ||
// .pipe(plugins.jshint.reporter('fail')) to avoid shutdown gulp by warnings | ||
.pipe(count('jshint', 'files lint free')); | ||
return gulp.src(paths.js) | ||
.pipe(plugins.jshint()) | ||
.pipe(plugins.jshint.reporter('jshint-stylish')) | ||
// .pipe(plugins.jshint.reporter('fail')) to avoid shutdown gulp by warnings | ||
.pipe(count('jshint', 'files lint free')); | ||
}); | ||
|
||
gulp.task('csslint', function () { | ||
return gulp.src(paths.css) | ||
.pipe(plugins.csslint('.csslintrc')) | ||
.pipe(plugins.csslint.reporter()) | ||
.pipe(count('csslint', 'files lint free')); | ||
return gulp.src(paths.css) | ||
.pipe(plugins.csslint('.csslintrc')) | ||
.pipe(plugins.csslint.reporter()) | ||
.pipe(count('csslint', 'files lint free')); | ||
}); | ||
|
||
gulp.task('less', function() { | ||
return gulp.src(paths.less) | ||
.pipe(plugins.less()) | ||
.pipe(gulp.dest('./packages')); | ||
gulp.task('less', function () { | ||
return gulp.src(paths.less) | ||
.pipe(plugins.less()) | ||
.pipe(gulp.dest('./packages')); | ||
}); | ||
|
||
gulp.task('sass', function() { | ||
return gulp.src(paths.sass) | ||
.pipe(plugins.sass().on('error', plugins.sass.logError)) | ||
.pipe(gulp.dest('./packages')); | ||
gulp.task('sass', function () { | ||
return gulp.src(paths.sass) | ||
.pipe(plugins.sass().on('error', plugins.sass.logError)) | ||
.pipe(gulp.dest('./packages')); | ||
}); | ||
|
||
gulp.task('devServe', ['env:development'], function () { | ||
|
||
plugins.nodemon({ | ||
script: 'server.js', | ||
ext: 'html js', | ||
env: { 'NODE_ENV': 'development' } , | ||
ignore: [ | ||
'node_modules/', | ||
'bower_components/', | ||
'logs/', | ||
'packages/*/*/public/assets/lib/', | ||
'packages/*/*/node_modules/', | ||
'.DS_Store', '**/.DS_Store', | ||
'.bower-*', | ||
'**/.bower-*', | ||
'**/tests' | ||
], | ||
nodeArgs: ['--debug'], | ||
stdout: false | ||
}).on('readable', function() { | ||
this.stdout.on('data', function(chunk) { | ||
if(/Mean app started/.test(chunk)) { | ||
setTimeout(function() { plugins.livereload.reload(); }, 500); | ||
} | ||
process.stdout.write(chunk); | ||
plugins.nodemon({ | ||
script: 'server.js', | ||
ext: 'html js', | ||
env: {'NODE_ENV': 'development'}, | ||
ignore: [ | ||
'node_modules/', | ||
'bower_components/', | ||
'logs/', | ||
'packages/*/*/public/assets/lib/', | ||
'packages/*/*/node_modules/', | ||
'.DS_Store', '**/.DS_Store', | ||
'.bower-*', | ||
'**/.bower-*', | ||
'**/tests' | ||
], | ||
nodeArgs: ['--debug'], | ||
stdout: false | ||
}).on('readable', function () { | ||
this.stdout.on('data', function (chunk) { | ||
if (/Mean app started/.test(chunk)) { | ||
setTimeout(function () { | ||
plugins.livereload.reload(); | ||
}, 500); | ||
} | ||
process.stdout.write(chunk); | ||
}); | ||
this.stderr.pipe(process.stderr); | ||
}); | ||
this.stderr.pipe(process.stderr); | ||
}); | ||
}); | ||
|
||
gulp.task('coffee', function() { | ||
gulp.src(paths.coffee) | ||
.pipe(coffee({bare: true}).on('error', gutil.log)) | ||
.pipe(gulp.dest('./packages')); | ||
|
||
// modify some webpack config options | ||
var myDevConfig = Object.create(webpackConfig); | ||
myDevConfig.devtool = "sourcemap"; | ||
myDevConfig.debug = true; | ||
// create a single instance of the compiler to allow caching | ||
var devCompiler = webpack(myDevConfig); | ||
gulp.task('webpack:build-dev', function(callback) { | ||
// run webpack | ||
devCompiler.run(function(err, stats) { | ||
if(err) throw new gutil.PluginError("webpack:build-dev", err); | ||
gutil.log("[webpack:build-dev]", stats.toString({ | ||
colors: true | ||
})); | ||
callback(); | ||
}); | ||
}); | ||
|
||
gulp.task('watch', function () { | ||
plugins.livereload.listen({interval:500}); | ||
plugins.livereload.listen({interval: 500}); | ||
|
||
gulp.watch(paths.coffee,['coffee']); | ||
gulp.watch(paths.js, ['jshint']); | ||
gulp.watch(paths.css, ['csslint']).on('change', plugins.livereload.changed); | ||
gulp.watch(paths.less, ['less']); | ||
gulp.watch(paths.sass, ['sass']); | ||
gulp.watch(paths.js, ['jshint']); | ||
gulp.watch(paths.css, ['csslint']).on('change', plugins.livereload.changed); | ||
gulp.watch(paths.less, ['less']); | ||
gulp.watch(paths.sass, ['sass']); | ||
gulp.watch(paths.webpack, ['webpack:build-dev']); | ||
}); | ||
|
||
function count(taskName, message) { | ||
var fileCount = 0; | ||
var fileCount = 0; | ||
|
||
function countFiles(file) { | ||
fileCount++; // jshint ignore:line | ||
} | ||
|
||
function countFiles(file) { | ||
fileCount++; // jshint ignore:line | ||
} | ||
function endStream() { | ||
gutil.log(gutil.colors.cyan(taskName + ': ') + fileCount + ' ' + message || 'files processed.'); | ||
this.emit('end'); // jshint ignore:line | ||
} | ||
|
||
function endStream() { | ||
gutil.log(gutil.colors.cyan(taskName + ': ') + fileCount + ' ' + message || 'files processed.'); | ||
this.emit('end'); // jshint ignore:line | ||
} | ||
return through(countFiles, endStream); | ||
return through(countFiles, endStream); | ||
} | ||
|
||
gulp.task('development', defaultTasks); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
packages/custom/meanStarter/public/assets/img/icons/facebook.png
100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
packages/custom/meanStarter/public/assets/img/icons/github.png
100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
packages/custom/meanStarter/public/assets/img/icons/google.png
100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified
0
packages/custom/meanStarter/public/assets/img/icons/twitter.png
100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
import './assets/css/common.css'; | ||
import './assets/css/loginForms.css'; | ||
import './assets/css/starter.css'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.