Creates a SASS list with character names and unicode from a Zapf table extracted from a TrueType font with ftxanalyzer.
This plugin requires Grunt ~0.4.2
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install zapf2scss --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('zapf2scss');
In your project's Gruntfile, add a section named zapf2scss
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
zapf2scss: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: String
Default value: ''
The path to the ftxanalyzer generated xml Zapf Table file.
Type: String
Default value: 'src/sass/_glyphs.scss'
The output SASS file name.
Type: String
Default value: ''
The variable name used to create the SASS list in the output file.
Type: String
Default value: ''
Use if your characters have a prefix that you need to strip out of the css class names.
Type: Boolean
Default value: true
Set if the charNamePrefix string should be stripped from the character names.
grunt.initConfig({
zapf2scss: {
my_sample: {
options: {
zapfTable: 'src/zapf-table/SymbolFont.xml',
sass: 'src/sass/_glyphs.scss',
sassListName: '$sf-icons',
charNamePrefix: 'ink-',
stripCharNamePrefix: true
}
}
}
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
(Nothing yet)