From 1fbd2452aa9f52e1dd06b73a844e14e7dee0607b Mon Sep 17 00:00:00 2001 From: Amos Haviv Date: Thu, 12 Sep 2013 20:44:10 +0300 Subject: [PATCH] Removing Compass, Fixing Windows Errors, Removing Makefile, Tiding Code --- .bowerrc | 4 -- Makefile | 18 --------- README.md | 7 +--- app/views/includes/foot.jade | 15 ++++--- app/views/includes/head.jade | 4 +- bower.json | 40 +++++++++++-------- gruntfile.js | 71 +++++++++++++++++---------------- package.json | 28 ++++++------- public/css/common.css | 26 +++++++++++- public/css/views/articles.css | 8 +++- public/sass/common.scss | 24 ----------- public/sass/views/articles.scss | 9 ----- 12 files changed, 117 insertions(+), 137 deletions(-) delete mode 100644 .bowerrc delete mode 100644 Makefile delete mode 100644 public/sass/common.scss delete mode 100644 public/sass/views/articles.scss diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index 93d77ab3..00000000 --- a/.bowerrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "directory": "public/lib", - "json": "bower.json" -} diff --git a/Makefile b/Makefile deleted file mode 100644 index ec3333e6..00000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -REPORTER = spec -NODEARGS = -test: - @if [ ! -n "$(NODE_ENV)" ]; then NODE_ENV=test NODE_PATH=lib ./node_modules/grunt-nodemon/node_modules/.bin/nodemon -x ./node_modules/.bin/mocha -R $(REPORTER) -t 15000 --recursive test $(NODEARGS); else NODE_PATH=lib ./node_modules/.bin/mocha -R $(REPORTER) -t 15000 --recursive test $(NODEARGS); fi - -start: - @if [ ! -n "$(NODE_ENV)" ]; then NODE_ENV=development NODE_PATH=lib ./node_modules/grunt-nodemon/node_modules/.bin/nodemon server.js $(NODEARGS) ; else NODE_PATH=lib ./node_modules/.bin/foreman start; fi - -mocha: - NODE_PATH=lib ./node_modules/.bin/mocha -R $(REPORTER) -t 15000 --recursive test $(NODEARGS) - -repl: - @NODE_ENV=development NODE_PATH=lib node --debug $(NODEARGS) - -webtest: - @NODE_ENV=test NODE_PATH=lib ./node_modules/.bin/web-mocha test $(NODEARGS) - -.PHONY: jshint test repl webtest mocha diff --git a/README.md b/README.md index cc6fe389..cab8baa9 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,6 @@ MEAN is a boilerplate that provides a nice starting point for [MongoDB](http://w * MongoDB - Download and Install [MongoDB](http://www.mongodb.org/downloads) - Make sure it's running on the default port (27017). ### Optional -* Ruby - Download and Install [Ruby](http://www.ruby-lang.org/). -* Ruby Gems - Download and Install [Ruby Gems](http://rubygems.org). -* Compass - an open-source CSS Authoring Framework, install via [Ruby Gems](http://rubygems.org). * Grunt - Download and Install [Grunt](http://gruntjs.com). ## Additional Packages @@ -93,9 +90,9 @@ If you are using node instead of grunt, it is very similar: ## More Information - * Visit our [Ninja's Zone](http://www.meanleanstartupmachine.com/) for extended support. + * Contact Amos Haviv on any issue via [E-Mail](mailto:mail@amoshaviv.com), [Facebook](http://www.facebook.com/amoshaviv), or [Twitter](http://www.twitter.com/amoshaviv). * Visit us at [Linnovate.net](http://www.linnovate.net/). - * Contact amos on any issue via [E-Mail](mailto:mail@amoshaviv.com), [Facebook](http://www.facebook.com/amoshaviv), or [Twitter](http://www.twitter.com/amoshaviv). + * Visit our [Ninja's Zone](http://www.meanleanstartupmachine.com/) for extended support. ## Credits Inspired by the great work of [Madhusudhan Srinivasa](https://github.com/madhums/) diff --git a/app/views/includes/foot.jade b/app/views/includes/foot.jade index 83022ced..c65e13c6 100755 --- a/app/views/includes/foot.jade +++ b/app/views/includes/foot.jade @@ -1,13 +1,16 @@ -script(type='text/javascript', src='lib/jquery/jquery.min.js') +script(type='text/javascript', src='lib/jquery/jquery.js') + +//Bootstrap +script(type='text/javascript', src='lib/bootstrap/js/bootstrap.js') //AngularJS -script(type='text/javascript', src='lib/angular/angular.min.js') -script(type='text/javascript', src='lib/angular-cookies/angular-cookies.min.js') -script(type='text/javascript', src='lib/angular-resource/angular-resource.min.js') +script(type='text/javascript', src='lib/angular/angular.js') +script(type='text/javascript', src='lib/angular-cookies/angular-cookies.js') +script(type='text/javascript', src='lib/angular-resource/angular-resource.js') //Angular UI -script(type='text/javascript', src='lib/angular-bootstrap/ui-bootstrap-tpls.min.js') -script(type='text/javascript', src='lib/angular-ui-utils/modules/route/route.js') +script(type='text/javascript', src='lib/angular-bootstrap/ui-bootstrap-tpls.js') +script(type='text/javascript', src='lib/angular-ui-utils/modules/route.js') //Application Init script(type='text/javascript', src='js/app.js') diff --git a/app/views/includes/head.jade b/app/views/includes/head.jade index f60a83c0..4141d03d 100755 --- a/app/views/includes/head.jade +++ b/app/views/includes/head.jade @@ -19,8 +19,8 @@ head meta(property='og:site_name', content='MEAN - A Modern Stack') meta(property='fb:admins', content='APP_ADMIN') - link(rel='stylesheet', href='lib/bootstrap/docs/assets/css/bootstrap.css') - link(rel='stylesheet', href='lib/bootstrap/docs/assets/css/bootstrap-responsive.css') + link(rel='stylesheet', href='lib/bootstrap/css/bootstrap.css') + link(rel='stylesheet', href='lib/bootstrap/css/bootstrap-responsive.css') link(rel='stylesheet', href='css/common.css') link(rel='stylesheet', href='css/views/articles.css') diff --git a/bower.json b/bower.json index a4c3b9f5..10648432 100644 --- a/bower.json +++ b/bower.json @@ -1,18 +1,24 @@ { - "name": "angularJS-IL", - "version": "1.0.0", - "dependencies": { - "bootstrap": "2.3.2", - "angular": "~1.0.6", - "angular-resource": "~1.0.6", - "angular-cookies": "~1.0.6", - "angular-bootstrap": "~0.4.0", - "angular-ui-utils": "0.0.4", - "json3": "~3.2.4", - "jquery": "~1.9.1" - }, - "devDependencies": { - "angular-mocks": "~1.0.5", - "angular-scenario": "~1.0.5" - } -} + "name": "mean", + "version": "1.0.0", + "dependencies": { + "bootstrap": "2.3.2", + "angular": "~1.0.6", + "angular-resource": "~1.0.6", + "angular-cookies": "~1.0.6", + "angular-bootstrap": "~0.4.0", + "angular-ui-utils": "0.0.4", + "json3": "~3.2.4", + "jquery": "~1.9.1" + }, + "exportsOverride": { + "bootstrap": { + "css": "docs/assets/css/bootstrap*.css", + "js": "docs/assets/js/bootstrap.js", + "img": "docs/assets/img/glyphicons-halflings*.png" + }, + "angular-ui-utils": { + "modules": "modules/route/route.js" + } + } +} \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js index 395acdbd..d76c6161 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -9,44 +9,28 @@ module.exports = function(grunt) { livereload: true, }, }, - html: { - files: ['public/views/**'], + js: { + files: ['public/js/**', 'app/**/*.js'], + tasks: ['jshint'], options: { livereload: true, }, }, - js: { - files: ['public/js/**'], + html: { + files: ['public/views/**'], options: { livereload: true, }, }, css: { - files: ['public/sass/**'], - tasks: ['compass'], + files: ['public/css/**'], options: { - livereload: true, - force: true + livereload: true } } }, jshint: { - all: ['gruntfile.js', 'public/js/**/*.js', 'test/**/*.js', 'app/**/*.js'] - }, - compass: { //Task - dist: { //Target - options: { //Target options - sassDir: 'public/sass', - cssDir: 'public/css', - environment: 'production' - } - }, - dev: { //Another target - options: { - sassDir: 'public/sass', - cssDir: 'public/css' - } - } + all: ['gruntfile.js', 'public/js/**/*.js', 'test/**/*.js', 'app/**/*.js'] }, nodemon: { dev: { @@ -63,33 +47,50 @@ module.exports = function(grunt) { }, cwd: __dirname } - }, - exec: { - options: { - exec: 'less' - } } }, concurrent: { - target: { - tasks: ['nodemon', 'watch'], + tasks: ['nodemon', 'watch'], + options: { + logConcurrentOutput: true + } + }, + mochaTest: { + options: { + reporter: 'spec' + }, + src: ['test/**/*.js'] + }, + bower: { + install: { options: { - logConcurrentOutput: true + targetDir: './public/lib', + layout: 'byComponent', + install: true, + verbose: true, + cleanBowerDir: true } } } }); //Load NPM tasks - grunt.loadNpmTasks('grunt-contrib-compass'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-nodemon'); grunt.loadNpmTasks('grunt-concurrent'); + grunt.loadNpmTasks('grunt-bower-task'); //Making grunt default to force in order not to break the project. grunt.option('force', true); //Default task(s). - grunt.registerTask('default', ['jshint', 'compass', 'concurrent:target']); -}; + grunt.registerTask('default', ['jshint', 'concurrent']); + + //Test task. + grunt.registerTask('test', ['mochaTest']); + + //Bower task. + grunt.registerTask('install', ['bower']); +}; \ No newline at end of file diff --git a/package.json b/package.json index e834b0e5..0ddcf6a0 100755 --- a/package.json +++ b/package.json @@ -1,17 +1,17 @@ { "name": "mean", - "description": "Mongo", + "description": "MEAN - A Modern Stack: MongoDB, ExpressJS, AngularJS, NodeJS. (BONUS: Passport User Support).", "version": "1.0.0", "private": false, - "author": "MEAN - A Modern Stack: MongoDB, ExpressJS, AngularJS, NodeJS. (BONUS: Passport User Support).", + "author": "Amos Haviv", "engines": { "node": "0.10.x", "npm": "1.2.x" }, "scripts": { - "start": "make start", - "test": "make test", - "postinstall": "node_modules/bower/bin/bower install" + "start": "node node_modules/grunt-cli/bin/grunt", + "test": "node node_modules/grunt-cli/bin/grunt test", + "postinstall": "node node_modules/grunt-cli/bin/grunt install" }, "dependencies": { "express": "latest", @@ -29,20 +29,18 @@ "async": "latest", "view-helpers": "latest", "mean-logger": "latest", - "bower": "latest", "forever": "latest", - "foreman": "0.0.25" + "grunt": "latest", + "grunt-cli": "latest", + "grunt-bower-task": "latest" }, "devDependencies": { "supertest": "latest", "should": "latest", - "mocha": "latest", - "web-mocha": "0.0.10", - "grunt": "~0.4.1", - "grunt-contrib-compass": "~0.3.0", - "grunt-contrib-watch": "~0.4.4", - "grunt-contrib-jshint": "~0.6.0", - "grunt-nodemon": "0.0.8", - "grunt-concurrent": "~0.3.0" + "grunt-contrib-watch": "latest", + "grunt-contrib-jshint": "latest", + "grunt-nodemon": "latest", + "grunt-concurrent": "latest", + "grunt-mocha-test": "latest" } } \ No newline at end of file diff --git a/public/css/common.css b/public/css/common.css index b6193bdc..e91ae240 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -1 +1,25 @@ -.navbar .nav>li>a.brand{padding-left:20px;margin-left:0}.content{margin-top:50px;width:100%}footer{position:fixed;left:0px;bottom:0px;height:30px;width:100%;background:#ddd;-webkit-box-shadow:0 8px 6px 6px black;-moz-box-shadow:0 8px 6px 6px black;box-shadow:0 8px 6px 6px black}footer p{padding:5px 0 12px 10px} +.navbar .nav>li>a.brand { + padding-left:20px; + margin-left:0 +} + +.content { + margin-top:50px; + width:100% +} + +footer { + position:fixed; + left:0px; + bottom:0px; + height:30px; + width:100%; + background:#ddd; + -webkit-box-shadow:0 8px 6px 6px black; + -moz-box-shadow:0 8px 6px 6px black; + box-shadow:0 8px 6px 6px black +} + +footer p { + padding:5px 0 12px 10px +} \ No newline at end of file diff --git a/public/css/views/articles.css b/public/css/views/articles.css index 842ace2b..163b1fa5 100644 --- a/public/css/views/articles.css +++ b/public/css/views/articles.css @@ -1 +1,7 @@ -h1{text-align:center}ul.articles li:not(:last-child){border-bottom:1px solid #ccc} +h1 { + text-align:center +} + +ul.articles li:not(:last-child) { + border-bottom:1px solid #ccc +} \ No newline at end of file diff --git a/public/sass/common.scss b/public/sass/common.scss deleted file mode 100644 index 73017054..00000000 --- a/public/sass/common.scss +++ /dev/null @@ -1,24 +0,0 @@ -.navbar .nav> li > a.brand { - padding-left: 20px; - margin-left: 0; -} - -.content { - margin-top: 50px; - width: 100%; -} - -footer { - position:fixed; - left:0px; - bottom:0px; - height:30px; - width:100%; - background:#ddd; - -webkit-box-shadow: 0 8px 6px 6px black; - -moz-box-shadow: 0 8px 6px 6px black; - box-shadow: 0 8px 6px 6px black; -} -footer p{ - padding: 5px 0 12px 10px; -} \ No newline at end of file diff --git a/public/sass/views/articles.scss b/public/sass/views/articles.scss deleted file mode 100644 index 0e417dfe..00000000 --- a/public/sass/views/articles.scss +++ /dev/null @@ -1,9 +0,0 @@ -h1 { - text-align: center; -} - -ul.articles { - li:not(:last-child) { - border-bottom: 1px solid #ccc; - } -} \ No newline at end of file