New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@steveush/rollup-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@steveush/rollup-utils

Rollup utility classes, methods and plugins for simple builds.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@steveush/rollup-utils

Rollup utility classes, methods and plugins for simple builds.

NOTE

Any version below 1.0.0 is considered experimental and is subject to change.

This package was created for my personal use, and so is provided as is.

Plugins

  • clean( paths?: string[] ) - Clean paths prior to building.
  • copy( source: string, target: string, patterns?: string[] ) - Copy files from one directory to another after each build.
  • css( options?: ImporterOptions ) - Import CSS, SASS and SCSS files as a string, CSSStyleSheet or HTMLStyleElement.
  • html( options?: ImporterOptions ) - Import HTML files as a string or HTMLTemplateElement.

Classes

  • Importer - A utility class to help create Rollup plugins for importing and transforming text files.
  • SourceMap - A version 3 source map implementation.

Methods

getEntryInfo( ctx: PluginContext, moduleId: string ): ModuleInfo | null

Get the entry ModuleInfo for the given module id.

Params

  • ctx: PluginContext
    The current Rollup plugin context.

  • moduleId: string
    The module id to find the entry info for.

Returns

  • ModuleInfo
    If the entry was successfully found its ModuleInfo is returned.
  • null
    If the entry was not found null is returned.
getImportedIds( ctx: PluginContext, moduleId: string, addSelf?: boolean ): Readonly<string>

Recursively retrieve all imported module ids, in the order they were imported, for a given module.

Params

  • ctx: PluginContext
    The current Rollup plugin context.

  • moduleId: string
    The module id to retrieve all imported ids for.

  • addSelf: boolean optional
    Whether to include the given moduleId in the result.

Returns

  • Readonly<string>
    A readonly string array of imported module ids, in the order they were imported, for the given module.
isFilterPattern( value: any ): boolean

Check if a value is a Rollup filter pattern.

This does not accept null as a valid pattern, it checks if the value is a string or RegExp instance, or an array of string or RegExp instances.

Params

  • value: any
    The value to check.

Returns

  • boolean
    Returns true if the value is a filter pattern, otherwise false.

See

isSourceMapLike( value: any ): boolean

Check if a value is a Rollup filter pattern.

This does not accept null as a valid pattern, it checks if the value is a string or RegExp instance, or an array of string or RegExp instances.

Params

  • value: any
    The value to check.

Returns

  • boolean
    Returns true if the value is a filter pattern, otherwise false.

See

Changelog

VersionDescription
0.0.1Initial release
0.0.2Fix package.json files issue

FAQs

Package last updated on 30 Apr 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

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