In this article I’m happy to introduce brand new JBoss Bower Tools:
Bower is a front-end package manager which works by fetching and installing frameworks, libraries, assets. It offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. Bower provides declarative dependency management (dependencies are declared and tracked in a manifest file, bower.json
).
Pre-Requirements
JBoss Bower Tools fall back on native Node.js and Bower calls. Hence, the following software must be pre-installed:
-
Node.js
-
npm
-
Bower
Installation instructions for Node.js and npm can be found here. Bower is a command line utility which is installed via npm command npm install -g bower
|
And then of course latest build of JBoss Tools for Mars.
Quick Start Guide
For now only init and update commands of Bower API are supported. In order to initialize Bower one need to select File → New… → Other… and choose "Bower Init" wizard:
This wizard helps to create bower.json
file depending on set of preferences:
After pressing "Finish" button bower.json
will be created under specified directory:
In order to add new dependencies one need to specify them in bower.json
:
For updating dependencies user should right-click on the bower.json
→ Run As… → Bower Update
In most cases Bower and Node.js will be detected in the system automatically. However, if the detection failed warn dialog will be shown for specifying location in preferences: |
"Bower Update" launch shortcut makes a native call which will install required packages or update them to the newest version according to bower.json
:
Specified packages will be created under bower_components
folder after "Bower Update" execution:
Basically, that is all - one can now use those packages for future front-end development.
Demo
Here is a short demo video which describes a basic use case of JBoss Bower Tools:
How to give it a go ?
Bower support will be available in 4.3.0.Beta2
release and above. You can also use our nightly update site in order to try Bower Tools (JBoss Tools JavaScript Tools
category) before the official release:
Conclusion
We are trying our best to make our tools as good as possible. User feedback is what we are seeking for now. We look forward to hearing your comments, remarks and proposals.
Have fun!
Ilya Buziuk
@ilyabuziuk