@scriptables/rollup-plugin-scriptable
TypeScript icon, indicating that this package has built-in type declarations

0.7.0 • Public • Published

@scriptables/rollup-plugin-scriptable

A rollup plugin helps create a Scriptable bundle from your project by automating manifest and comment generation.

Installation

To install the plugin, use npm or pnpm:

npm install rollup-plugin-scriptable --save-dev
# or
pnpm add rollup-plugin-scriptable --dev

Usage

Add the plugin to your rollup.config.js:

import bundle from 'rollup-plugin-scriptable';

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.js',
    format: 'es',
  },
  plugins: [bundle()],
  // or customize the manifest file extension
  // plugins: [bundle({ manifest: mockManifest, bundleManifest: { extension: '.json' } })],
};

Options

The plugin accepts the following options:

  • manifest: An object representing the manifest data.
  • bundleManifest: A boolean or object to configure manifest bundling. Default is true.
    • extension: The file extension for the manifest file. Default is .manifest.json.

Example

import bundle from 'rollup-plugin-scriptable';

const mockManifest = {
  name: 'Example Script',
  version: '1.0.0',
};

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.js',
    format: 'es',
  },
  // disable manifest bundling
  plugins: [bundle({manifest: mockManifest, bundleManifest: false})],
};

Acknowledgements

Portions of code and functionality are referenced from the rollup-plugin-scriptable project. Many thanks!

License

This project is licensed under the Apache-2.0 License.

Readme

Keywords

none

Package Sidebar

Install

npm i @scriptables/rollup-plugin-scriptable

Weekly Downloads

0

Version

0.7.0

License

Apache-2.0

Unpacked Size

13.8 kB

Total Files

13

Last publish

Collaborators

  • hexxspark
  • towyuan