哟Meanjs没有创建应用程序文件夹 [英] yo meanjs not creating app folder

查看:118
本文介绍了哟Meanjs没有创建应用程序文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是初学者.

我已按照以下步骤创建了meanjs应用程序:

I have followed the following steps to create meanjs app :

  1. 已安装节点v0.12.7

  1. installed node v0.12.7

npm install -g bower

npm install -g bower

npm install -g grunt-cli

npm install -g grunt-cli

包含平均目录的MyApp文件夹已创建

您的均值1发生错误

请提供解决方案.我在第一阶段就感到震惊.我需要尽快开始.

Please provide a solution . I am struck at the first phase. I need to get started as sson as possible .

推荐答案

版本0.4.*具有不同的文件夹结构.您正在遵循的教程可能使用的是Meanjs的早期版本.您可以在这里找到新结构- http://www.bossable.com/954/version-0-4-0/她将结构与较旧的结构进行了比较.我遇到了同样的问题.遵循这些教程,将对您有很大的帮助.

Version 0.4.* has different folder structure. The tutorial you are following is probably using earlier version of meanjs. You can find the new structure here-http://www.bossable.com/954/version-0-4-0/ She has compared the structure with the older one. I was going through the same problem. Follow these tutorials, it will be of great help.

在Mean.s的0.4.*版本中,以下目录已更改; 0.4.2仍然不稳定.推荐0.4.0和0.4.1的初学者使用MEAN.

The following directories have been changed in the 0.4.* versions of Meanjs; 0.4.2 is still unstable. 0.4.0 and 0.4.1 is recommended for beginners to get on MEAN.

-已添加新文件

1) gulpfile.js -Gulp的速度要比grunt快,因为gulp专注于代码而不是配置.它使用node.js的流,并且执行速度更快,因为它不会一直打开/关闭文件或创建中间副本.在此文件中会立即注意到缺少任何前期配置,尤其是没有指定源和目标的情况. 2) protractor.conf.js -用于在angularjs应用程序中进行端到端测试的支持文件. (很整洁).

1) gulpfile.js-Gulp is relatively faster than grunt because gulp focuses on code rather than cofiguration. It uses node.js’ streams, and executes faster, since it does not open/close files, or create intermediary copies all the time. The lack of any up-front configuration, especially, specifying a source and destination is noticed immediately in this file. 2) protractor.conf.js-Support file for end-to-end testing in angularjs applications. (Pretty Neat.)

app文件夹已删除,这是新手遵循较早的教程尝试使用MEANjs的主要问题.控制器,视图,模型现在移到名为 modules 的单独文件夹中,该文件夹以前位于 public 文件夹中. 您可以浏览项目的模块/核心/服务器和模块/用户/服务器

The app folder is removed, which is the major concern for the noobs trying their hands on MEANjs following the older tutorials. Controllers,views, models are now moved into a separate folder called modules which was previously in the public folder. You can explore modules/core/server and modules/user/server of your project

添加客户端服务器测试.现在,所有客户端角度都在modules/core/client中,这使得在一个位置更容易访问应用程序不同模块的所有服务和指令.并且所有后端或服务器端文件都移至modules/core/server.

Addition of client, server and test in modules/core and modules/user folder. All the client side angular will now be in the modules/core/client making it easier to access all services and directives of different modules of the application at one place. And all the backend or server-side files goes to modules/core/server.

public/application.jspublic/config.js现在是modules/core/client/app文件夹中的config.js和init.js.

public/application.js and public/config.js are now config.js and init.js in modules/core/client/app folder.

config 文件夹被拆分,并添加了新文件夹资产 lib . 先前的env文件夹已分为 env 资产.所有的引用,mongodb端口,会话密钥都转到environment(env),而我们在项目中定义的新库转到资产.例如,将在asset/default.js中定义新的CSS,sass或更少的引用. config.js init.js 合并到一个文件config/config.js中. lib 包含express.js,mongoose.js和socket.io.js.

config folder is split and new folders assets and lib are added. The previous env folder have been split into env and assets. All the references, mongodb port, session keys goes to the environment(env) whereas new libraries we are defining into our project goes to assets. For instance new css, sass or less reference will be defined into asset/default.js. config.js and init.js are merged into one file config/config.js. lib contains express.js, mongoose.js and socket.io.js.

node_modules 与meanjs的先前版本几乎完全相同. 这些是文件夹结构的主要变化.新模型和控制器会根据您的应用程序添加到modules/users/server中,这样您在开发项目时就不会迷路.

node_modules is pretty much exactly the same as the previous versions of meanjs. These are the major changes in the folder structure. New models and controllers are added into the modules/users/server according to your application, just so you don't get lost while developing your project.

这篇关于哟Meanjs没有创建应用程序文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆