Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Aug 7, 2024
0 parents commit cfdcb33
Show file tree
Hide file tree
Showing 35 changed files with 9,052 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = null
142 changes: 142 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Contributing

:tada: First off, thanks for taking the time to contribute!

The following is a set of guidelines for contributing to the `piral-cli-vite5` packages, which is hosted in the smapiot organization on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

## Code of Conduct

This project and everyone participating in it is governed by the [Code of Conduct](../CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to the email specified there.

## How Can I Contribute

### Development Instructions

Please find more information about how to setup your machine for developing the `piral-cli-vite5` packages in [the source documentation](../README.md).

### Reporting Bugs

Before creating bug report, please make sure that you first check the [existing issues](https://github.com/smapiot/piral-cli-vite5/issues?q=is%3Aopen+is%3Aissue+label%3Abug), as you might find that the issue is already reported. Fill out [the required template](https://github.com/smapiot/piral-cli-vite5/issues/new?template=bug_report.md), the information it asks for helps us resolve issues faster.

Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer:, and find related reports :mag_right:.

### Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for the `piral-cli-vite5` packages, including completely new features and minor improvements to existing functionality.

Before creating enhancement suggestions, please make sure that you first check the [existing suggestions](https://github.com/smapiot/piral-cli-vite5/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), as you might find that the enhancement has already been requested. Fill out [the template](https://github.com/smapiot/piral-cli-vite5/issues/new?template=feature_request.md), including the steps that you imagine you would take if the feature you're requesting existed.

#### How Do I Submit a Suggestion

Enhancements or general suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). After you've determined that the enhancement is not already requested, go ahead and create an issue providing the following information:

- **Use a clear and descriptive title** for the issue to identify the suggestion.
- **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
- **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of the `piral-cli-vite5` packages which the suggestion is related to. *Note*: We usually live in code. Any code you can already show would be the best illustration.

## Branching Model

### Main Branches

The central repository holds four main branches with an infinite lifetime:

- **main**
- **develop**
- **experimental**
- **documentation**

We consider `main` to be the main branch where the source code always reflects a production-ready state, and `develop` to be the main branch where the source code always reflects a state with the latest delivered changes for the next release. When the source code in the `develop` branch reaches a stable point and is ready to be released, all of the changes should be merged back into main. Therefore, each time when changes are merged back into main, this is a new production release.

The **experimental** branch is a special branch for an upcoming release that is unclear in scope and functionality. Releases from this branch should be considered unstable and might never reach production. No hotfixes or minor updates will be first-pushed to this branch. Instead, only (experimental) new features are (potentially exclusively) added to this branch.

The **documentation** branch is used for updates and fixes to the currently live (i.e., `main`-build) documentation.

The following table gives an overview:

| Branch Name | NPM Release / Tag | Version Suffix |
| ------------- | ----------------- | -------------- |
| main | latest | (none) |
| develop | next | beta |

If you don't know what to do - use `develop` as target for pull requests.

### Supporting Branches

Next to the main branches `main` and `develop`, our development model uses a few of supporting branches to aid parallel development between team members, ease tracking of features and to assist in quickly fixing live production problems. Unlike the main branches, these branches always have a limited life time, since they will be removed eventually.

The two main different types of branches we may use are:

- **Feature branches**, i.e., `feature/*`
- **Hotfix branches**, i.e., `hotfix/*`

#### Creating a Feature Branch

Create a branch **from** `develop` which must merge back **into** `develop`.

Naming convention:

- anything except `main`, `develop`, `release/*`, or `hotfix/*`
- preferred `feature/{issue-id}-{issue-description}`, e.g., `feature/#123-add-foo`

#### Creating a Hotfix Branch

Create a branch **from** `main` which must merge back **into** either `main` and / or `develop`. While a *real* hotfix will apply to both immediately, a simple fix will just be applied to `develop`.

Naming convention:

- `hotfix/{new-patch-version}`, e.g., `hotfix/1.2.1`
- `hotfix/{issue-id}-{issue-description}`, e.g., `hotfix/#123-fixed-foo-undefined`

Hotfix branches are normally created from the `main` branch (especially if they are applied to both `main` and `develop`, otherwise creating the branch from `develop` may be okay as well). For example, say version 1.2 is the current production release running live and causing troubles due to a severe bug. But changes on develop are yet unstable.

## Pull Request Process

Following is a short guide on how to make a valid Pull Request.

1. Firstly you need a local fork of the the project, so go ahead and press the `fork` button in
GitHub. This will create a copy of the repository in your own GitHub account and you'll see a
note that it's been forked underneath the project name: `Forked from smapiot/piral-cli-vite5`.
Clone the newly forked repository locally and set up a new remote that points to the original
project so that you can grab any changes and bring them into your local copy.

```sh
git remote add upstream [email protected]:smapiot/piral-cli-vite5.git
```

You now have two remotes for this project on disk:

1. `origin` which points to your GitHub fork of the project.
You can read and write to this remote.
2. `upstream` which points to the main project's GitHub repository.
You can only read from this remote.
2. Create the branch, following or [Branching Model](#branching-model).
3. Do some work :) This is the fun part where you get to contribute to the `piral-cli-vite5` packages :rocket:.
4. Before pushing your code, few more task that need to be preformed:
- Make sure that the test and build scripts run successfully
```sh
npm test
lerna run build
```
- Update the *CHANGELOG.md* following our convention
5. Commit and push the code to the origin.
```sh
git commit -m "Description of my awesome new feature"
git push origin HEAD
```
6. After the code is successfully pushed to the origin repository, navigate to
[`piral-cli-vite5` repository](https://github.com/smapiot/piral-cli-vite5/pulls)
and issue a new pull request.
You may merge the Pull Request in once you have the sign-off of at least one other (core) developer, or if you do not have permission to do that, you may request the reviewer to merge it for you.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [smapiot, FlorianRappl]
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Issue Templates

Please use one of the following templates to create your issue:

- [Bug report](https://github.com/smapiot/piral-cli-vite5/issues/new?template=bug_report.md)
- [Feature proposal](https://github.com/smapiot/piral-cli-vite5/issues/new?template=feature_request.md)

In case of questions please either use [our Gitter chat room](https://gitter.im/piral-io/community) or (preferably) [the Piral tag on StackOverflow](https://stackoverflow.com/questions/tagged/piral).
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
---

# Bug Report

For more information, see the `CONTRIBUTING` guide.

## Prerequisites

- [ ] Can you reproduce the problem in a [MWE](https://en.wikipedia.org/wiki/Minimal_working_example)?
- [ ] Are you running the latest version?
- [ ] Did you perform a search in the issues?

## Environment Details and Version

[Package Version, OS, Browser, ...]

## Description

[Description of the bug]

## Steps to Reproduce

1. [First Step]
2. [next step...]

## Expected behavior

[What you expected to happen]

## Actual behavior

[What actually happened]

## Possible Origin / Solution

[Optionally, share your idea to fix the issue]
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''
---

# New Feature Proposal

For more information, see the `CONTRIBUTING` guide.

## Description

[Description of the proposed feature]

## Background

[Provide any additional background for the feature, e.g., why is the current solution insufficient, what problem will it solve, etc.]

## Discussion

[Optionally, outline any pros and cons you can currently think of to provide the basis for a solid discussion]
31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# New Pull Request

For more information, see the `CONTRIBUTING` guide.

## Prerequisites

Please make sure you can check the following boxes:

- [ ] I have read the **CONTRIBUTING** document
- [ ] My code follows the code style of this project
- [ ] All new and existing tests passed

## Type(s) of Changes

### Contribution Type

What types of changes does your code introduce? Put an `x` in all the boxes that apply:

- [ ] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
- [ ] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes

### Description

[Place a meaningful description here]

### Remarks

[Optionally place any follow-up comments, remarks, observations, or notes here for future reference]
21 changes: 21 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- in-review
- in-testing
- in-implementation
- information
- spike
- help wanted
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ develop, main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '19 3 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
19 changes: 19 additions & 0 deletions .github/workflows/twitter-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: tweet-release

on:
release:
types:
- published

jobs:
tweet:
runs-on: ubuntu-latest
steps:
- uses: smapiot/send-tweet-v2-action@v1
name: Tweet new release
with:
status: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! ${{ github.event.release.html_url }} #microfrontends #piral #cli #vite5 #release"
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
Loading

0 comments on commit cfdcb33

Please sign in to comment.