Bare metal

Before you begin, you need to make a code change! Here's why.

Vanilla node

# Vanilla node
sprkl -- node index.js

In case you run your code directly on your machine - i.e., no docker, ssh, VM, etc. You can instrument your code changes by prefixing your commands with "sprkl --" (that is, "sprkl dash dash").

NPM / Yarn

If you are running your code using package manager (npm / yarn / pnpm):

# NPM
sprkl -- npm run <script-name>
sprkl -- npm test
sprkl -- npm start

# Yarn
sprkl -- yarn <script-name>
sprkl -- yarn test

# PNPM
sprkl -- pnpm <script-name>
sprkl -- pnpm test

Instrumenting Jest executions

In case you have Jest tests (unit tests or end-to-end), you can instrument them using sprkl like so:

# Jest test suite
sprkl -- jest
    
# Jest single test
sprkl -- jest my.test.js 
    
# Jest from from NPM script
sprkl -- npm run <jest-test-script-name>
    
# Jest from Yarn script
sprkl -- yarn <jest-test-script-name>

Last updated