- Ensure NodeJS version
8.11.1
is installed. git clone https://github.com/JamieMason/ImageOptim-CLI.git
.npm install
.npm run lint
.npm run build
.
OSX is automated using the AppleScript files in ./osascript/*.applescript and those scripts are called from NodeJS by ./src/applescript.ts.
ImageOptim-CLI is written in TypeScript and converted into a standalone executable
using nexe so that NodeJS is not needed by its users. This is all handled by the npm run build
command.
Each time you make a change to the TypeScript or AppleScript, run npm run build
to update the
executable at ./dist/imageoptim. You can run your local executable from there:
./dist/imageoptim --help
- Run
npm pack
to create a tarball at ./imageoptim-cli-2.0.0.tgz, where2.0.0
is whatever the currentversion
is defined as in ./package.json. - Run
npm install -g ./imageoptim-cli-2.0.0.tgz
to globally install the release candidate. npm ls -g --depth 0
will list your release candidate alongside your other global npm dependencies.imageoptim --help
can be run as normal, the same way it will once published finally.- Remember to run
npm uninstall -g ./imageoptim-cli-2.0.0.tgz
to remove your local release candidate afterwards.