Skip to content

Commit cca857c

Browse files
ivansiederyyx990803
authored andcommitted
docs: added Now deployment (vuejs#2022)
1 parent 1927a39 commit cca857c

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

docs/guide/deployment.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,41 @@ Please refer to the [Firebase Documentation](https://firebase.google.com/docs/ho
202202

203203
### Now
204204

205-
> TODO | Open to contribution.
205+
### Now
206+
207+
1. Install the Now CLI globally: `npm install -g now`
208+
209+
2. Add a `now.json` file to your project root:
210+
211+
```json
212+
{
213+
"name": "my-example-app",
214+
"type": "static",
215+
"static": {
216+
"public": "dist"
217+
},
218+
"alias": "vue-example",
219+
"files": [
220+
"dist"
221+
]
222+
}
223+
```
224+
225+
Modify `name` and `alias` accordingly.
226+
227+
3. Adding a deployment script in `package.json`:
228+
229+
```json
230+
"deploy": "npm run build && now && now alias"
231+
```
232+
233+
If you want to deploy publicly by default, you can change the deployment script to the following one:
234+
235+
```json
236+
"deploy": "npm run build && now --public && now alias"
237+
```
238+
239+
This will automatically point your site's alias to the latest deployment. Now, just run `npm run deploy` to deploy your app.
206240
207241
### Stdlib
208242

0 commit comments

Comments
 (0)