DocPad plugin that mounts bower components in web server middleware
Want to see pretty graphs? Log in now!
npm install docpad-plugin-bowermount
|17||downloads in the last week|
|73||downloads in the last month|
|Last Published By|
|Version||2.4.3 last updated 9 months ago|
|Keywords||docpad, docpad-plugin, bower|
|Dependencies||underscore, bower, levenshtein-distance, requirejs, request|
bower-mount Plugin for DocPad
DocPad plugin that auto-mounts bower components and all files specified in
paths property in web server middleware (currently
only JS components). Best fits for development environment. Assumes that in
production environment JS files are bundled in static files.
It's enabled only in development environment by default
RequireJS and Bower configurations are a requirement
Make sure you have installed
bower and have RequireJS configuration file
installed and set up before you continue.
Install it from you Docpad project:
npm install docpad-plugin-bowermount --save-dev
Next time you run
docpad run your bower components will be available via web.
For example, if you installed
bower install jquery and
run creates server accessible via
http://localhost:9778 you can
jquery lib via
http://localhost:9778:/scripts/jquery.js out of the
box. However if for example you installed
you'd need to manually specify paths in your requirejs configuration file.
You'd probably want to bundle your components into static files on build
RequireJS: you can set relative path to your
configuration file in
rjsConfig (default value is
and if it exists, paths from there will be used to determine components path.
Here is an example of your
docpad.coffee with this configuration:
# ================== # Environment environments: development: plugins: bowermount: rjsConfig: 'path/to/my/requirejs/config'
You can discover the history inside the