Skip to content

Commit

Permalink
Added mobile platforms default prefixes (related to ngx-rocket/genera…
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Jul 31, 2017
1 parent 5fe4b09 commit e239ce3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ These rules match the questions asked by the main generator
- `bootstrap`: the user has chosen *Bootstrap* for its UI
- `ionic`: the user has chosen *Ionic* for its UI
- `auth`: the user has enabled authentication
- `ios`: the user has chosen to support iOS for its mobile app
- `android`: the user has chosen to support Android for its mobile app
- `windows`: the user has chosen to support Windows (Universal) for its mobile app

#### Action prefix

Expand Down Expand Up @@ -291,7 +294,10 @@ The default rules are these:
pwa: props => Boolean(props.pwa),
bootstrap: props => props.ui === 'bootstrap',
ionic: props => props.ui === 'ionic',
auth: props => Boolean(props.auth)
auth: props => Boolean(props.auth),
ios: props => props.mobile.includes('ios'),
android: props => props.mobile.includes('android'),
windows: props => props.mobile.includes('windows')
};
```

Expand Down
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ class CoreGenerator extends Generator {
pwa: props => Boolean(props.pwa),
bootstrap: props => props.ui === 'bootstrap',
ionic: props => props.ui === 'ionic',
auth: props => Boolean(props.auth)
auth: props => Boolean(props.auth),
ios: props => props.mobile.includes('ios'),
android: props => props.mobile.includes('android'),
windows: props => props.mobile.includes('windows')
};
}

Expand Down

0 comments on commit e239ce3

Please sign in to comment.