Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Sep 8, 2024
1 parent 4e5ae7a commit a9e60f5
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 394 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.56
0.0.60
134 changes: 30 additions & 104 deletions dist/js/config/fantasticon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ const fantasticon_1 = require("fantasticon");
// Configuration for the Fantasticon tool to generate icon fonts from SVG files.
const fantasticonConfig = {
// RunnerOptionalOptions
// inputDir: sourceDirectory, // (required)
// outputDir: outputDiectory, // (required)
// Basic naming and type setup for font generation
name: 'icon',
// ------------------------------------------------------------------------
name: "icon",
fontTypes: [
fantasticon_1.FontAssetType.TTF, // TTF = "ttf"
fantasticon_1.FontAssetType.WOFF, // WOFF = "woff"
Expand All @@ -30,135 +33,58 @@ const fantasticonConfig = {
formatOptions: {
// woff: {
// // // Woff Extended Metadata Block - see https://www.w3.org/TR/WOFF/#Metadata
// // metadata: '...'
// // metadata: "..."
// // },
// // ttf?: TtfOptions; // type TtfOptions = svg2ttf.FontOptions;
// // svg?: SvgOptions; // type SvgOptions = Omit<SvgIcons2FontOptions, 'fontName' | 'fontHeight' | 'descent' | 'normalize'>;
// // svg?: SvgOptions; // type SvgOptions = Omit<SvgIcons2FontOptions, "fontName" | "fontHeight" | "descent" | "normalize">;
json: { indent: 4 },
ts: {
// select what kind of types you want to generate
// (default `['enum', 'constant', 'literalId', 'literalKey']`)
// render the types with `'` instead of `"` (default is `"`)
// (default `["enum", "constant", "literalId", "literalKey"]`)
// render the types with `"` instead of `"` (default is `"`)
singleQuotes: false,
enumName: 'icon_gl',
enumName: "icon_gl",
// customise names used for the generated types and constants
constantName: 'MY_CODEPOINTS'
// literalIdName: 'IconId',
constantName: "MY_CODEPOINTS"
// literalIdName: "IconId",
}
},
pathOptions: {
json: './dist/font/icon.gl.json',
css: './dist/font/icon.gl.css',
scss: './dist/font/icon.gl.scss',
woff: './dist/font/icon.gl.woff',
woff2: './dist/font/icon.gl.woff2',
json: "./dist/font/icon.gl.json",
css: "./dist/font/icon.gl.css",
scss: "./dist/font/icon.gl.scss",
woff: "./dist/font/icon.gl.woff",
woff2: "./dist/font/icon.gl.woff2",
},
codepoints: {
'chevron-left': 57344, // decimal representation of 0xe000
'chevron-right': 57345,
'thumbs-up': 57358,
'thumbs-down': 57359,
"chevron-left": 57344, // decimal representation of 0xe000
"chevron-right": 57345,
"thumbs-up": 57358,
"thumbs-down": 57359,
},
// fontHeight: number;
// descent: number;
// normalize: boolean;
// round: number;
selector: '.i',
selector: ".i",
// tag: string;
// Use our custom Handlebars templates
// templates: {
// css: './build/font/icon.gl.css.hbs',
// scss: './build/font/icon.gl.scss.hbs'
// css: "./build/font/icon.gl.css.hbs",
// scss: "./build/font/icon.gl.scss.hbs"
// },
prefix: 'icon',
fontsUrl: './fonts',
prefix: "icon",
fontsUrl: "./fonts",
// Customize generated icon IDs (unavailable with `.json` config file)
// getIconId: ({
// basename, // `string` - Example: 'foo';
// relativeDirPath, // `string` - Example: 'sub/dir/foo.svg'
// absoluteFilePath, // `string` - Example: '/var/icons/sub/dir/foo.svg'
// relativeFilePath, // `string` - Example: 'foo.svg'
// basename, // `string` - Example: "foo";
// relativeDirPath, // `string` - Example: "sub/dir/foo.svg"
// absoluteFilePath, // `string` - Example: "/var/icons/sub/dir/foo.svg"
// relativeFilePath, // `string` - Example: "foo.svg"
// index // `number` - Example: `0`
// }) => [index, basename].join('_') // '0_foo'
// }) => [index, basename].join("_") // "0_foo"
};
// ============================================================================
// Export
// ============================================================================
exports.default = fantasticonConfig;
// export const fontConfig = {
// // RunnerMandatoryOptions
// inputDir: sourceDirectory, // (required)
// outputDir: outputDiectory, // (required)
// // RunnerOptionalOptions
// name: 'icon.gl',
// fontTypes: [
// FontAssetType.TTF, // TTF = "ttf"
// FontAssetType.WOFF, // WOFF = "woff"
// FontAssetType.WOFF2, // WOFF2 = "woff2"
// FontAssetType.EOT, // EOT = "eot"
// FontAssetType.SVG, // SVG = "svg"
// ],
// assetTypes: [
// OtherAssetType.CSS, // CSS = "css",
// OtherAssetType.SCSS, // SCSS = "scss",
// OtherAssetType.SASS, // SASS = "sass",
// OtherAssetType.HTML, // HTML = "html",
// OtherAssetType.JSON, // JSON = "json",
// OtherAssetType.TS, // TS = "ts"
// ],
// formatOptions: {
// // woff: {
// // // Woff Extended Metadata Block - see https://www.w3.org/TR/WOFF/#Metadata
// // metadata: '...'
// // },
// // ttf?: TtfOptions; // type TtfOptions = svg2ttf.FontOptions;
// // svg?: SvgOptions; // type SvgOptions = Omit<SvgIcons2FontOptions, 'fontName' | 'fontHeight' | 'descent' | 'normalize'>;
// json: { indent: 4 } ,
// // ts: {
// // // select what kind of types you want to generate
// // // (default `['enum', 'constant', 'literalId', 'literalKey']`)
// // types: ['enum', 'constant', 'literalId', 'literalKey'],
// // // render the types with `'` instead of `"` (default is `"`)
// // singleQuotes: false,
// // // customise names used for the generated types and constants
// // enumName: 'icon_gl',
// // constantName: 'MY_CODEPOINTS'
// // // literalIdName: 'IconId',
// // // literalKeyName: 'IconKey'
// // }
// },
// pathOptions: {
// json: './dist/font/icon.gl.json',
// css: './dist/font/icon.gl.css',
// scss: './dist/font/icon.gl.scss',
// woff: './dist/font/icon.gl.woff',
// woff2: './dist/font/icon.gl.woff2',
// },
// // codepoints: {
// // 'chevron-left': 57344, // decimal representation of 0xe000
// // 'chevron-right': 57345,
// // 'thumbs-up': 57358,
// // 'thumbs-down': 57359,
// // },
// // fontHeight: number;
// // descent: number;
// // normalize: boolean;
// // round: number;
// selector: '.igl',
// // tag: string;
// // Use our custom Handlebars templates
// // templates: {
// // css: './build/font/icon.gl.css.hbs',
// // scss: './build/font/icon.gl.scss.hbs'
// // },
// prefix: 'igl',
// fontsUrl: './fonts',
// // Customize generated icon IDs (unavailable with `.json` config file)
// // getIconId: ({
// // basename, // `string` - Example: 'foo';
// // relativeDirPath, // `string` - Example: 'sub/dir/foo.svg'
// // absoluteFilePath, // `string` - Example: '/var/icons/sub/dir/foo.svg'
// // relativeFilePath, // `string` - Example: 'foo.svg'
// // index // `number` - Example: `0`
// // }) => [index, basename].join('_') // '0_foo'
// };
10 changes: 2 additions & 8 deletions dist/js/config/nunjucks.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use strict";
// ============================================================================
// Import
// ============================================================================
// This configuration is tailored to a typical web application setup. Adjust the `noCache` option
// according to your caching strategy for production environments to optimize performance.
Object.defineProperty(exports, "__esModule", { value: true });
// ============================================================================
// Constants
Expand All @@ -22,8 +21,3 @@ const nunjucksConfig = {
// Export
// ============================================================================
exports.default = nunjucksConfig;
// ============================================================================
// Notes
// ============================================================================
// This configuration is tailored to a typical web application setup. Adjust the `noCache` option
// according to your caching strategy for production environments to optimize performance.
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pack.gl",
"version": "0.0.56",
"version": "0.0.60",
"description": "Package Builder.",
"keywords": [
"pack.gl",
Expand Down
Loading

0 comments on commit a9e60f5

Please sign in to comment.