官术网_书友最值得收藏!

Scaffolding in MeteorJS

As I have mentioned earlier, there is no built-in scaffolding in MeteorJS. However, there are tools that help us scaffold our application. Although there are a few tools to serve the purpose, we will look into iron-cli (https://github.com/iron-meteor/iron-cli), which is a scaffolding tool from the makers of the popular package iron-router. It is a Node.js module and is still growing; so, we have to watch out for the releases carefully. The iron-cli must be installed from NPM using the following command:

npm install -g iron-meteor

Let me tell you what exactly iron-cli does. It provides command-line utilities to scaffold. Instead of using MeteorJS commands directly such as meteor create myapp, we will use the iron-cli commands to generate the application. The iron-cli wraps the MeteorJS application inside it and provides us the ability to manage the application. Let's try it out.

After installing iron-meteor using the preceding NPM command, try iron help in the terminal. It should show the list of commands available to run the generator options, as shown in the following screenshot:

The iron-cli actually proxies most of the meteor commands and so we will use commands such as iron add <package>, iron remove <package>, iron run, iron list, and so on. These commands will internally call the MeteorJS commands. The reason for this proxying is to keep track of the application changes so that iron-cli can take full control of the application.

Let's start recreating the same application that we did in the previous chapter, but using all these advanced techniques. Recreating the same application will help you relate things and understand how much we have improved things.

主站蜘蛛池模板: 章丘市| 古丈县| 奉化市| 揭东县| 玉林市| 嘉兴市| 大化| 托克逊县| 博客| 奇台县| 鄯善县| 铜梁县| 肥城市| 阜城县| 祁门县| 元谋县| 武城县| 根河市| 碌曲县| 济宁市| 延吉市| 汶川县| 台安县| 罗定市| 西安市| 扶绥县| 平乡县| 漳浦县| 荆门市| 黔南| 成武县| 正安县| 建水县| 永年县| 宝应县| 泰顺县| 临沂市| 清丰县| 武穴市| 濮阳县| 福清市|