Giter Site home page Giter Site logo

script-script's Introduction

script script

A script for your scripts. Politely install config files and package scripts by reading from templates in your home directory, and never overwriting files without asking. Sometimes you want one command that will install dependencies, add config files, and add scripts to package.json.

install

$ npm install -g script-script

recipes

Write recipes in ~/.script-script/index.json.

{
    "travis": {
        "files": [ ["travis.yml", ".travis.yml"] ]
    },

    "husky": {
        "devinstall": ["husky"],
        "scripts": {
            "prepush": "./test/githook/prepush.sh"
        },
        "files": [ ["prepush.sh", "./test/githook/prepush.sh"] ]
    },

    "lint": {
        "devinstall": ["eslint", "eslint-config-minlint"],
        "scripts": {
            "lint": "eslint ."
        },
        "files": [
            ["eslintrc", ".eslintrc"],
            ["eslintignore", ".eslintignore"]
        ]
    },

    "demo": {
        "package.json": {
            "browser": {
              "request": "xhr"
            },
            "aliasify": {
              "aliases": {
                "react": "preact-compat",
                "react-dom": "preact-compat",
                "create-react-class": "preact-compat/lib/create-react-class"
              }
            },
            "engines": {
              "npm": "^5.0.0",
              "node": "^8.0.0"
            }
        }
    }
}

Each key is a recipe name, and sub-keys point to actions to perform.

actions

devinstall

A list of package names that should be installed and added to devDependencies.

scripts

Scripts are added to package.json scripts.

files

An array of files to copy from ~/.script-script to the current directory. The files can be a string, or a pair of [source file, dest file]. If the path conflicts with an existing file, you will be prompted if you want to overwrite it.

cli use

$ script-script [recipe name]

example

$ script-script travis

script-script's People

Contributors

nichoth avatar

Watchers

James Cloos avatar  avatar  avatar

script-script's Issues

modularize

We want to be able to wrap this in another CLI that provides built-in recipes so that they can be shared amongst people.

  • export the 'worker' part of the app so it can be wrapped by a different CLI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.