📜 ⬆️ ⬇️

Yeoman express stack

image
Note Perev .: instead of a short news https://plus.google.com/115133653231679625609/posts/YDNbxVxi4er decided to translate the dock for this fork.

Yeoman Express Stack is fork Yeoman ( comment perev .: article on Habré ).
The fork was created to prove the ability to develop a full stack (client-server) using Yeoman 0.9.6, Express and AngularJS. Note: this is an experimental branch and (for now) is only suitable for testing and running in the concept.
Includes:


It is assumed that you will locate the code and the client and server parts of the application in the same directory. After installation, you can see the structure of the built-in test application: the server directory for the server side of the application and the app directory for the client side.

Components


')
Installation (assuming Yeoman@0.9.6 is already installed)

Clone repository

 git clone git://github.com/yeoman/yeoman.git cd yeoman git checkout express-stack 


Install Yeoman@0.9.6 and Grunt
 npm install -g yeoman npm install -g grunt 


Then from the express-stack directory execute:
  1. npm install
  2. grunt install
  3. follow the prompts from step 2 and update the system paths
  4. Now you have a new yeomen team (noticed e instead of a in yeoman ? - e means express ); This command can run a separate copy of yeoman to use the new generators listed below.


Let's start

After the installation process is completed, you have two options - you can start a new application using the commands listed below, or go to the demo, which already has a small sample code so that you can try the finished project.
 yeomen init angularcrud #   Angular yeomen init angularcrud:crud post # Angular CRUD routes/views yeomen init express post # Express CRUD yeomen server #      #/api/post/index   #      Express 

Note: If there are errors that Express is not installed, run npm install express .

Demo

Now you can go to the demo directory and run the yeomen server command to start this application. If you have several versions of yeoman locally installed, you can use yeoman-custom directly, but in general it should work this way.

And finally the generators. The following are supported:
 Angularcrud: angularcrud:all angularcrud:app angularcrud:common angularcrud:controller angularcrud:crud angularcrud:crud-controller angularcrud:crud-route angularcrud:crud-view angularcrud:directive angularcrud:filter angularcrud:route angularcrud:service angularcrud:view Express: express:all express:crud 

More details about each can be found in USAGE .

The authors

@addyosmani, @blai, @jacobmumm, @mklabs

Note trans.
You can put together an opinion about how convenient Yeoman is to develop applications on AngularJS by video (video is long but interesting; the process of creating a simple store is shown):

( watch from 13:40 )
http://youtu.be/XOmwZopzcTA?t=13m40s .
In any case, I emphasize that the video uses the usual Yeoman assembly, and only the client part is developed.

Source: https://habr.com/ru/post/166835/


All Articles