Sha256: d232eaa0290fd37e6e6aaa8801b0f4f2989e4b6d75028a10d85a7cb8a3c6d750

Contents?: true

Size: 905 Bytes

Versions: 5

Compression:

Stored size: 905 Bytes

Contents

# Bower Integration

Utopia integrates with Bower and provides a rake task to improve deployment of `dist` code.

By default, utopia includes a `.bowerrc` file which installs modules into `lib/components`. This code can then be copied into `public/_components` using `rake bower:update`.

## Installing jQuery

Firstly install jquery using bower:

	$ bower install jquery

Copy the distribution scripts to `public/_components`:

	$ rake bower:update

Then add the appropriate `<script>` tags to `pages/_page.xnode`:

	<script src="/_components/jquery/jquery.min.js" type="text/javascript"></script>

## What does `rake bower:update` do?

This task copies only the contents of the dist directory. This ensures that you only get files intended for distribution. If the bower package doesn't have a `dist` directory, the entire contents is copied.

<listing rel="site" src="tasks/bower.rake" brush="ruby" />

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
utopia-1.9.11 documentation/pages/wiki/bower-integration/content.md
utopia-1.9.10 documentation/pages/wiki/bower-integration/content.md
utopia-1.9.9 documentation/pages/wiki/bower-integration/content.md
utopia-1.9.7 documentation/pages/wiki/bower-integration/content.md
utopia-1.9.6 documentation/pages/wiki/bower-integration/content.md