【问题标题】:Get only the compiled bootstrap css/js using bower or npm?仅使用 bower 或 npm 获取已编译的引导 css/js?
【发布时间】:2014-05-08 00:02:20
【问题描述】:

我愿意但不希望在使用它们之前不必添加 gruntfile 来将引导 LESS 编译成 css。我也是一个命令行型的人,我想知道是否有一个特殊的 bootstrap 3 发行版,它只附带编译后的 javascript 和 css,我可以使用 bower 或 grunt 安装?

现在,我正在从网上下载编译好的东西。只是想知道:)

【问题讨论】:

    标签: npm bower bower-install


    【解决方案1】:

    根据https://github.com/twbs/bootstrap/issues/10313运行bower install bootstrap应该安装:

    • dist 目录中的文件;
    • js目录下的文件;
    • less 目录下的文件;
    • bower.json 文件;
    • README.md 文件;
    • 许可证文件。

    确实安装了 3.3.4:

    ├── bower.json
    ├── dist
    ├── fonts
    ├── grunt
    ├── Gruntfile.js
    ├── js
    ├── less
    ├── LICENSE
    ├── package.js
    ├── package.json
    └── README.md
    

    确实,Grunt 构建系统和 Less 文件是一些“开销”。如果您只想安装来自 /dist 的文件(包括编译后的 CSS 和 JS,包括 glyphicons-halflings 的字体),您应该阅读 Bower - How to install jquery.js only and not the whole package? 并查看 https://www.npmjs.com/package/bower-installer

    也可以看看https://www.npmjs.com/package/grunt-bower

    【讨论】:

    • 当然不习惯!
    猜你喜欢
    • 2014-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-22
    • 1970-01-01
    • 1970-01-01
    • 2019-12-16
    • 2015-07-26
    相关资源
    最近更新 更多