Cal*_*eng 11 twitter-bootstrap
所以我试图从源代码git://github.com/twitter/bootstrap.git"构建"twitter bootstrap,然后我将它克隆到我的本地机器上.
显然,在我的本地机器上,我安装了nodejs和npm,并且安装了所需的节点包和uglify-js.并且所有节点模块都在我的系统路径中,因此我的终端中可以使用"lessc"和"uglifyjs"命令.
进入bootstrap的根目录,我运行"make",这是输出: -
(luc)calvins-MacBook.local ttys002 Fri Feb 03 10:51:29 |~/work/luc/static/bootstrap|
calvin$ make
mkdir -p bootstrap/img
mkdir -p bootstrap/css
mkdir -p bootstrap/js
cp img/* bootstrap/img/
lessc ./less/bootstrap.less > bootstrap/css/bootstrap.css
lessc --compress ./less/bootstrap.less > bootstrap/css/bootstrap.min.css
lessc ./less/responsive.less > bootstrap/css/bootstrap.responsive
lessc --compress ./less/responsive.less > bootstrap/css/bootstrap.min.responsive
cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js > bootstrap/js/bootstrap.js
uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.js
zip -r docs/assets/bootstrap.zip bootstrap
updating: bootstrap/ (stored 0%)
updating: bootstrap/css/ (stored 0%)
updating: bootstrap/css/bootstrap.css (deflated 85%)
updating: bootstrap/css/bootstrap.min.css (deflated 84%)
updating: bootstrap/css/bootstrap.min.responsive (deflated 76%)
updating: bootstrap/css/bootstrap.responsive (deflated 79%)
updating: bootstrap/img/ (stored 0%)
updating: bootstrap/img/glyphicons-halflings-white.png (deflated 4%)
updating: bootstrap/img/glyphicons-halflings.png (deflated 4%)
updating: bootstrap/js/ (stored 0%)
updating: bootstrap/js/bootstrap.js (deflated 82%)
updating: bootstrap/js/bootstrap.min.js (deflated 74%)
rm -r bootstrap
lessc ./less/bootstrap.less > ./docs/assets/css/bootstrap.css
lessc ./less/responsive.less > ./docs/assets/css/bootstrap-responsive.css
node docs/build
cp img/* docs/assets/img/
cp js/*.js docs/assets/js/
cp js/tests/vendor/jquery.js docs/assets/js/
cp js/tests/vendor/jquery.js docs/assets/js/
接下来我该怎么做才能在我的html页面中包含我的css文件?我没有看到构建/创建bootstrap.min.css或bootstrap.min.responsive文件的位置.似乎唯一改变的是创建了一个"bootstrap.zip",如上面运行git status所示.
(luc)calvins-MacBook.local ttys002 Fri Feb 03 10:51:35 |~/work/luc/static/bootstrap|
calvin$ git status
# Not currently on any branch.
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   docs/assets/bootstrap.zip
#
no changes added to commit (use "git add" and/or "git commit -a")
Jos*_*del 20
在任何想象中都不是这方面的专家(刚刚开始使用Twitter引导程序),但是当我刚刚运行时,我得到了与你类似的输出make.但是,如果你运行make bootstrap它生成一个文件夹bootstrap,其中包含已编译的css,据我所知:
make bootstrap
mkdir -p bootstrap/img
mkdir -p bootstrap/css
mkdir -p bootstrap/js
cp img/* bootstrap/img/
lessc ./less/bootstrap.less > bootstrap/css/bootstrap.css
lessc --compress ./less/bootstrap.less > bootstrap/css/bootstrap.min.css
lessc ./less/responsive.less > bootstrap/css/bootstrap-responsive.css
lessc --compress ./less/responsive.less > bootstrap/css/bootstrap-responsive.min.css
cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js > bootstrap/js/bootstrap.js
uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.js
新bootstrap目录(bootstrap/bootstrap)包含以下内容:
bootstrap/css:
- bootstrap-responsive.css
- bootstrap-responsive.min.css
- bootstrap.css
- bootstrap.min.css
bootstrap/img:
- glyphicons-halflings-white.png
- glyphicons-halflings.png
bootstrap/js:
- bootstrap.js
- bootstrap.min.js
这可能是文档的问题,遗漏了正确的命令,但我不确定.Makefile如果您在make没有目标的情况下发布,我对如何工作的记忆,它默认为makefile中的第一个目标.在这种情况下,该目标docs不是bootstrap.
我认为您可以将新引导程序目录的内容复制到您通常为项目放置css/js资产的位置.
| 归档时间: | 
 | 
| 查看次数: | 13375 次 | 
| 最近记录: |