1.1.1 • Published 12 months ago

@rmtc/plugin-npm-scripts v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@rmtc/plugin-npm-scripts

A plugin for @rmtc/toolchain that creates package.json scripts for all defined workflows.

!WARNING This project is intended for use in @rowanmanning's projects. It's free to use but I don't offer support for use-cases outside of what I need.

Table of Contents

Requirements

This library requires the following to run:

Usage

Install the module with npm:

npm install --save-dev @rmtc/plugin-npm-scripts

Include it in your .rmtc.json file:

{
    plugins: [
        // ...
        '@rmtc/plugin-npm-scripts'
    ]
    // ...
}

Workflows

This plugin defines the following workflows:

  • postinstall: a general workflow used to indicate steps that should be run after dependencies have been installed.

Steps

This plugin defines the following steps that can be added to any workflow:

  • npm-scripts:install: override the scripts in the project's package.json file, ensuring that there's a script matching each defined workflow. This is a destructive action and will make changes to your files, but it makes running scripts more convenient. E.g.

    If you have a test workflow defined by one of your plugins, then this script will add a scripts.test property to package.json that runs npx @rmtc/toolchain test. You can now run tests with a regular npm test.

    When running this workflow for the first time it will output the original values of these scripts in case something was broken.

Configuration

This plugin provides no additional configuration.

Contributing

See the central README for a contribution guide and code of conduct.

License

Licensed under the MIT license. Copyright © 2023, Rowan Manning

1.1.1

12 months ago

1.1.0

1 year ago

1.0.0

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago