Coder Social home page Coder Social logo

jaid / action-npm-install Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 4.0 4.7 MB

GitHub Action for installing dependencies from package.json after checkout.

Home Page: https://github.com/Jaid/action-npm-install

License: MIT License

JavaScript 100.00%
workflow github-action action actions npm yarn pnpm install node nodejs dependency dependencies utility node-modules github-actions

action-npm-install's Introduction

action-npm-install

License Sponsor action-npm-install
Build status Commits since v1.2.4 Last commit Issues

GitHub Action for installing Node dependencies from package.json with the correct package manager automatically selected.

This is usually needed to prepare for other steps in a GitHub Actions workflow.

Example

Example workflow that runs whenever commits are pushed on branch master.

.github/workflows/example.yml

name: Try installing Node dependencies
on:
  push:
    branches: [master]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: actions/checkout
        uses: actions/[email protected]
      - name: actions/setup-node
        uses: actions/[email protected]
        with:
          node-version: "13.9.0"
      - name: npm install
        uses: jaid/[email protected]

Options

Default Info
nodeEnv development NODE_ENV setting for installing execution (affects the amount of dependencies installed, but I would recommend keeping development in any case).
packageManager auto Can be "npm", "yarn", "pnpm" or "auto". "auto" will determine the package manager by looking into the repo's files. This is very accurate, so you normally don't want to change this.
skipIfNodeModulesExists false If true and node_modules folder already exists, this action will be skipped assuming npm install is not required.

Development

Setting up:

git clone [email protected]:jaid/action-npm-install.git
cd action-npm-install
npm install

License

MIT License
Copyright © 2020, Jaid <[email protected]> (https://github.com/jaid)

action-npm-install's People

Contributors

actions-user avatar github-actions[bot] avatar jaid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.