Skip to content

Commit

Permalink
fix: add hex transform plugin (#15)
Browse files Browse the repository at this point in the history
* chore: add nvmrc to lock node version

* feat: add hex-transform plugin to solid-ui

* feat: add hex color transform plugin to vite config

* fix: bump hex transform version, exclude story files from plugin

* chore: remove unused noto sans font
  • Loading branch information
anthony9187 authored Jul 11, 2024
1 parent c01c800 commit b369b30
Show file tree
Hide file tree
Showing 8 changed files with 436 additions and 666 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
17 changes: 2 additions & 15 deletions packages/shared/AppCoreExtensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -22,19 +22,6 @@ const basePath = './';

export default class AppCoreExtension extends CoreExtension {
async run(stage) {
// stage.fontManager.addFontFace(
// new WebTrFontFace({
// fontFamily: "NotoSans",
// descriptors: {},
// fontUrl: basePath + "fonts/NotoSans-Regular.ttf",
// metrics: {
// ascender: 1069,
// descender: -293,
// lineGap: 0,
// unitsPerEm: 1000
// }
// }),
// );
stage.fontManager.addFontFace(
new SdfTrFontFace('msdf', {
fontFamily: 'Arial',
Expand Down Expand Up @@ -70,4 +57,4 @@ export default class AppCoreExtension extends CoreExtension {
})
);
}
}
}
86 changes: 0 additions & 86 deletions packages/shared/public/fonts/notoSans/LICENSE

This file was deleted.

Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion packages/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
"solid-js": "*"
},
"devDependencies": {
"@lightningtv/l3-ui-theme-base": "workspace:*",
"@lightningjs/vite-plugin-import-chunk-url": "^0.3.1",
"@lightningtv/l3-ui-theme-base": "workspace:*",
"@lightningtv/vite-hex-transform": "^1.1.0",
"@storybook/addon-essentials": "^7.6.19",
"@storybook/addon-interactions": "^7.6.19",
"@storybook/addon-links": "^7.6.19",
Expand Down
5 changes: 5 additions & 0 deletions packages/solid/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import { importChunkUrl } from '@lightningjs/vite-plugin-import-chunk-url';
import hexColorTransform from '@lightningtv/vite-hex-transform';
import path from 'path';

const config = {
Expand All @@ -28,6 +29,10 @@ const config = {
generate: 'universal'
}
}),
hexColorTransform({
include: '**/*.js',
exclude: '**/*.stories.js'
}),
importChunkUrl()
],
base: './',
Expand Down
Loading

0 comments on commit b369b30

Please sign in to comment.