chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-13 15:49:07 -07:00
parent f41b607899
commit 4496cd9f2c
6 changed files with 28 additions and 100 deletions

View File

@@ -1,83 +0,0 @@
# NativeScript Community Code of Conduct
Our community members come from all walks of life and are all at different stages of their personal and professional journeys. To support everyone, we've prepared a short code of conduct. Our mission is best served in an environment that is friendly, safe, and accepting; free from intimidation or harassment.
Towards this end, certain behaviors and practices will not be tolerated.
## tl;dr
- Be respectful.
- We're here to help.
- Abusive behavior is never tolerated.
- Violations of this code may result in swift and permanent expulsion from the NativeScript community channels.
## Administrators
- Dan Wilson (@DanWilson on Slack)
- Jen Looper (@jen.looper on Slack)
- TJ VanToll (@tjvantoll on Slack)
## Scope
We expect all members of the NativeScript community, including administrators, users, facilitators, and vendors to abide by this Code of Conduct at all times in our community venues, online and in person, and in one-on-one communications pertaining to NativeScript affairs.
This policy covers the usage of the NativeScript Slack community, as well as the NativeScript support forums, NativeScript GitHub repositories, the NativeScript website, and any NativeScript-related events. This Code of Conduct is in addition to, and does not in any way nullify or invalidate, any other terms or conditions related to use of NativeScript.
The definitions of various subjective terms such as "discriminatory", "hateful", or "confusing" will be decided at the sole discretion of the NativeScript administrators.
## Friendly, Harassment-Free Space
We are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics.
We ask that you please respect that people have differences of opinion regarding technical choices, and acknowledge that every design or implementation choice carries a trade-off and numerous costs. There is seldom a single right answer. A difference of technology preferences is never a license to be rude.
Any spamming, trolling, flaming, baiting, or other attention-stealing behaviour is not welcome, and will not be tolerated.
Harassing other users of NativeScript is never tolerated, whether via public or private media.
Avoid using offensive or harassing package names, nicknames, or other identifiers that might detract from a friendly, safe, and welcoming environment for all.
Harassment includes, but is not limited to: harmful or prejudicial verbal or written comments related to gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics; inappropriate use of nudity, sexual images, and/or sexually explicit language in public spaces; threats of physical or non-physical harm; deliberate intimidation, stalking or following; harassing photography or recording; sustained disruption of talks or other events; inappropriate physical contact; and unwelcome sexual attention.
## Acceptable Content
The NativeScript administrators reserve the right to make judgement calls about what is and isn't appropriate in published content. These are guidelines to help you be successful in our community.
Content must contain something applicable to the previously stated goals of the NativeScript community. "Spamming", that is, publishing any form of content that is not applicable, is not allowed.
Content must not contain illegal or infringing content. You should only publish content to NativeScript properties if you have the right to do so. This includes complying with all software license agreements or other intellectual property restrictions. For example, redistributing an MIT-licensed module with the copyright notice removed, would not be allowed. You will be responsible for any violation of laws or others intellectual property rights.
Content must not be malware. For example, content (code, video, pictures, words, etc.) which is designed to maliciously exploit or damage computer systems, is not allowed.
Content name, description, and other visible metadata must not include abusive, inappropriate, or harassing content.
## Reporting Violations of this Code of Conduct
If you believe someone is harassing you or has otherwise violated this Code of Conduct, please contact the administrators and send us an abuse report. If this is the initial report of a problem, please include as much detail as possible. It is easiest for us to address issues when we have more context.
## Consequences
All content published to the NativeScript community channels is hosted at the sole discretion of the NativeScript administrators.
Unacceptable behavior from any community member, including sponsors, employees, customers, or others with decision-making authority, will not be tolerated.
Anyone asked to stop unacceptable behavior is expected to comply immediately.
If a community member engages in unacceptable behavior, the NativeScript administrators may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event or service).
## Addressing Grievances
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify the administrators. We will do our best to ensure that your grievance is handled appropriately.
In general, we will choose the course of action that we judge as being most in the interest of fostering a safe and friendly community.
## Contact Info
Please contact Dan Wilson @DanWilson if you need to report a problem or address a grievance related to an abuse report.
You are also encouraged to contact us if you are curious about something that might be "on the line" between appropriate and inappropriate content. We are happy to provide guidance to help you be a successful part of our community.
## Credit and License
This Code of Conduct borrows heavily from the WADE Code of Conduct, which is derived from the NodeBots Code of Conduct, which in turn borrows from the npm Code of Conduct, which was derived from the Stumptown Syndicate Citizen's Code of Conduct, and the Rust Project Code of Conduct.
This document may be reused under a Creative Commons Attribution-ShareAlike License.

View File

@@ -1,247 +0,0 @@
# Contributing
====================
<!-- TOC depthFrom:2 -->
- [Introduction](#introduction)
- [Project Structure](#project-structure)
- [Setup](#setup)
- [Testing locally](#testing-locally-by-running-e2e-tests)
- [Reporting Bugs](#reporting-bugs)
- [Requesting Features](#requesting-features)
- [Submitting PR](#submitting-pr)
- [Publishing new versions](#publishing-new-versions)
<!-- /TOC -->
## Introduction
First of all, thank you for taking the time to contribute!
Before starting, make yourself familiar with the `@nativescript/webpack`'s [documentation](http://docs.nativescript.org/best-practices/bundling-with-webpack) and the official [NativeScript Code Of Conduct]( https://github.com/NativeScript/codeofconduct).
## Project Structure
The repository contains several ingredients:
* `installer.js` - combination of postinstall scripts for adding or removing webpack configurations and necessary dependecies when installing the plugin.
* `templates/` - webpack config templates for different types of projects - NativeScript with JavaScript, NativeScript with TypeScript and NativeScript Angular projects.
* `plugins/` - several [Webpack plugins](https://webpack.js.org/concepts/plugins/) necessary for bundling NativeScript applications.
* `snapshot/android/` - tools used with the `NativeScriptSnapshot` plugin for generating V8 Heap Snapshots.
* `nativescript-target/` - configuration of a [Webpack deployment target](https://webpack.js.org/concepts/targets/) for building NativeScript applications.
* `bin/` - helper node/npm scripts for projects using the plugin.
* `demo/` - resides several NativeScript applications, testing different scenarios. You can execute each app's tests by navigating to its directory and running `npm run e2e -- --runType nameOfRuntype`. For more information on runTypes, check out the [nativescript-dev-appium](https://github.com/NativeScript/nativescript-dev-appium#custom-appium-capabilities) plugin.
## Setup
> Note that you need npm 5+ for local development of the plugin.
1. [Fork](https://help.github.com/articles/fork-a-repo/) and clone the GitHub repository:
```bash
git clone https://github.com/your-username/nativescript-dev-webpack.git
```
2. Add an 'upstream' remote pointing to the original repository:
```bash
cd nativescript-dev-webpack
git remote add upstream https://github.com/NativeScript/nativescript-dev-webpack.git
```
3. Create a branch for your changes:
```bash
git checkout -b <my-fix-branch> master
```
4. Install dependencies:
```bash
npm install
```
The last command also runs `npm prepare` which compiles the TypeScript files in the plugin.
You are good to go! You're strongly encouraged to follow the official NativeScript [Coding Conventions](https://github.com/NativeScript/NativeScript/blob/master/CodingConvention.md) and to use ES features available in NodeJS v6. If unsure, check on [node.green](http://node.green/).
## Testing locally by running e2e tests
NOTE: There are three test apps in the repository, located in the `/demo` directory. The steps below describe how to run the tests for the `AngularApp`, but the same approach can be used to run any other `e2e` tests.
1. Navigate to `demo/AngularApp`.
``` bash
cd demo/AngularApp
```
2. Install your local copy of the `@nativescript/webpack` plugin.
```bash
npm run setup
```
3. Make sure to have an emulator set up or connect a physical Android/iOS device.
4. Build the app for Android or iOS.
``` bash
tns run android/ios
```
5. Install [appium](http://appium.io/) globally.
``` bash
npm install -g appium
```
6. Follow the instructions in the [nativescript-dev-appium](https://github.com/nativescript/nativescript-dev-appium#custom-appium-capabilities) plugin to add an appium capability for your device inside `./e2e/renderer/e2e/config/appium.capabilities.json`.
7. Run the automated tests. The value of the `runType` argument should match the name of the capability that you just added.
``` bash
npm run e2e -- --runType capabilityName
```
## Reporting Bugs
1. Always update to the most recent master release; the bug may already be resolved.
2. Search for similar issues in the issues list for this repo; it may already be an identified problem.
3. If this is a bug or problem that is clear, simple, and is unlikely to require any discussion -- it is OK to open an issue on GitHub with a reproduction of the bug including workflows and screenshots. If possible, submit a Pull Request with a failing test, entire application or module. If you'd rather take matters into your own hands, fix the bug yourself (jump down to the [Submitting a PR](#submitting-pr) section).
## Requesting Features
1. Use Github Issues to submit feature requests.
2. First, search for a similar request and extend it if applicable. This way it would be easier for the community to track the features.
3. When requesting a new feature, please provide as much detail as possible about why you need the feature in your apps. We prefer that you explain a need rather than explain a technical solution for it. That might trigger a nice conversation on finding the best and broadest technical solution to a specific need.
## Submitting PR
1. Create one or several commits describing your changes. Follow the [Angular commit message guidelines](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w).
2. Push your branch to GitHub:
```bash
git push origin my-fix-branch
```
3. In GitHub, send a pull request to `nativescript-dev-webpack:master`. If we suggest changes, then:
* Make the required updates.
* Commit the changes to your branch (e.g. `my-fix-branch`).
* Push the changes to your GitHub repository (this will update your PR).
4. If your branch gets too outdated you may need to rebase it on top of the upstream master and force push to update your PR:
1. Fetch the latest changes
```bash
git fetch upstream
```
2. Check out to your fork's local `master` branch
```bash
git checkout master
```
3. Merge the original repo changes into your local `master` branch
```bash
git merge upstream/master
```
4. Rebase it on top of `master`
```bash
git rebase -i master
```
5. Update your PR with force push
```bash
git push -f origin my-fix-branch
```
Thank you for your contribution!
## Publishing new versions
## <a name="release"></a> Releasing new versions
Instructions how to release a new version for **NativeScript Core Team Members**.
![](./release-contribution-guide-schema-webpack.png?raw=true)
1. Checkout release branch
```
git checkout release && git pull
```
#### If we prepare major or minor release, merge master in release branch else **skip this step**.
```
git merge --ff-only origin/master
```
*** Note: If there are commits in release branch which are not merged in master branch '-ff-merge' command will fail.
In this case the commits should be merge firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1.
2. Execute `npm i` to install dependencies:
```
npm i
```
3. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version:
```
npm --no-git-tag-version version [patch|minor|major] -m "release: cut the %s release"
```
or
```
npm --no-git-tag-version version [version] --allow-same-version -m "release: cut the %s release"
```
7. Create release-branch with change log
```
git checkout -b release-[release-version]
```
7. Add changes
```
git add changed-files
git commit -m "release: cut the %s release"
git push
```
8. Create git tag
```
git tag release-version
git push --tags
```
9. Create a pull request from git in web or try to use script below. Be careful to base your branch on the correct "release" branch
```
curl -d '{"title": "release: cut the [release-version] release","body": "docs: update changelog","head": "${BRANCH}","base": "release"}' -X POST https://api.github.com/repos/NativeScript/nativescript-dev-webpack/pulls -H "Authorization: token ${GIT_TOKEN}"
```
10. Merge PR into release branch.
11. If all checks has passed publish package. Usually the night builds will be triggered and the package will be ready to be released on the next day.
## Merge changes from release into master
![](./merge-guidance-schema.png)
### Here are steps described in the diagram above.
1. Make sure you are in release branch:
```
git checkout release
git pull
```
2. Create PR to merge changes back in master and preserve history:
```
export MERGE_BRANCH='merge-release-in-master'
git checkout -b ${MERGE_BRANCH}
git push --set-upstream origin ${MERGE_BRANCH}
git merge origin/master
```
3. Resolve conflicts. Choose to keep the version of master branch. If it is needed to revert versions of modules, see at the bottom.
4. Add conflicts:
```
git add resolved files
```
5. Commit changes with default merge message:
```
git commit
git push
```
6. Create pull request. Replace replace env ${MERGE_BRANCH} with its value
```
curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "merge-release-in-master","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}"
```
**If needed, revert version of modules and platform declarations to take the one from master:**
```
git checkout origin/master tns-platform-declarations/package.json tns-core-modules/package.json
git commit --amend
git push --force-with-lease
```
This will require to repeat steps from 1 to 4, since we need to keep the branches with the same history

View File

@@ -1,11 +0,0 @@
This document describes comment messages available to execute tests on pull request.
|Comment |Commit Status Context|Description|
|:----------------------:|:-------------------:|:---------:|
|`run ci` | |Run all below.|
|`js`|ci/jenkins/webpack-js|Pack the *@nativescript/webpack* plugin and bundle the [template-hello-world](https://github.com/NativeScript/template-hello-world) template app. |
|`ts`|ci/jenkins/webpack-ts|Pack the *@nativescript/webpack* plugin and bundle the [template-hello-world-ts](https://github.com/NativeScript/template-hello-world-ts) template app.|
|`ng`|ci/jenkins/webpack-ng|Pack the *@nativescript/webpack* plugin and bundle the [template-hello-world-ng](https://github.com/NativeScript/template-hello-world-ng) template app.|
|`groceries`|ci/jenkins/webpack-groceries|Pack the *@nativescript/webpack* plugin and bundle the [Groceries](https://github.com/NativeScript/sample-Groceries) app. |
|`sdk`|ci/jenkins/webpack-sdk|Pack the *@nativescript/webpack* plugin and bundle the [SDK](https://github.com/NativeScript/nativescript-sdk-examples-ng) app. |
|`testsappng`|ci/jenkins/webpack-testsappng|Pack the *@nativescript/webpack* plugin and bundle the [tests-app-ng](https://github.com/NativeScript/tests-app-ng) app. |

View File

@@ -29,11 +29,12 @@
"url": "https://github.com/NativeScript/nativescript-dev-webpack.git"
},
"scripts": {
"clean": "npx rimraf -- node_modules package-lock.json && npm i",
"tsc": "tsc",
"postinstall": "node postinstall.js",
"preuninstall": "node preuninstall.js",
"postpack": "rm -rf node_modules",
"setup": "npm i && npm run build",
"setup": "npm run clean && npm run build",
"build": "npm run tsc && npm run jasmine",
"test": "npm run build",
"jasmine": "jasmine --config=jasmine-config/jasmine.json",