1.0.1 • Published 3 years ago

@joshmorony/nx-netlify-deploy v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

nx-netlify-deploy

This plugin has been adapted from: https://github.com/ngx-builders/netlify-builder

This library was generated with Nx.

Usage

This custom executor will allow you to build and deploy your code to Netlify and it will also allow you to specify a functions folder to upload to Netlify at the same time.

npm install @joshmorony/nx-netlify-deploy

Add a deploy target in workspace.json for your project:

"deploy": {
    "executor": "@joshmorony/nx-netlify-deploy:deploy",
    "options": {
        "outputPath": "apps/yourproject/public",
        "functionsPath": "apps/yourproject/functions",
        "siteId": "SITEID-FROM-NETLIFY"
    }
},

Add your Netlify Token to a .env file at the root of your project (make sure this file is not committed to your Git repo):

NETLIFY_TOKEN=xxxxxxxxxxxxxxxxxxxxxxx

Running unit tests

Run nx test nx-netlify-deploy to execute the unit tests via Jest.