Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Node 16 in CI #1518

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version-file: ".node-version"
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent
Expand All @@ -30,9 +30,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version-file: ".node-version"
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent
working-directory: directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
node-version-file: ".node-version"
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Lint files
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.18.0
2 changes: 1 addition & 1 deletion bin/generate-ionicons.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const xml2js = require('xml2js');

const SVGIcons2SVGFontStream = require('svgicons2svgfont');
const SVGIconsDirStream = require('svgicons2svgfont/src/iconsdir.js');
const SVGIconsDirStream = require('svgicons2svgfont/src/iconsdir');

const svg2ttf = require('svg2ttf');

Expand Down Expand Up @@ -47,12 +47,12 @@
const data = await readFileAsync(svgFontPath);

return new Promise((resolve, reject) => {
parser.parseString(data, function(err, result) {

Check warning on line 50 in bin/generate-ionicons.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected unnamed function

Check warning on line 50 in bin/generate-ionicons.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected unnamed function
if (err !== null) {
reject(err);
}
if (!result) {
console.error(`cannot parse ${svgFontPath}`);

Check warning on line 55 in bin/generate-ionicons.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected console statement

Check warning on line 55 in bin/generate-ionicons.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected console statement
}

const icons = result.svg.defs[0].font[0].glyph;
Expand Down Expand Up @@ -88,7 +88,7 @@
// convert svg font to ttf font
convertSvg2Ttf(svgFontPath, tffPath),
]);
console.log(`updated: ${tffPath} and ${glyphMapPath}`);

Check warning on line 91 in bin/generate-ionicons.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected console statement

Check warning on line 91 in bin/generate-ionicons.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected console statement
}

main();
14 changes: 11 additions & 3 deletions lib/create-icon-set-from-fontawesome6.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function createFA6iconSet(glyphMap, metadata = {}, pro = false) {

function createFontAwesomeStyle(style, fontWeight, family = fontFamily) {
let styleName = style;
let fontFile = `FontAwesome6_${pro ? `Pro_${styleName}` : styleName}.ttf`;
const fontFile = `FontAwesome6_${pro ? `Pro_${styleName}` : styleName}.ttf`;

if (styleName === 'Brands') {
styleName = 'Regular';
Expand All @@ -58,12 +58,20 @@ function createFA6iconSet(glyphMap, metadata = {}, pro = false) {
};
}

const brandIcons = createFontAwesomeStyle('Brands', '400', 'FontAwesome6Brands');
const brandIcons = createFontAwesomeStyle(
'Brands',
'400',
'FontAwesome6Brands'
);
const lightIcons = createFontAwesomeStyle('Light', '300');
const regularIcons = createFontAwesomeStyle('Regular', '400');
const solidIcons = createFontAwesomeStyle('Solid', '900');
const sharpSolidIcons = createFontAwesomeStyle('Sharp_Solid', '900');
const duotoneIcons = createFontAwesomeStyle('Duotone', '900', 'FontAwesome6Duotone');
const duotoneIcons = createFontAwesomeStyle(
'Duotone',
'900',
'FontAwesome6Duotone'
);
const thinIcons = createFontAwesomeStyle('Thin', '100');
const Icon = createMultiStyleIconSet(
{
Expand Down