如何将Bootstrap包添加到我的meteor应用程序?

时间:2015-08-21 15:35:48

标签: twitter-bootstrap meteor

我想也许默认情况下可能会将bootstrap添加到新的meteor应用程序中;试图验证,我用过:

C:\Meteor\scheduler>meteor list

......它又回来了:

autopublish      1.0.3  Publish the entire database to all clients
insecure         1.0.3  Allow all database writes by default
meteor-platform  1.2.2  Include a standard set of Meteor packages in you...

那么流星平台是什么?我试过了:

C:\Meteor\scheduler>meteor show meteor-platform

......得到了:

Package: meteor-platform@1.2.2
Maintainers: mdg
Implies: blaze, check, ddp, deps, ejson, fastclick (web.cordova), jquery,
         launch-screen (web.browser, web.cordova), livedata, logging,
         meteor, mobile-status-bar (web.cordova), mongo, random, session,
         spacebars, templating, tracker, ui, underscore, webapp

This package is added to every app by `meteor create`. It includes a set
of common packages that most Meteor apps will find useful, such as
`webapp`, `tracker`, `session`, `ddp`, `mongo` and `blaze`. From the
command line, you can run `meteor show meteor-platform` to see the full
list of implied packages.

These packages make up the official [Meteor
Platform](https://www.meteor.com/projects). See the README of each
individual package to learn more about it.

This package was previously known as
[standard-app-packages](https://atmospherejs.com/meteor/standard-app-packages).

Recent versions:
  1.1.1  September 25th, 2014
  1.1.2  October 13th, 2014
  1.2.0  October 28th, 2014
  1.2.1  December 19th, 2014
  1.2.2  March 17th, 2015      installed

Older and pre-release versions of meteor-platform have been hidden. To see
all 49 versions, run 'meteor show --show-all meteor-platform'.

所以,我尝试了#34; show-all"命令并得到:

Package: meteor-platform@1.2.2
Maintainers: mdg
Implies: blaze, check, ddp, deps, ejson, fastclick (web.cordova), jquery,
         launch-screen (web.browser, web.cordova), livedata, logging,
         meteor, mobile-status-bar (web.cordova), mongo, random, session,
         spacebars, templating, tracker, ui, underscore, webapp

This package is added to every app by `meteor create`. It includes a set
of common packages that most Meteor apps will find useful, such as
`webapp`, `tracker`, `session`, `ddp`, `mongo` and `blaze`. From the
command line, you can run `meteor show meteor-platform` to see the full
list of implied packages.

These packages make up the official [Meteor
Platform](https://www.meteor.com/projects). See the README of each
individual package to learn more about it.

This package was previously known as
[standard-app-packages](https://atmospherejs.com/meteor/standard-app-packages).

Versions:
  0.0.0-glasser-isopacket.0  November 6th, 2014
  0.0.1                      August 29th, 2014
  1.0.1-glasser1             September 4th, 2014
  1.0.1-rc0                  August 28th, 2014
  1.0.1-rc1                  September 1st, 2014
  1.0.1                      September 4th, 2014
  1.0.2                      September 6th, 2014
  1.0.3-ekate                September 11th, 2014
  1.1.0-rc0                  September 2nd, 2014
  1.1.0-rc1                  September 9th, 2014
  1.1.0-rc2                  September 10th, 2014
  1.1.0                      September 15th, 2014
  1.1.1-rc0                  September 19th, 2014
  1.1.1                      September 25th, 2014
  1.1.2-nim.1                October 8th, 2014
  1.1.2-pre.0                September 30th, 2014
  1.1.2-pre.1                October 1st, 2014
  1.1.2-pre.2                October 1st, 2014
  1.1.2-pre.3                October 3rd, 2014
  1.1.2-pre.4                October 3rd, 2014
  1.1.2-rc.0                 October 7th, 2014
  1.1.2-refreshpolicy.1      October 17th, 2014
  1.1.2                      October 13th, 2014
  1.2.0-rc.0                 October 17th, 2014
  1.2.0-win.0                November 17th, 2014
  1.2.0                      October 28th, 2014
  1.2.1-eachin.0             March 1st, 2015
  1.2.1-ipc.0                November 22nd, 2014
  1.2.1-rc.1                 December 11th, 2014
  1.2.1-slava.0              January 8th, 2015
  1.2.1-win.0                December 1st, 2014
  1.2.1-winr.0               December 18th, 2014
  1.2.1-winr.1               January 20th, 2015
  1.2.1-winr.2               January 20th, 2015
  1.2.1-winr.3               January 20th, 2015
  1.2.1                      December 19th, 2014
  1.2.2-eachin.43            March 1st, 2015
  1.2.2-githubble.0          February 16th, 2015
  1.2.2-githubble.1          February 16th, 2015
  1.2.2-githubble.42         February 16th, 2015
  1.2.2-githubble.43         February 16th, 2015
  1.2.2-rc.0                 March 5th, 2015
  1.2.2-winr.0               January 13th, 2015
  1.2.2-winr.1               January 14th, 2015
  1.2.2-winr.3               February 24th, 2015
  1.2.2                      March 17th, 2015      installed
  1.2.3-galaxy.0             July 17th, 2015
  1.2.3-plugins.0            July 22nd, 2015
  1.2.3-rc.0                 August 10th, 2015

在任何地方都没有引导程序,所以我试过了:

C:\Meteor\scheduler> meteor add bootstrap

...但是错误的是"没有这样的包"

那么......我怎样才能将Bootstrap包添加到我的meteor应用程序中?

4 个答案:

答案 0 :(得分:2)

您需要运行Router.route("/activity/:_id", { name: "activityPage", waitOn: function () { return [Meteor.subscribe("singleActivity", this.params._id), Meteor.subscribe("locations",this.params._id)]; }, data: function () { return Activities.findOne(this.params._id); } }); 将预编译的bootstrap css添加到项目中。

如果您打算使用LESS,并希望能够更好地控制如何以及何时编译引导程序并将其链接到您的应用程序,我建议使用LESS插件的组合({{1} })和自定义引导程序包meteor add twbs:bootstrap。查看后者here的文档。

如果您需要使用其他框架或库,您可以随时查看atmospherejs社区,了解是否已存在meteor包以及如何添加它。

答案 1 :(得分:1)

我看到GPicazo正在上面。我同意只输入meteor add twbs:bootstrap。此外https://atmospherejs.com/是查找套餐的好地方。你甚至可能会找到一些你想要的当前项目或未来的项目。

答案 2 :(得分:1)

您对Meteor软件包的任何疑问一般会在一秒钟后回答https://atmospherejs.com

答案 3 :(得分:1)

您可以添加它 meteor add twbs:bootstrap

然后你可以像往常一样在你的javascript / css / html中编写bootstrap代码。就这么简单。