简体   繁体   English

从Rails应用程序卸载Twitter Bootstrap

[英]Uninstalling Twitter Bootstrap from a Rails app

I recently installed Twitter Bootstrap in my Rails app via the following two steps: 我最近通过以下两个步骤在我的Rails应用程序中安装了Twitter Bootstrap:

rails g bootstrap:install

(this included Twitter Bootstrap to my app's asset pipeline) (这包括Twitter Bootstrap到我的应用程序的资产管道)

rails g bootstrap:layout application fixed

(this generated a layout for me, by default application.html.erb and fixed layout was generated) (这为我生成了一个布局,默认情况下是application.html.erb并生成了固定布局)

Should I do any of the following or all of it to remove Twitter Bootstrap completely from my app? 我是否可以执行以下任何一项操作,以完全从我的应用程序中删除Twitter Bootstrap?

  1. Delete all the files added by it in APP folder? 删除APP文件夹中添加的所有文件?

    • javascripts/bootstrap.js.coffee

    • stylesheets/bootstrap.js.coffee

    • layout/application.html.erb (edit this file?) layout/application.html.erb (编辑这个文件?)

  2. Are there other files that were created that I missed and must also remove? 是否有其他我错过的文件,还必须删除?

Try this 尝试这个

rails destroy bootstrap:install

Also, remove the gem from your gemfile 另外,从gemfile中删除gem

gem "twitter-bootstrap-rails"

If you look at the github repo for this you can see the generators and what exactly they do: 如果你看一下github repo,你可以看到生成器以及它们究竟做了什么:

https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap

The command 命令

rails g bootstrap:install

Uses the templates here: https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap/install/templates 在这里使用模板: https//github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap/install/templates

The layout command uses the templates here: https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap/layout/templates layout命令使用以下模板: https//github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap/layout/templates

Also, remove the gem from your gemfile 另外,从gemfile中删除gem

gem "twitter-bootstrap-rails"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM