New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@pitrix/lego-font

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pitrix/lego-font

Fonts for Lego-UI

latest
npmnpm
Version
0.0.6
Version published
Maintainers
0
Created
Source

Lego Fonts

字体类型

Lego-UI 使用的首选字体类型是 RobotoRoboto Mono,由于部分私有云场景下无法连接外网,无法加载外部字体文件,因此建立这个项目来单独存放字体文件与字体相关的样式文件。

使用方法

引入字体文件需要配合 webpack 以及 file-loader 插件一起使用:

安装 file-loader 插件:

npm install file-loader --save-dev

file-loader 插件配置到 webpack.config.js:

module.exports = {
  entry: './src/app.js',
  output: {
    path: __dirname + '/dist',
    filename: 'build.js',
  },
  module: {
    loaders: [
      {
        test: /\.scss$/,
        loader: 'style-loader!css-loader!sass-loader'
      },
      {
        test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
        use: [{
          loader: 'file-loader',
          options: {
            name: '[name].[ext]',
            outputPath: 'fonts/' // config as you like
          }
        }]
      }
    ],
  },
  watch: true,
};

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts