0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-10 22:24:19 +01:00

Merge pull request #15569 from twbs/fix-15127

Document usage of npm package
This commit is contained in:
Chris Rebert 2015-01-14 18:52:17 -08:00
commit e10dbcd02e

View File

@ -44,6 +44,16 @@
<p>You can also install and manage Bootstrap's Less, CSS, JavaScript, and fonts using <a href="http://bower.io">Bower</a>:</p> <p>You can also install and manage Bootstrap's Less, CSS, JavaScript, and fonts using <a href="http://bower.io">Bower</a>:</p>
{% highlight bash %}$ bower install bootstrap{% endhighlight %} {% highlight bash %}$ bower install bootstrap{% endhighlight %}
<h3 id="download-npm">Install with npm</h3>
<p>You can also install Bootstrap using <a href="https://www.npmjs.com">npm</a>:</p>
{% highlight bash %}$ npm install bootstrap{% endhighlight %}
<p><code>require('bootstrap')</code> will load all of Bootstrap's jQuery plugins onto the jQuery object. The <code>bootstrap</code> module itself does not export anything. You can manually load Bootstrap's jQuery plugins individually by loading the <code>/js/*.js</code> files under the package's top-level directory.</p>
<p>Bootstrap's <code>package.json</code> contains some additional metadata under the following keys:</p>
<ul>
<li><code>less</code> - path to Bootstrap's main <a href="lesscss.org">Less</a> source file</li>
<li><code>style</code> - path to Bootstrap's non-minified CSS that's been precompiled using the default settings (no customization)</li>
</ul>
<h3 id="download-autoprefixer">Autoprefixer required for Less/Sass</h3> <h3 id="download-autoprefixer">Autoprefixer required for Less/Sass</h3>
<p>Bootstrap uses <a href="https://github.com/postcss/autoprefixer">Autoprefixer</a> to deal with <a href="http://webdesign.about.com/od/css/a/css-vendor-prefixes.htm">CSS vendor prefixes</a>. If you're compiling Bootstrap from its Less/Sass source and not using our Gruntfile, you'll need to integrate Autoprefixer into your build process yourself. If you're using precompiled Bootstrap or using our Gruntfile, you don't need to worry about this because Autoprefixer is already integrated into our Gruntfile.</p> <p>Bootstrap uses <a href="https://github.com/postcss/autoprefixer">Autoprefixer</a> to deal with <a href="http://webdesign.about.com/od/css/a/css-vendor-prefixes.htm">CSS vendor prefixes</a>. If you're compiling Bootstrap from its Less/Sass source and not using our Gruntfile, you'll need to integrate Autoprefixer into your build process yourself. If you're using precompiled Bootstrap or using our Gruntfile, you don't need to worry about this because Autoprefixer is already integrated into our Gruntfile.</p>
</div> </div>