docs: added Now deployment (#2022)

This commit is contained in:
Ivan Sieder
2018-08-06 04:27:04 +02:00
committed by Evan You
parent 1927a390c3
commit cca857c3ff
+35 -1
View File
@@ -202,7 +202,41 @@ Please refer to the [Firebase Documentation](https://firebase.google.com/docs/ho
### Now
> TODO | Open to contribution.
### Now
1. Install the Now CLI globally: `npm install -g now`
2. Add a `now.json` file to your project root:
```json
{
"name": "my-example-app",
"type": "static",
"static": {
"public": "dist"
},
"alias": "vue-example",
"files": [
"dist"
]
}
```
Modify `name` and `alias` accordingly.
3. Adding a deployment script in `package.json`:
```json
"deploy": "npm run build && now && now alias"
```
If you want to deploy publicly by default, you can change the deployment script to the following one:
```json
"deploy": "npm run build && now --public && now alias"
```
This will automatically point your site's alias to the latest deployment. Now, just run `npm run deploy` to deploy your app.
### Stdlib