Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[examples][now-static-build] Add Ionic Angular framework #3970

Merged
merged 12 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 32 additions & 3 deletions packages/frameworks/frameworks.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
"name": "Ionic React",
"slug": "ionic-react",
"demo": "https://ionic-react.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/ionic-react.svg",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/ionic.svg",
"tagline": "Ionic React allows you to build mobile PWAs with React and the Ionic Framework.",
"description": "An Ionic React site, created with the Ionic CLI.",
"website": "https://ionicframework.com",
Expand All @@ -411,16 +411,45 @@
},
"settings": {
"buildCommand": {
"placeholder": "npm run build"
"placeholder": "`npm run build` or `react-scripts build`"
},
"devCommand": {
"value": "stencil build --dev --watch --serve --port $PORT"
"value": "react-scripts start"
styfle marked this conversation as resolved.
Show resolved Hide resolved
},
"outputDirectory": {
"value": "public"
}
}
},
{
"name": "Ionic Angular",
"slug": "ionic-angular",
"demo": "https://ionic-angular.now-examples.now.sh",
"logo": "https://raw.githubusercontent.com/zeit/now/master/packages/frameworks/logos/ionic.svg",
"tagline": "Ionic Angular allows you to build mobile PWAs with Angular and the Ionic Framework.",
"description": "An Ionic Angular site, created with the Ionic CLI.",
"website": "https://ionicframework.com",
"detectors": {
"every": [
{
"path": "package.json",
"matchContent": "\"(dev)?(d|D)ependencies\":\\s*{[^}]*\"@ionic\\/angular\":\\s*\".+?\"[^}]*}"
}
]
},
"settings": {
"buildCommand": {
"placeholder": "`npm run build` or `ng build`"
},
"devCommand": {
"value": "ng start"
},
"outputDirectory": {
"value": "www"
}
}
},

{
"name": "Create React App",
"slug": "create-react-app",
Expand Down
47 changes: 47 additions & 0 deletions packages/now-static-build/src/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,53 @@ const frameworkList: Framework[] = [
},
],
},
{
name: 'Ionic React',
slug: 'ionic-react',
dependency: '@ionic/react',
buildCommand: 'react-scripts build',
getOutputDirName: async () => 'build',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it build or public because @now/frameworks has public.

cc @AndyBitz

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's build for ionic-react

defaultRoutes: [
{
src: '/static/(.*)',
headers: { 'cache-control': 's-maxage=31536000, immutable' },
continue: true,
},
{
src: '/service-worker.js',
headers: { 'cache-control': 's-maxage=0' },
continue: true,
},
{
src: '/sockjs-node/(.*)',
dest: '/sockjs-node/$1',
},
{
handle: 'filesystem',
},
{
src: '/(.*)',
headers: { 'cache-control': 's-maxage=0' },
dest: '/index.html',
},
],
},
{
name: 'Ionic Angular',
slug: 'ionic-angular',
dependency: '@ionic/angular',
buildCommand: 'ng build',
getOutputDirName: async () => 'www',
defaultRoutes: [
{
handle: 'filesystem',
},
{
src: '/(.*)',
dest: '/index.html',
},
],
},
{
name: 'Create React App',
slug: 'create-react-app',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "ionic-ng-conf-app"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to the Ionic Conference Application

Thank you for taking the time to contribute! :tada::+1:

The following is a set of guidelines for contributing to the conference app. These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request.

## Table of Contents

- [How To Contribute](#how-to-contribute)
- [Reporting Issues](#reporting-issues)
- [Before Submitting an Issue](#before-submitting-an-issue)
- [Determining the Repository](#determining-the-repository)
- [Submitting the Issue](#submitting-the-issue)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Guidelines for Submitting](#guidelines-for-submitting)
- [Code Style](#code-style)

## How To Contribute

### Reporting Issues

Before submitting an issue, please go through [the list below](#before-submitting-an-issue) as you might find a solution to your issue.

#### Before Submitting an Issue

- Make sure you get the latest version of the code and run through the [Getting Started](https://github.com/ionic-team/ionic-conference-app#getting-started) steps to see if this resolves your issue.
- Check the [forum](https://forum.ionicframework.com) for similar questions and answers.
- Go through [all issues](https://github.com/ionic-team/ionic-conference-app/issues?utf8=%E2%9C%93&q=is%3Aissue) on this repository to see if the issue has already been created. It could have been closed with a resolution, so check closed issues, too.
- Chat with us in the [#ionic-v2](https://ionic-worldwide.slack.com/messages/ionic-v2/) channel on [Slack](http://ionicworldwide.herokuapp.com/) to see if we can find a solution to the problem!
- [Determine which repository](#determining-the-repository) the problem should be reported in.

#### Determining the Repository

There are several repositories being used for Ionic, which makes it difficult to determine which one to report an issue to. Don't worry if you aren't sure, we can always move it!

- The [Ionic repository](https://github.com/ionic-team/ionic) is a repository for all things related to the Ionic Framework. If you are able to reproduce the issue in any of the Ionic starters (or an existing project), you'll want to submit the issue [here](http://ionicframework.com/submit-issue/).
- The [Ionic CLI repository](https://github.com/ionic-team/ionic-cli) contains all of the code that allows you to run `ionic` commands from a terminal window. It is safe to put any issues [here](https://github.com/ionic-team/ionic-cli/issues) that relate to running an `ionic` command.
- [This repository](https://github.com/ionic-team/ionic-conference-app) is a demo of the Ionic Framework. If you find an issue with this app that does not occur on [a new app](http://ionicframework.com/docs/v2/getting-started/installation/), please submit the issue [here](https://github.com/ionic-team/ionic-conference-app/issues).

#### Submitting the Issue

- **Use a clear and descriptive title** for the issue to identify the problem. This makes it easier for others to find.
- **Describe the exact steps to reproduce the problem** with as many details as needed.
- **Provide your configuration** by running `ionic info` in a terminal from _within_ the project folder and pasting this information in the issue.

### Submitting a Pull Request

#### Guidelines for Submitting

When in doubt, keep your pull requests small. To give a PR the best chance of getting accepted, do not bundle more than one "feature" or bug fix per PR. Doing so makes it very hard to accept it if one of the fixes has issues.

It's always best to create two smaller PRs than one big one.

Talk to us before creating a PR that refactors the code or directory structure of the project. This project is constantly changing to reflect the latest version of Ionic Framework so sometimes it will be in the process of getting fixed.

#### Code Style

Make sure to follow the existing code style as much as possible.

- No underscores prefixing JS functions.
- Use flat Sass.
- **Don't** use [BEM conventions](https://css-tricks.com/bem-101/).
- Avoid nesting selectors. This is done to make it easier for users without Sass experience to understand and read.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!--
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING

If you are having problems formatting your issue please refer to this article on using markdown in Github: https://guides.github.com/features/mastering-markdown/
-->

**I'm submitting a ...** (check one with "x")
[ ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

**Current behavior:**

<!-- Describe how the bug manifests. -->

**Expected behavior:**

<!-- Describe what the behavior would be without the bug. -->

**Steps to reproduce:**

<!-- If you are able to illustrate the bug or feature request with an example, please provide steps to reproduce and if possible a demo using the following template:

http://plnkr.co/edit/GJte2b?p=preview
-->

**Related code:**

```
insert any relevant code here
```

**Other information:**

<!-- List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->

**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):

```
insert the output from ionic info here
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
triage:
label: triage
removeLabelWhenProjectAssigned: true
dryRun: false

closeAndLock:
labels:
- label: "ionitron: support"
message: >
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for
bug reports and feature requests. Please use our [forum](https://forum.ionicframework.com) or our
[slack channel](https://ionicworldwide.herokuapp.com/) for questions about the framework.


Thank you for using Ionic!
- label: "ionitron: ionic pro"
message: >
Thanks for the issue! This issue appears to be related to Ionic Pro. We use this issue tracker exclusively for
bug reports and feature requests. Please use the [Ionic Pro Support Forum](https://ionic.zendesk.com/hc/en-us/requests/new)
to report this issue.


Thank you for using Ionic!
- label: "ionitron: missing template"
message: >
Thanks for the issue! It appears that you have not filled out the provided issue template. We use this issue
template in order to gather more information and further assist you. Please create a new issue and ensure the
template is fully filled out.


Thank you for using Ionic!
close: true
lock: true
dryRun: false

lockClosed:
days: 30
maxIssuesPerRun: 100
message: >
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue.
If this is still an issue with the latest version of the Ionic Conference App, please create a new issue and ensure
the template is fully filled out.
dryRun: false

stale:
days: 365
maxIssuesPerRun: 100
exemptLabels:
- good first issue
- triage
exemptAssigned: true
exemptProjects: true
exemptMilestones: true
label: "ionitron: stale issue"
message: >
Thanks for the issue! This issue is being closed due to inactivity. If this is still
an issue with the latest version of the Ionic Conference App, please create a new issue
and ensure the template is fully filled out.


Thank you for using Ionic!
close: true
lock: true
dryRun: false

noReply:
days: 30
maxIssuesPerRun: 100
label: needs reply
responseLabel: triage
exemptProjects: true
exemptMilestones: true
message: >
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still
an issue with the latest version of the Ionic Conference App, please create a new issue
and ensure the template is fully filled out.


Thank you for using Ionic!
close: true
lock: true
dryRun: false

wrongRepo:
repos:
- label: "ionitron: ionic"
repo: ionic
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
associated with the Ionic Conference App. It appears that this issue is associated with the Ionic Framework.
I am moving this issue to the Ionic Framework repository. Please track this issue over there.


Thank you for using Ionic!
- label: "ionitron: cli"
repo: ionic-cli
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
associated with the Ionic Conference App. It appears that this issue is associated with the Ionic CLI.
I am moving this issue to the Ionic CLI repository. Please track this issue over there.


Thank you for using Ionic!
- label: "ionitron: docs"
repo: ionic-docs
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
associated with the Ionic Conference App. It appears that this issue is associated with the Ionic Documentation.
I am moving this issue to the Ionic Docs repository. Please track this issue over there.


Thank you for using Ionic!
- label: "ionitron: stencil"
repo: stencil
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
associated with the Ionic Conference App. It appears that this issue is associated with Stencil.
I am moving this issue to the Stencil repository. Please track this issue over there.


Thank you for using Ionic!
- label: "ionitron: native"
repo: ionic-native
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
associated with the Ionic Conference App. It appears that this issue is associated with Ionic Native.
I am moving this issue to the Ionic Native repository. Please track this issue over there.


Thank you for using Ionic!
close: true
lock: true
dryRun: false