Skip to content

iamsurajdc/netlify-builder

 
 

Repository files navigation

npm downloads npm (scoped) Build Status All Contributors

Deploy your Angular app to Netlify directly from the Angular CLI! 🚀

Pre-requisites

  • Angular project created via Angular CLI v8.3.0 or greater.

Steps:

  1. run ng add @netlify-builder/deploy to add necessary dependencies. Once, it get installed,you will be prompted to enter (a) Site Id and (b) netlfy Token Screenshot

  2. run ng deploy assuming that you have Angular CLI installed globally

    OR

    add below script to package.json

    "deploy":"ng deploy"
    

    Screenshot

Netlify Builder demo

This repository contains an example of the Angular CLI Architect API.

Builder

You can find the Architect builder in the command-builder directory.

Sample application

The sample application which uses the Architect builder is available under the builder-test directory.

License

MIT

Setup

  1. Move to command-builder and run the below command
yarn install
  1. Run the below command to build the package
yarn build
  1. run the below command to link the package
npm link

To test pacakge

  1. Move to builder-test and run the below command
yarn install
  1. Link the package
npm link @netlify-builder/deploy
  1. Provide below config in angular.json
   "deploy": {
          "builder": "@netlify-builder/deploy:deploy",
          "options": {
            "command": "deploy",
            "outputPath": "dist/builder-test",
            "netlifyToken": "[tokenValue]",
            "siteId": "[siteId]",
            "args": [
              "src/main.ts"
            ]
          }
        }
  1. Test the command
ng run builder-test:deploy

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Nitish Kumar Singh
Nitish Kumar Singh

💻
Shaikh-Ubaid
Shaikh-Ubaid

📖
Suraj Chandgude
Suraj Chandgude

💻
Santosh Yadav
Santosh Yadav

💻
Alan Agius
Alan Agius

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Deploy your Angular app to netlify from CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%