From afc14c22cab76114daea5b2cfc13b281d96b03be Mon Sep 17 00:00:00 2001 From: Balthazar Gronon Date: Sat, 7 Feb 2015 18:41:37 +0100 Subject: [PATCH 1/7] docs(readme): add passport info and move sockets --- README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 73cd0ef..7df3412 100644 --- a/README.md +++ b/README.md @@ -19,17 +19,6 @@ npm install -g yo generator-bangular yo bangular -### Sockets - -To use the sockets, you have to confirm the option on project generation. -Yet, it's only when you've selected the mongo backend that you can be prompted by this config. - -This will initialize all the server part and create a `Socket` factory in the client. -On each new `api` you create, you can choose to load the sockets for this model. -It will then emit socket events on update and remove of documents of this model. - -The sockets can be quickly usable in your controllers, [here is an example](https://gist.github.com/Apercu/9cd8b4b332948dc833f0) with a simple user. - # Manage project gulp @@ -139,6 +128,23 @@ The **name** parameter is required. This will create a new `.scss` file in he `c The **name** parameter is required. A **name** folder will be created at `server/api/`. +# Features + +### Sockets + +To use the sockets, you have to confirm the option on project generation. +Yet, it's only when you've selected the mongo backend that you can be prompted by this config. + +This will initialize all the server part and create a `Socket` factory in the client. +On each new `api` you create, you can choose to load the sockets for this model. +It will then emit socket events on update and remove of documents of this model. + +The sockets can be quickly usable in your controllers, [here is an example](https://gist.github.com/Apercu/9cd8b4b332948dc833f0) with a simple user. + +### Passport + +On project generation, you can integrate passport authentification in your app. It will create default views for the signup and login. You can easily protect your routes for a connected user by adding the `isAuthenticated` middleware on it. + # Architecture From 2cc173bb979d27b07693ecc7aa8e95df870b31c9 Mon Sep 17 00:00:00 2001 From: Balthazar Gronon Date: Sat, 7 Feb 2015 19:27:41 +0100 Subject: [PATCH 2/7] docs(readme): add table of contents --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 7df3412..c691895 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,13 @@ npm install -g yo generator-bangular yo bangular + +### Table of contents + +- [Manage project](https://github.com/42Zavattas/generator-bangular#manage-project) +- [Generators](https://github.com/42Zavattas/generator-bangular#generators) +- [Features](https://github.com/42Zavattas/generator-bangular#features) +- [Architecture](https://github.com/42Zavattas/generator-bangular#architecutre) # Manage project From 20cd3485a7e7e3f60c4c29684e5e3c734bca796c Mon Sep 17 00:00:00 2001 From: Meriadec Pillet Date: Sun, 8 Feb 2015 00:02:41 +0100 Subject: [PATCH 3/7] docs(readme): add some showoff information --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c691895..33f6f0f 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,16 @@ * **NO** pre-install for Google Analytics — *Wanna track people? Do it yourself.* * **Livereload** on changes in client / server — *You don't have time to waste.* * **JSHint** integration — *Write clean code, for purpose.* +* **Sass** support — *Because CSS is a mess.* * **Fast build** — *You do faster? Let's see that.* +Optional: + +* **sockets**, with [socket.io](https://github.com/Automattic/socket.io) and [angular-socket-io](https://github.com/btford/angular-socket-io) +* **authentication system**, with [Passport](https://github.com/jaredhanson/passport) +* **MongoDB**, with [Mongoose ODM](https://github.com/learnboost/mongoose) +* **mocked backend**, with [Restock](https://github.com/42Zavattas/Restock.io) + [Demo of generated project](https://github.com/42Zavattas/bangular-demo) # Install From bbde9c9f0597a6bb7d0b73834f0916294f80fede Mon Sep 17 00:00:00 2001 From: Balthazar Gronon Date: Sun, 8 Feb 2015 00:09:55 +0100 Subject: [PATCH 4/7] docs(readme): update socket example to item --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33f6f0f..620eaac 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ This will initialize all the server part and create a `Socket` factory in the cl On each new `api` you create, you can choose to load the sockets for this model. It will then emit socket events on update and remove of documents of this model. -The sockets can be quickly usable in your controllers, [here is an example](https://gist.github.com/Apercu/9cd8b4b332948dc833f0) with a simple user. +The sockets can be quickly usable in your controllers, [here is an example](https://gist.github.com/Apercu/9cd8b4b332948dc833f0) with a simple item. ### Passport From 2ab083bd8813cbc82e00aabc2b9a50d83803247e Mon Sep 17 00:00:00 2001 From: Meriadec Pillet Date: Sun, 8 Feb 2015 01:06:47 +0100 Subject: [PATCH 5/7] fix(readme): obvious things are obvious --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 620eaac..426630c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Optional: # Install - npm install -g yo generator-bangular + npm install -g generator-bangular yo bangular ### Table of contents From 37aef08d0365a93cd113b9bca102157f6bdacc2d Mon Sep 17 00:00:00 2001 From: Balthazar Gronon Date: Sun, 8 Feb 2015 11:37:20 +0100 Subject: [PATCH 6/7] fix(gen): delay nodemon on start and restart changes Closes #4. --- app/templates/gulpfile.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/templates/gulpfile.js b/app/templates/gulpfile.js index 7ddfcb1..7ba7cd4 100644 --- a/app/templates/gulpfile.js +++ b/app/templates/gulpfile.js @@ -198,13 +198,13 @@ gulp.task('serve', ['watch'], function () { if (!openOpts.already) { openOpts.already = true; gulp.src('client/index.html') + .pipe($.wait(500)) .pipe($.open('', openOpts)); + } else { + setTimeout(function () { + $.livereload.changed('/'); + }, 1000); } - }) - .on('restart', function () { - gulp.src('client/index.html') - .pipe($.wait(250)) - .pipe($.livereload()); }); }); From 953db198c3e1e361ace1712c485f9b1d00003986 Mon Sep 17 00:00:00 2001 From: Balthazar Gronon Date: Sun, 8 Feb 2015 11:40:45 +0100 Subject: [PATCH 7/7] chore(core): bump to 0.7.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2231c3e..c551603 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-bangular", - "version": "0.7.0", + "version": "0.7.1", "description": "Generate and serve your project in a blink of an eye", "license": "BSD", "homepage": "https://github.com/42Zavattas/generator-bangular",