Skip to content

Command-line tool for running Projector scripts

License

Notifications You must be signed in to change notification settings

projectorjs/projector-cli

Repository files navigation

projector-cli

Command-line tool for running Projector scripts

Installation

First, make sure you have Yarn and Node 8 (or above) installed.

Then install the following in your project:

yarn add --dev projector-cli

Usage

Create a projector.js file

exports.build = async () => {
  console.log('Hello World!');
};

Run the following command

yarn run -s projector ./path/to/projector.js build

You should see something like this

$ "/Users/me/projects/repo/node_modules/.bin/projector" "./projector.js" "build"
Hello World!
Done in 0.70s.

You can store this command inside of package.json#scripts

{
  "name": "project-name",
  "version": "1.0.0",
  "scripts": {
    "build": "projector ./projector.js build"
  },
  "devDependencies": {
    "projector": "*"
  }
}

About

Command-line tool for running Projector scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published