如何通过作曲家下载后设置启动? [英] How to setup bootstrap after downloading via composer?

查看:106
本文介绍了如何通过作曲家下载后设置启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用作曲家,我对此非常了解,并且对网络应用程序开发有一些经验。



我只是走过了< a href =http://net.tutsplus.com/tutorials/javascript-ajax/combining-laravel-4-and-backbone/ =nofollow> Nettuts + 教程,因此我有一个基本问题关于作曲家。

  {
require:{
laravel / framework: *,
way / generators:dev-master,
twitter / bootstrap:dev-master,
conarwelsh / mustache- master
},
require-dev:{
phpunit / phpunit:3.7。*,
mockery / mockery:0.7。
},
autoload:{
classmap:[
app / commands,
app / controllers,
/ models,
app / database / migrations,
app / database / seeds,
app / tests / TestCase.php
]
},
scripts:{
post-update-cmd:php artisan optimize
},
minimum-stability:dev
}

如果我如上设置我的 composer.json composer install --dev ,如何让Laravel项目中使用引导程序?



意思是,我可以看到bootstrap包被下载到vendor目录。之前我只是从它的官方网站下载bootstrap,并手动将文件放在Laravel的公共目录,但在这个时候什么是正确的方法这样做?



感谢。

div class =h2_lin>解决方案

我们有artisan命令发布资源(CSS,JS,..)。这样的东西应该可以工作。

  php artisan asset:publish --path =vendor / twitter / bootstrap / bootstrap / css bootstrap / css 
php artisan asset:publish --path =vendor / twitter / bootstrap / bootstrap / jsbootstrap / js

我不知道路径..但​​这应该工作。


I'm just beginning to using composer, I know so little about it and have a little experience with web application development.

I just had a walk through Nettuts+ Tutorial, so I have a basic question about composer.

{
  "require": {
    "laravel/framework": "4.0.*",
    "way/generators": "dev-master",
    "twitter/bootstrap": "dev-master",
    "conarwelsh/mustache-l4": "dev-master"
  },
  "require-dev": {
    "phpunit/phpunit": "3.7.*",
    "mockery/mockery": "0.7.*"
  },
  "autoload": {
    "classmap": [
      "app/commands",
      "app/controllers",
      "app/models",
      "app/database/migrations",
      "app/database/seeds",
      "app/tests/TestCase.php"
    ]
  },
  "scripts": {
    "post-update-cmd": "php artisan optimize"
  },
  "minimum-stability": "dev"
}

If I setup my composer.json as above, after executing composer install --dev, how do I get bootstrap to be available for use in the Laravel project?

I mean, I can see the bootstrap package is downloaded to the vendor directory. Before I only used to download bootstrap from it's official website and manually put the files in the public directory of Laravel, but at this time what is the right way to do this? Can I leave the bootstrap files where they are, because I wish to update the bootstrap package to it's latest version periodically?

Thanks.

解决方案

We have artisan command to publish the assets(CSS, JS,..). Something like this should work.

php artisan asset:publish --path="vendor/twitter/bootstrap/bootstrap/css" bootstrap/css
php artisan asset:publish --path="vendor/twitter/bootstrap/bootstrap/js" bootstrap/js

i am not sure about the path.. But this should work.

这篇关于如何通过作曲家下载后设置启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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