Skip to content

Commit

Permalink
feat: upgrade to sao@1 (fixes #64)
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed May 18, 2019
1 parent f96c496 commit 6539f3a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ to rapidly create efficient and feature-reach [PWA](https://developers.google.co
Use the command below to create a new app using starter template:

```bash
> npx sao nuxt-community/nuxt7 nuxt7-app
> npx sao@1 nuxt-community/nuxt7 nuxt7-app
```

## ▶️ Examples
Expand Down
38 changes: 0 additions & 38 deletions sao.js

This file was deleted.

41 changes: 41 additions & 0 deletions saofile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
prompts () {
return [
{
name: 'name',
message: 'Project name',
default: this.outFolder
},
{
name: 'description',
message: 'Project description',
default: ``
}
]
},

templateData () {
return {
name: this.answers.name,
description: this.answers.description
}
},

actions: [
{
type: 'add',
files: '**'
},
{ type: 'move',
patterns: {
gitignore: '.gitignore'
}
}
],

async completed () {
this.gitInit()
await this.npmInstall()
this.showProjectTips()
}
}
14 changes: 7 additions & 7 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

> <%= description %>
## Build Setup
## Development

``` bash
# Install dependencies
$ <%= _.pm %> install
<% if (context.npmClient === 'yarn') { %>yarn add<% } else { %>npm i<% } %> <%= name %>

# Serve with hot reload at localhost:3000
$ <%= _.pm %> run dev
# Serve with hot-reload at localhost:3000
<%= context.npmClient %> run dev

# Build for production and launch server
$ <%= _.pm %> run build
$ <%= _.pm %> start
<%= context.npmClient %> run build
<%= context.npmClient %> start

# Generate static project
$ <%= _.pm %> run generate
<%= context.npmClient %> run generate
```
For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).

0 comments on commit 6539f3a

Please sign in to comment.