-
+
+
+
my-icon
diff --git a/src/generators/asset-types/__tests__/__snapshots__/sass.ts.snap b/src/generators/asset-types/__tests__/__snapshots__/sass.ts.snap
index 5aadd4ef..cf2f5653 100644
--- a/src/generators/asset-types/__tests__/__snapshots__/sass.ts.snap
+++ b/src/generators/asset-types/__tests__/__snapshots__/sass.ts.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`\`SASS\` asset generator renders SASS correctly with \`selector\` option 1`] = `
-"$test-font: \\"test\\"
+"$test-font: "test"
@font-face
font-family: $test-font
- src: \\"::src-attr::\\"
+ src: "::src-attr::"
.my-selector:before
font-family: test !important
@@ -19,22 +19,22 @@ exports[`\`SASS\` asset generator renders SASS correctly with \`selector\` optio
$test-map: (
- \\"my-icon\\": \\"\\\\f101\\",
+ "my-icon": "\\f101",
)
.my-selector.tf-my-icon:before
- content: map-get($test-map, \\"my-icon\\")
+ content: map-get($test-map, "my-icon")
"
`;
exports[`\`SASS\` asset generator renders SASS correctly with prefix and tag name options 1`] = `
-"$test-font: \\"test\\"
+"$test-font: "test"
@font-face
font-family: $test-font
- src: \\"::src-attr::\\"
+ src: "::src-attr::"
-b[class^=\\"tf-\\"]:before, b[class*=\\" tf-\\"]:before
+b[class^="tf-"]:before, b[class*=" tf-"]:before
font-family: test !important
font-style: normal
font-weight: normal !important
@@ -46,10 +46,10 @@ b[class^=\\"tf-\\"]:before, b[class*=\\" tf-\\"]:before
$test-map: (
- \\"my-icon\\": \\"\\\\f101\\",
+ "my-icon": "\\f101",
)
.tf-my-icon:before
- content: map-get($test-map, \\"my-icon\\")
+ content: map-get($test-map, "my-icon")
"
`;
diff --git a/src/generators/asset-types/__tests__/__snapshots__/scss.ts.snap b/src/generators/asset-types/__tests__/__snapshots__/scss.ts.snap
index a36d572b..b54400ab 100644
--- a/src/generators/asset-types/__tests__/__snapshots__/scss.ts.snap
+++ b/src/generators/asset-types/__tests__/__snapshots__/scss.ts.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`\`SCSS\` asset generator renders SCSS correctly with \`selector\` option 1`] = `
-"$test-font: \\"test\\";
+"$test-font: "test";
@font-face {
font-family: $test-font;
- src: \\"::src-attr::\\";
+ src: "::src-attr::";
}
.my-selector:before {
@@ -20,24 +20,24 @@ exports[`\`SCSS\` asset generator renders SCSS correctly with \`selector\` optio
}
$test-map: (
- \\"my-icon\\": \\"\\\\f101\\",
+ "my-icon": "\\f101",
);
.my-selector.tf-my-icon:before {
- content: map-get($test-map, \\"my-icon\\");
+ content: map-get($test-map, "my-icon");
}
"
`;
exports[`\`SCSS\` asset generator renders SCSS correctly with prefix and tag name options 1`] = `
-"$test-font: \\"test\\";
+"$test-font: "test";
@font-face {
font-family: $test-font;
- src: \\"::src-attr::\\";
+ src: "::src-attr::";
}
-b[class^=\\"tf-\\"]:before, b[class*=\\" tf-\\"]:before {
+b[class^="tf-"]:before, b[class*=" tf-"]:before {
font-family: test !important;
font-style: normal;
font-weight: normal !important;
@@ -49,11 +49,11 @@ b[class^=\\"tf-\\"]:before, b[class*=\\" tf-\\"]:before {
}
$test-map: (
- \\"my-icon\\": \\"\\\\f101\\",
+ "my-icon": "\\f101",
);
.tf-my-icon:before {
- content: map-get($test-map, \\"my-icon\\");
+ content: map-get($test-map, "my-icon");
}
"
`;
diff --git a/src/generators/asset-types/__tests__/__snapshots__/svg.ts.snap b/src/generators/asset-types/__tests__/__snapshots__/svg.ts.snap
index 20613f4f..ba83630b 100644
--- a/src/generators/asset-types/__tests__/__snapshots__/svg.ts.snap
+++ b/src/generators/asset-types/__tests__/__snapshots__/svg.ts.snap
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`\`SVG\` font generator passes correctly format options to \`SVGIcons2SVGFontStream\` 1`] = `"processed->content->/root/foo.svg|{\\"name\\":\\"foo\\",\\"unicode\\":[\\"\\\\u0001\\"]}$processed->content->/root/bar.svg|{\\"name\\":\\"bar\\",\\"unicode\\":[\\"\\\\u0001\\"]}$"`;
+exports[`\`SVG\` font generator passes correctly format options to \`SVGIcons2SVGFontStream\` 1`] = `"processed->content->/root/foo.svg|{"name":"foo","unicode":["\\u0001"]}$processed->content->/root/bar.svg|{"name":"bar","unicode":["\\u0001"]}$"`;
-exports[`\`SVG\` font generator resolves with the result of the completed \`SVGIcons2SVGFontStream\` 1`] = `"processed->content->/root/foo.svg|{\\"name\\":\\"foo\\",\\"unicode\\":[\\"\\\\u0001\\"]}$processed->content->/root/bar.svg|{\\"name\\":\\"bar\\",\\"unicode\\":[\\"\\\\u0001\\"]}$"`;
+exports[`\`SVG\` font generator resolves with the result of the completed \`SVGIcons2SVGFontStream\` 1`] = `"processed->content->/root/foo.svg|{"name":"foo","unicode":["\\u0001"]}$processed->content->/root/bar.svg|{"name":"bar","unicode":["\\u0001"]}$"`;
diff --git a/src/generators/asset-types/__tests__/__snapshots__/ts.ts.snap b/src/generators/asset-types/__tests__/__snapshots__/ts.ts.snap
index 3f501f1e..74517ab6 100644
--- a/src/generators/asset-types/__tests__/__snapshots__/ts.ts.snap
+++ b/src/generators/asset-types/__tests__/__snapshots__/ts.ts.snap
@@ -2,45 +2,45 @@
exports[`\`TS\` asset generator generates constant only 1`] = `
"export const MY_ICONS_SET_CODEPOINTS: Record = {
- \\"foo\\": \\"4265\\",
- \\"bar\\": \\"1231\\",
+ "foo": "4265",
+ "bar": "1231",
};
"
`;
exports[`\`TS\` asset generator generates constant with literalId if no enum generated 1`] = `
"export type MyIconsSetId =
- | \\"foo\\"
- | \\"bar\\";
+ | "foo"
+ | "bar";
export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSetId]: string } = {
- \\"foo\\": \\"4265\\",
- \\"bar\\": \\"1231\\",
+ "foo": "4265",
+ "bar": "1231",
};
"
`;
exports[`\`TS\` asset generator generates constant with literalKey if no enum generated 1`] = `
"export type MyIconsSetKey =
- | \\"Foo\\"
- | \\"Bar\\";
+ | "Foo"
+ | "Bar";
export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSetKey]: string } = {
- \\"foo\\": \\"4265\\",
- \\"bar\\": \\"1231\\",
+ "foo": "4265",
+ "bar": "1231",
};
"
`;
exports[`\`TS\` asset generator generates no key string literal type if option passed like that 1`] = `
"export enum MyIconsSet {
- Foo = \\"foo\\",
- Bar = \\"bar\\",
+ Foo = "foo",
+ Bar = "bar",
}
export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSet]: string } = {
- [MyIconsSet.Foo]: \\"4265\\",
- [MyIconsSet.Bar]: \\"1231\\",
+ [MyIconsSet.Foo]: "4265",
+ [MyIconsSet.Bar]: "1231",
};
"
`;
@@ -68,67 +68,67 @@ export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSet]: string } = {
exports[`\`TS\` asset generator prevents enum keys that start with digits 1`] = `
"export type MyIconsSetId =
- | \\"1234\\"
- | \\"5678\\";
+ | "1234"
+ | "5678";
export type MyIconsSetKey =
- | \\"i1234\\"
- | \\"i5678\\";
+ | "i1234"
+ | "i5678";
export enum MyIconsSet {
- i1234 = \\"1234\\",
- i5678 = \\"5678\\",
+ i1234 = "1234",
+ i5678 = "5678",
}
export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSet]: string } = {
- [MyIconsSet.i1234]: \\"undefined\\",
- [MyIconsSet.i5678]: \\"undefined\\",
+ [MyIconsSet.i1234]: "undefined",
+ [MyIconsSet.i5678]: "undefined",
};
"
`;
exports[`\`TS\` asset generator prevents enum keys that start with digits when digits and chars 1`] = `
"export type MyIconsSetId =
- | \\"1234asdf\\"
- | \\"5678ab\\"
- | \\"foo\\";
+ | "1234asdf"
+ | "5678ab"
+ | "foo";
export type MyIconsSetKey =
- | \\"i1234asdf\\"
- | \\"i5678ab\\"
- | \\"Foo\\";
+ | "i1234asdf"
+ | "i5678ab"
+ | "Foo";
export enum MyIconsSet {
- i1234asdf = \\"1234asdf\\",
- i5678ab = \\"5678ab\\",
- Foo = \\"foo\\",
+ i1234asdf = "1234asdf",
+ i5678ab = "5678ab",
+ Foo = "foo",
}
export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSet]: string } = {
- [MyIconsSet.i1234asdf]: \\"undefined\\",
- [MyIconsSet.i5678ab]: \\"undefined\\",
- [MyIconsSet.Foo]: \\"4265\\",
+ [MyIconsSet.i1234asdf]: "undefined",
+ [MyIconsSet.i5678ab]: "undefined",
+ [MyIconsSet.Foo]: "4265",
};
"
`;
exports[`\`TS\` asset generator renders expected TypeScript module content 1`] = `
"export type MyIconsSetId =
- | \\"foo\\"
- | \\"bar\\";
+ | "foo"
+ | "bar";
export type MyIconsSetKey =
- | \\"Foo\\"
- | \\"Bar\\";
+ | "Foo"
+ | "Bar";
export enum MyIconsSet {
- Foo = \\"foo\\",
- Bar = \\"bar\\",
+ Foo = "foo",
+ Bar = "bar",
}
export const MY_ICONS_SET_CODEPOINTS: { [key in MyIconsSet]: string } = {
- [MyIconsSet.Foo]: \\"4265\\",
- [MyIconsSet.Bar]: \\"1231\\",
+ [MyIconsSet.Foo]: "4265",
+ [MyIconsSet.Bar]: "1231",
};
"
`;