com.github.gwtbootstrap.client.ui.resources.awesomize.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gwt-bootstrap Show documentation
Show all versions of gwt-bootstrap Show documentation
A GWT Library that provides the widgets of Twitter Bootstrap.
The newest version!
// node.js helper script to read in font-awesome.css and print out Java enums
// for icon classes
//
// usage:
// node awesomize.js /path/to/font-awesome.css
//
// @author Sven Jacobs
var fs = require('fs'),
file = process.argv[2],
regex = /^\.icon-([^:]+):before/m;
fs.readFile(file, 'UTF-8', function (err, data) {
if (err) throw err;
var lines = data.split('\n'),
result = [];
lines.forEach(function (line) {
var match = regex.exec(line);
if (match) {
result.push(match[1].toUpperCase().replace(/-/g, '_') + '("' + match[1] + '"),');
}
});
result.sort();
result.forEach(function (item) {
console.log(item);
});
});
© 2015 - 2024 Weber Informatics LLC | Privacy Policy