Kwagura Bootstrap kugirango ukoreshe uburyo burimo imiterere nibigize, kimwe na LESS ihinduka na mixins.
Bootstrap ikozwe na LESS kumurongo wacyo, imvugo yimiterere yimiterere yakozwe ninshuti yacu nziza, Alexis Sellier . Bituma iterambere rya sisitemu ishingiye kuri CSS byihuse, byoroshye, kandi birashimishije.
Umwe mu baremye Bootstrap yanditse blog yihuse kuriyi ngingo , muri make hano:
Nukwagura CSS, LESS ikubiyemo impinduka, ivanga kubice byongeye gukoreshwa bya code, ibikorwa kubiharuro byoroheje, ibyari, ndetse nibikorwa byamabara.
Sura urubuga rwemewe kuri http://lesscss.org/ kugirango umenye byinshi.
Kubera ko CSS yacu yanditse hamwe na bike kandi ikoresha impinduka na mixin, igomba gukusanywa kugirango ishyirwe mubikorwa byanyuma. Dore uko.
Shyiramo LESS command umurongo utegura, JSHint, Ikiruhuko, na uglify-js kwisi yose hamwe npm ukoresheje itegeko rikurikira:
$ npm shyiramo -g gake jshint ikiruhuko uglify-js
Iyo umaze kwinjizamo gusa ukore make
mumuzi yububiko bwa bootstrap kandi urashizeho.
Byongeye kandi, niba ufite watchr yashizwemo, urashobora kwiruka make watch
kugirango bootstrap ihite yubaka burigihe burigihe uhinduye dosiye muri bootstrap lib (ibi ntibisabwa, gusa uburyo bworoshye).
Shyiramo igikoresho cya LESS umurongo ukoresheje Node hanyuma ukore itegeko rikurikira:
$ lessc ./less/bootstrap.less> bootstrap.css
Wemeze gushyiramo --compress
iryo tegeko niba ugerageza kubika byite!
Kuramo ibishya Less.js hanyuma ushiremo inzira igana (na Bootstrap) muri <head>
.
<ihuza rel = "urupapuro rwerekana / ruto" href = "/ inzira/to/bootstrap.less" > <inyandiko src = " / inzira /
Kugirango usubiremo dosiye .idafite, gusa uzigame hanyuma wongere usubiremo page yawe. Gito.js irabakusanya ikabika mububiko bwaho.
Porogaramu idasanzwe ya Mac ireba ububiko bwamadosiye adafite kandi ikusanya kode kumadosiye yaho nyuma yo kubika dosiye ireba. Idafite. Niba ubishaka, urashobora guhinduranya ibyo ukunda muri porogaramu yo kugabanya mu buryo bwikora kandi ni ubuhe bubiko dosiye zakozwe zirangirira.
Crunch is a great looking LESS editor and compiler built on Adobe Air.
Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.
Mac, Linux, and Windows app for drag and drop compiling of LESS files. Plus, the source code is on GitHub.
Quickly start any web project by dropping in the compiled or minified CSS and JS. Layer on custom styles separately for easy upgrades and maintenance moving forward.
Download the latest compiled Bootstrap and place into your project. For example, you might have something like this:
app/ layouts/ templates/ public/ css/ bootstrap.min.css js/ bootstrap.min.js img/ glyphicons-halflings.png glyphicons-halflings-white.png
Copy the following base HTML to get started.
- <html>
- <head>
- <title>Bootstrap 101 Template</title>
- <!-- Bootstrap -->
- <link href="public/css/bootstrap.min.css" rel="stylesheet">
- </head>
- <body>
- <h1>Hello, world!</h1>
- <!-- Bootstrap -->
- <script src="public/js/bootstrap.min.js"></script>
- </body>
- </html>
Work in your custom CSS, JS, and more as necessary to make Bootstrap your own with your own separate CSS and JS files.
- <html>
- <head>
- <title>Bootstrap 101 Template</title>
- <!-- Bootstrap -->
- <link href="public/css/bootstrap.min.css" rel="stylesheet">
- <!-- Project -->
- <link href="public/css/application.css" rel="stylesheet">
- </head>
- <body>
- <h1>Hello, world!</h1>
- <!-- Bootstrap -->
- <script src="public/js/bootstrap.min.js"></script>
- <!-- Project -->
- <script src="public/js/application.js"></script>
- </body>
- </html>