How to use @ibm/plex - 1 common examples

To help you get started, we’ve selected a few @ibm/plex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tchak / ember-font-plex / index.js View on Github external
included: function() {
    this._super.included.apply(this, arguments);

    let options = (this.app.options['ember-font-plex'] =
      this.app.options['ember-font-plex'] || {});
    let fonts = (options['fonts'] || ['IBM Plex Sans']).map(fontFamily =>
      fontFamily.replace(/\s/g, '-')
    );

    let version = plexPkg.version;

    fonts.forEach(fontFamily => {
      this.import(`vendor/${fontFamily.toLowerCase()}.css`);
    });

    fonts.forEach(fontFamily => {
      let fontPath = path.join(fontFamily, 'fonts/split');

      ['woff', 'woff2'].forEach(format => {
        let absoluteFontsPath = path.join(plexPath, fontPath, format);
        let fontsToImport = fs.readdirSync(absoluteFontsPath);
        fontsToImport.forEach(filename => {
          this.import(
            path.join('node_modules/@ibm/plex', fontPath, format, filename),
            {
              destDir: path.join('assets/fonts', fontFamily, version, format)

@ibm/plex

The package of IBM’s typeface, IBM Plex

OFL-1.1
Latest version published 6 months ago

Package Health Score

77 / 100
Full package analysis

Popular @ibm/plex functions