Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
nitishk72 committed Aug 19, 2019
1 parent b2a67be commit 25520d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions command-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,22 @@

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

## How to use ?
## Prerequisite

It's a small two step JOB ?
- Install the @netlify-builder/deploy
- Configure the Angular project with your netlify account
You will need two things in order to get started

## Step 1
- API ID (Site ID) : Every netlify app have a API ID which uniquly identify that app. You can find this inside your project's Setting/General section.
![alt text](./screenshots/api-id.png)
- [Personal access tokens](https://app.netlify.com/user/applications#personal-access-tokens) : Acess token give you the ability to communicate with netlify over API. This will help you in pushing the code on Netlify.
![alt text](./screenshots/personal-access-token.png)

```
npm i @netlify-builder/deploy
```

## Step 2

Open the `angular.json` and add this code inside the **architect** object.
## Setting up this Builder

```json
"deploy": {
"builder": "@netlify-builder/deploy:deploy",
"options": {
"command": "deploy",
"outputPath": "dist/[YOUR_PROJECT_NAME]",
"netlifyToken": "[YOUR_NETLIFY_TOKEN]",
"siteId": "[YOUR_SITE_ID]"
}
}
```
- *We need to update 3 data in this code.*

- YOUR_PROJECT_NAME
- YOUR_NETLIFY_TOKEN
- YOUR_SITE_ID

1. netlifyToken : token provided by netlify, generate one from [netlify](https://app.netlify.com/user/applications#personal-access-tokens).

2. siteId: siteId for your application, every site has unique siteId. Site ID is also known as **API ID** . You can find this inside your project's Setting/General section.
ng add @netlify-builder/deploy
```

3. outputPath: By default output path of any angular project is `dist/[YOUR_PROJECT_NAME]`. This is the path where your project get build.
This command will configure everything, you just need to provide API ID and Personal access tokens when it will ask you for that.

## That's it. Now, you are good to go

Expand Down
Binary file added screenshots/api-id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/personal-access-token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 25520d9

Please sign in to comment.