Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@granite-elements/granite-external-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@granite-elements/granite-external-dependencies

A set of elements and mixins to grab external dependencies (CSS and JS...)

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Published on webcomponents.org

granite-external-dependencies

A set of elements and mixins to grab external dependencies (CSS and JS...)

GraniteCssInjector mixin

A mixin to load external CSS files and dynamically inject them in the Shadow DOM of the element.

Elements using this mixing must override two static getters :

  • nodeModulesPath: this getter returns the relative path to the node_modules folder
  • cssFiles: this getter returns an array with an object for every dependency. The dependency object need name and path propeties, where the path is the dependency relative path from node_modules folder

Examples:

  static get nodeModulesPath() {
    return `${GraniteExternalDependencies.pathFromUrl(import.meta.url)}../../../`;
  }

  static get cssFiles() {
      return [
          { 
            name: 'externalCss', 
            path: `@granite-elements/granite-external-dependencies/demo/external-css.css` 
          }
      ];
  }

FAQs

Package last updated on 18 Jun 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc