Skip to content

Add --mobile as option to "ng new" #596

Description

@alxhub

This is a tracking issue for the work to support a mobile app flavor in the CLI.

The work to implement --mobile consists of 3 separate features, to be implemented in order:

  • Boilerplate app manifest and inclusion in index.html
  • Installation of service worker (stretch goal: only enabled for prod builds)
  • App shell based initial application, with Universal support

For the first feature (boilerplate for the app manifest), the CLI should create a boilerplate file entitled manifest.webapp, with the following JSON structure (including values filled in from user prompts):

{
  "short_name": "<prompt, default to Angular CLI App>",
  "name": "<prompt, default to Angular CLI App>",
  "icons": [
    {
      "src": "<prompt, default to 96x96 png of Angular logo>",
      "sizes": "96x96",
      "type": "image/png"
    }
  ],
  "start_url": "/index.html",
  "display": "standalone",
  "orientation": "portrait"
}

And in index.html, the following should be added to <head>:

<link rel="manifest" href="/manifest.webapp">

Implementation details for the other 2 features are pending.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions