do-nothing-script

Automate everything...or just use a checklist.

Usage no npm install needed!

<script type="module">
  import doNothingScript from 'https://cdn.skypack.dev/do-nothing-script';
</script>

README

do-nothing-script

Automate everything...or just use a checklist.

This script does nothing; it's an automated checklist.

Getting started

npm install --save-dev do-nothing-script

npx do-nothing --file prompts.js

Strings

Return an array of strings that are used in the checklist.

// prompts.js
module.exports = [
    `1. Remember to add code (git add)`,
    `2. Remember to commit code (git commit)`,
    `3. Remember to push code (git push)`,
    `4. git paid`
];

Expressions

You can use JavaScript expressions.

// prompts.js
module.exports = [
    `1. Remember to add code (git add)`,
    `${1 + 1}. Remember to commit code (git commit)`,
    `3. Remember to push code (git push)`,
    `4. git paid ${Math.random()}`
];

Functions

You can use functions that return a Promise.

// prompts.js

const makeApiCall = function() {
    return fetch('https://SOME_AWESOME_API.com/json')
        .then(response => response.json())
        .then(data => {
            return `2: ${data}`;
        });
}

module.exports = [
    `1. Remember to add code (git add)`,
    makeApiCall
];

Inspired by this HackerNews post