Code Monkey home page Code Monkey logo

generator-ng-fullstack's Introduction

logo

ng-fullstack is a yeoman generator that allows you to rapidly get started with prototyping web applications with the newest technologies available. It allows you to choose between a client app, a server app or a fullstack app. All of them simple to extend and powerful to use.

Getting Started

$ npm install -g generator-ng-fullstack

Then, to create a new app, simply run:

$ yo ng-fullstack

A few questions will be shown, make sure you answer them and, there you go! Now you have the boilerplate app working.

Type less, create more

By installing ngf you'll speed up your development by using the official generator-ng-fullstack alias. It shortens significantly the amount of stuff you type.

$ npm install -g ngf

Wiki

In the wiki you'll find: pro tips, the sub-generators, FAQ, Troubleshooting, walkthroughs and much more.

Chat

Do you have a doubt, want to talk about something cool or just want to chat? Join us on the gitter chat 😄

Contributing

Pull requests, helping others solving issues, improving the Wiki, among other tasks, are all valid, and more than welcome, contributions - don't hesitate.

Development

Build Status Coverage Status npm version

License

MIT

generator-ng-fullstack's People

Contributors

abdizriel avatar bernardbr avatar bryant1410 avatar dancancro avatar dev-force avatar dmitrc avatar dovetailbs avatar ericmdantas avatar frgomes avatar georgeedwards avatar justingreenberg avatar kyuumeitai avatar oopdaniel avatar rahulswaminathan avatar remicastaing avatar tadimsky avatar thebrenny avatar tiagor87 avatar videl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-ng-fullstack's Issues

Syntax error fails install

$ yo ng-fullstack
C:\Users\trist\AppData\Roaming\npm\node_modules\generator-ng-fullstack\app\index.js:3
const yeoman = require('yeoman-generator');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.defineProperty.get as ng-fullstack:app
at Store.get (c:\Users\trist\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\store.js:64:35)
at Environment.get (c:\Users\trist\AppData\Roaming\npm\node_modules\yo\node_modules\yeoman-environment\lib\environment.js:228:16)

Separate README (Go vs io.js)

Maybe have it in the wiki?

Having the Readme with a few info and having the wiki handling the io.js and Go config and steps to get it working.

Gulp Error: Unrecognised input. Possibly missing opening

When I run gulp in the root of the project I get this error:

[17:08:08] Working directory changed to ~/Code/time-tracker
[17:08:09] Using gulpfile ~/Code/time-tracker/gulpfile.js
[17:08:09] Starting 'del_temp'...
[17:08:09] Finished 'del_temp' after 4.51 ms
[17:08:09] Starting 'partials:temp'...
[17:08:09] Starting 'views:temp'...
[17:08:09] Starting 'imgs:temp'...
[17:08:09] Starting 'fonts:temp'...
[17:08:09] Starting 'html,css,js:temp'...
[17:08:09] Starting 'bower'...
[17:08:09] Starting 'browser_sync'...
[17:08:09] Finished 'browser_sync' after 279 μs
[17:08:09] Finished 'partials:temp' after 78 ms
[17:08:09] Finished 'fonts:temp' after 72 ms

/Users/jvanderdoes/Code/time-tracker/node_modules/gulp-less/node_modules/accord/node_modules/when/lib/decorators/unhandledRejection.js:80
        throw e;
              ^
Error: Unrecognised input. Possibly missing opening '{' in file /Users/jvanderdoes/Code/time-tracker/css/styles.min-04deeee6.css line no. 5

I'm not very familiar with gulp, but it appears the less task is attempting to glob a directory that isn't there with this line var _less = DEV_DIR + 'css/**/*.less';.

dynamic roles based authorisation

I would also suggest to include connect-roles. I'm sure that I'm not the only one who has to use roles in their projects. It mixes in perfectly with passport.

I'm sure it would help a lot of projects

proposed tech stack for this generator

Hey,
While this repo is in an embryonic state, I thought I'm make an issue for discussing what new tech to include. Give the impending dawn of es6, I think it would make sense to do things in an es6 type of when possible. With that in mind, I propose using

jspm - http://jspm.io (Check out this video https://www.youtube.com/watch?v=iukBMY4apvI , I cannot recommend it enough.)
traceur
es6 promises ( http://www.html5rocks.com/en/tutorials/es6/promises/ )
es6 modules ( http://www.2ality.com/2014/09/es6-modules-final.html )

Directory structure

I open a new issue from the discussion started in #14 (Core contributors)

About the directory structure, do you see something that should be changed or do you mean to document the way modifications should be made? Or both?

Well, both ;-)

A few suggestions to consider (just some ideas, a base for discussions):

  • some files on server and client side have the same name, and it is a pain when you want to open files by name in your editor (e.g. todo.model.js, todo.dao.js)
  • todo.js contains the controller but is named todo.js (not explicit)
  • tests are separated from server and clients, is it a good idea? (look at the structure generated by https://github.com/Swiip/generator-gulp-angular)
  • why to have sub-folders with only one file inside when the file name is already explicitly named? we could have todo.controller.js, todo.model.js, todo.dao.js and todo.routes.js immediately in todo folder
  • it would be nice to organize the angular application by module, so we would create a file todo.module.js
  • could we consider to use [https://github.com/js-data/js-data] instead of ngresource - it is an data abstraction layer, very flexible (this should be discussed in a dedicated issue)
  • imgs folder is not usual, what about img or images ?

A client module could be composed of several pages/directives/filters, so the directory structure could be flat:

client/(dev)/modules/todo/todo.module.js

client/(dev)/modules/todo/todo.model.js
client/(dev)/modules/todo/todoHistory.model.js

client/(dev)/modules/todo/todo.view.page.ctrl.js
client/(dev)/modules/todo/todo.view.page.html
client/(dev)/modules/todo/todo.view.page.scss

client/(dev)/modules/todo/todo.edit.page.ctrl.js
client/(dev)/modules/todo/todo.edit.page.html
client/(dev)/modules/todo/todo.edit.page.scss

client/(dev)/modules/todo/todo-autocomplete.directive.js
client/(dev)/modules/todo/todo-autocomplete.directive.html
client/(dev)/modules/todo/todo-autocomplete.directive.scss

client/(dev)/modules/todo/todo-formatter.filterjs

For small modules, a flat hierarchy could be enough, but if the module is growing, we can split it in submodules:

client/(dev)/modules/todo/todo-list/view
client/(dev)/modules/todo/todo-list/edit
client/(dev)/modules/todo/todo/view
client/(dev)/modules/todo/todo/edit
client/(dev)/modules/todo/todo-history-view

or group the files by types:

client/(dev)/modules/todo/entities
client/(dev)/modules/todo/pages
client/(dev)/modules/todo/directives
client/(dev)/modules/todo/filters

Of course, the best would be to let the user decide, so gulp would just detect the file in the subfolders whatever their names (".module.js" file being loaded first).

Is client/dev a good name? Is not client/src better ? Or just client ?

Make browser-sync work with express server

I don't think it has to use nodemon, I'm trying to make it work with pure iojs index.

I've been having problems with the port, since I'll start express server with 3333 and browser-sync will automatically start with any number but 3333.

Not sure if proxy will help here.

SCSS over LESS?

I vote for SCSS over LESS. Then we can use Bourbon, which is an amazing mixin library that makes CSS work cake. We can use gulp-node-sass to compile it, so users do not have to have Ruby installed.

Add Google Analytics script to index.html

Just above the script tags.

<script>
       (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
       (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
       m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
       })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

       ga('create', 'UA-XXXXX-X');
</script>

One account multiple strategies

In angular-fullstack/generator-angular-fullstack#359, I shared a proposition for managing multiple authentication strategies for one account: having several account object (one for every auth strategy) for one user object.

The account object would keep the credential or the social id. Every account would be linked to the same user object after email confirmation. They would be no need for the dev to customize the model.

The user would keep the business information (name, email, age, address, etc...) needed for the app. All customization would be kept in this model.

Have option to use either: ngResource or js-data model layer

As mentioned in #16 "Bower dependencies", we should introduce an abstraction layer such as js-data.

The basic:

  • add bower dependency: js-data-angular

  • load the module 'js-data' in client app.js

  • configure the default behavior (by default use http://www.js-data.io/docs/dshttpadapter):

    DSProvider.defaults.basePath = '/api';
    DSProvider.defaults.idAttribute = '_id'; // for mongo-db

  • define resources and relations-ships:

    DS.defineResource{
    name: 'users'
    });

  • use it anywhere:

    DS.findAll('users').then(function (users) {
    $scope.users = users;
    });

The entities are cached by default so I love to use it in combination with web sockets to synchronize the cached collection with the server.

It could be a good idea to write a custom adapter to cover this case.

Store 'appName' in .yo-rc.json

While I am going through each client side file and making them conform to the style guide, I have noticed that the sub generators do not know about the application name. Therefore, they are not able to automatically have the correct module name.

I propose we utilize the Yeoman Config to save that variable (and any other required variables) inside the .yo-rc.json file.

We then can use this in all our sub generators. This will require the user to use the base generator first before using the sub generators, if we wanted to fix this we could put in another prompt in the sub generators that would ask the user for the moduleName IF we cannot find the appName inside the .yo-rc.json

Thoughts?

How about deploying on Docker

Wow m excited to have found this i have been using https://github.com/DaftMonk/generator-angular-fullstack as my primary generator to start any project , but it is now almost dead

I found this while researching for my new generator. ng-fullstack looks kinda hot & promising , but not production ready according to me , while features are being added to this generator i wanted to suggest to integrate Docker with generator for deploying

thanks

SyntaxError: Use of const in strict mode

Ran:
yo ng-fullstack

And got the result below. Same error happened when run with sudo

/usr/lib/node_modules/generator-ng-fullstack/app/index.js:3
const yeoman = require('yeoman-generator');
^^^^^
SyntaxError: Use of const in strict mode.
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.defineProperty.get [as ng-fullstack:app] (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:40:23)
    at Store.get (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:64:35)
    at Environment.get (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:228:16)

Gulpfile missing babel declaration, doesn't watch views

Any execution of compile:babel fails, as this line is missing and babel variable is not declared.

var babel = require('gulp-babel');

Also, page doesn't reload on changes in views' html, because _views variable (although declared) doesn't seem to be added to _watchable array.

 _watchable.push(_views);

Finally, I believe that first task executed upon changes (on watch) should be del_temp instead of compile:babel. It doesn't really make sense in that context and throws ENOENT on file changes, since the previous __tmp was not deleted.

return gulp.watch(_watchable, ['compile:babel', 'bower', 'build_temp', 'browser_sync']);
->
return gulp.watch(_watchable, ['del_temp', 'bower', 'build_temp', 'browser_sync']);

These changes fixed the errors I was having with live updating the files.
Please, correct me if I am misunderstanding smth here.

EDIT: I submitted a pull request for your convenience.

Bower depencies

I'm opening this issue to gather some dependencies consideration:

  • js-data instead of ngresource - it is an data abstraction layer, very flexible (proposed by @Toub)
  • a0-angular-storage instead of ngCookie: uses localStorage by default, Lets you save JS Objects, etc.
  • angulartics for full path tracking with Google Analytics
  • angular-messages

Core contributors

Hello, guys!

As discussed in angular-fullstack/generator-angular-fullstack/issues/884, I'd like to open an organization and make things move forward. Right now, what I have here was based on my needs when I created - there's nothing written in stone - feel free to be creative.

Bring in some ideas, good or bad, we'll discuss it all!

As for this issue, I'd like to know who I can count with for the core team. Of course we won't have all the time to create/fix stuff, but I believe we can do great things.

cc: @honkskillet, @justingreenberg, @jgodi, @Toub, @dmarcelino, @remicastaing, @khwerhahn

PS: Let me know if there's someone else who might be interested in helping =]

Update to Babel6

And make it local.

{
  "name": "babel6",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "mocha test/*.js --require babel-core/register",
    "compile": "babel index.es6 -o index.js"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-cli": "^6.1.18",
    "babel-preset-es2015": "^6.1.18",
    "babel-preset-stage-0": "^6.1.18",
    "chai": "^3.4.1",
    "mocha": "^2.3.4"
  }
}

Project created in parent directory

I'm not sure if I'm missing something, but when I run the generator the project is created in the parent. For example,

mkdir /tmp/whoop
cd /tmp/whoop
yo ng-fullstack

The project is created in /tmp

Improve tests

Ideas:

  • Check how to test deep file trees
  • Mock user inputs and check file contents

v1.1.0 Errors

I saw this from the other full stack generator and wanted to try it out (great work!). After installing everything and running the command:

yo ng-fullstack

It errored out at:

AssertionError: /usr/local/lib/node_modules/generator-ng-fullstack/app/templates/.gitignore doesn't exist

The v1.1.0 release doesn't have the .gitignore file in the templates. Do you mind pushing a new release?

Also, what are you thoughts and ideas on this? I would love to contribute and use this more!

server.ts won't start

node index throws error. I guess the server.ts isn't being transpiled

node index

module.js:339
throw err;
^

Error: Cannot find module './server/server'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/Users/mads/Desktop/test/index.js:1:63)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:457:10)

The new generator-ng-fullstack seems to be broken. Asking for XCode

This project looks really great, and I am now using it instead of DaftMonks angular-fullstack.

I installed an earlier version of generator-ng-fullstack that I downloaded on 04-16-2015 and everything ran perfectly and I got the expected ToDo app

I saw that you updated the generator-ng-fullstack-master a few days ago with new features and I donwloaded it again today: 06-04-2015.

I updated generator by again running: npm install -g generator-ng-fullstack
That seemed to intall OK.

But when I again ran: yo ng-fullstack
I got both a popup error (screenshot attached) and the following error detail messsage in the terminal

"Additional error details:
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools."

(https://cloud.githubusercontent.com/assets/41196/7980254/00d3a346-0a74-11e5-8817-ad3d36e5c3fc.png)

Please advise. I have zip files for both of the generator versions, if that is helpful:

generator-ng-fullstack_04-16-2015.zip
generator-ng-fullstack_06-04-2015.zip

Thanks again for your work on this great project!!

go projects don't work

I was able to create a go project, and was able to make it run by manually removing hte githib imports in main.go. None of the tests work due to invalid imports in the todo classes Ex:
go test ./... -cover -bench .

api/todo/routes/todoroutes.go:4:2: invalid import path: "github.com/<%= username %>/<%= appName %>/server/api/todo/controller"

If I try to add my own endpoint following the documentation:

yo ng-fullstack:endpoint skate --feature skateboard
module.js:338
throw err;
^
Error: Cannot find module '../known-paths'
at Function.Module._resolveFilename (module.js:336:15)

It seems to have a missing nodejs dependency.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.