OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/vendor/openproject-icon-font/generate.js

27 lines
1.0 KiB

#!/usr/bin/env node
const webfontsGenerator = require('webfonts-generator');
const path = require('path');
const fs = require('fs');
const glob = require("glob")
webfontsGenerator({
files: glob.sync("src/*.svg"),
"fontName": "openproject-icon-font",
"cssFontsUrl": "../../frontend/src/assets/fonts/openproject_icon/",
"dest": path.resolve(__dirname, '..', '..', 'frontend', 'src', 'assets', 'fonts', 'openproject_icon'),
"cssDest": path.join(path.resolve(__dirname, '..', '..', 'frontend', 'src', 'global_styles', 'fonts'), '_openproject_icon_definitions.scss'),
"cssTemplate": "openproject-icon-font.template.scss",
"classPrefix": "icon-",
"baseSelector": ".icon",
"html": true,
"htmlDest": path.join(path.resolve(__dirname, '..', '..', 'frontend', 'src', 'global_styles', 'fonts'), '_openproject_icon_font.lsg'),
"htmlTemplate": "openproject-icon-font.template.lsg",
"types": ['woff2', 'woff'],
"fixedWidth": true,
"descent": 100
}, function(error) {
if (error) {
console.log('Failed to build icon font. ', error);
}
});