Skip to content

Add CONTRIBUTING.md and update guides#4511

Merged
vakrilov merged 9 commits into
masterfrom
update-mds
Jul 6, 2017
Merged

Add CONTRIBUTING.md and update guides#4511
vakrilov merged 9 commits into
masterfrom
update-mds

Conversation

@vakrilov
Copy link
Copy Markdown
Contributor

@vakrilov vakrilov commented Jul 5, 2017

In this PR:

  • Remove old an irrelevant articles
  • Updated existing articles
  • Added Contributing.md guide
  • Added WritingUnitTests.md guide

CC @tjvantoll @jlooper

@vakrilov vakrilov requested a review from tjvantoll July 5, 2017 14:55
@ns-bot ns-bot added the cla: yes label Jul 5, 2017
Copy link
Copy Markdown
Contributor

@tjvantoll tjvantoll left a comment

Choose a reason for hiding this comment

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

Love this. The unit testing stuff is especially 👌

I left a few notes here and there but they’re all relatively trivial.

Comment thread DevelopmentWorkflow.md Outdated
- `tns-core-modules` - Core ui, io and sensor modules
- `apps` - UI app used for manual testing and automation
- `tests` - Unit tests for the `tns-core-modules`
- `tns-platform-declarations` - Android and iOS native APIs supported in JavaScript
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might want to mention that these are TypeScript declaration files.

Comment thread DevelopmentWorkflow.md Outdated

The repository contains several packages and apps:
- `tns-platform-declarations` - Android and iOS native APIs supported in JavaScript
- `tns-core-modules` - Core ui, io and sensor modules
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not related to this PR, but this description is kind of meh. Maybe, “The core NativeScript TypeScript modules used to develop NativeScript apps”

Comment thread DevelopmentWorkflow.md Outdated
@@ -49,29 +55,55 @@ tsc --skipLibCheck -w
```

The modules have `typescript` as devDependency so you should also be able to use locally installed TypeScript compiler from node_modules:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as a devDependency

use the locally installed TypeScript

Comment thread DevelopmentWorkflow.md Outdated
npm run setup

# After changes in the modules or the tests
After the [initial setup](#initial-setup) ypu can run the tests with:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ypu --> you 😄

Comment thread DevelopmentWorkflow.md Outdated
# After changes in the modules or the tests
After the [initial setup](#initial-setup) ypu can run the tests with:
```bash
# Make sure typescript is transpiled
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TypeScript

Comment thread WritingUnitTests.md Outdated
## Writing Test Module
The test modules are actually TypeScript modules which export unit tests and hooks as functions following this convention:

* All exported function which begin with `test` prefix are unit-tests.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

function --> functions

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with a test prefix

Comment thread WritingUnitTests.md Outdated
* The `tearDownModule()` hook is called once - after all the tests in the module.

# Asserting
Test will fail if assert is not satisfied or if error is thrown during execution.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A test will fail if assert is not satisfied or if an error is thrown during execution.

Comment thread WritingUnitTests.md Outdated

# Async Tests

Unit test can accept a single argument - a done callback. Test framework will wait for the `done()` callback to be called (or the test to timeout) before moving on.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unit test --> Unit tests

The framework --> The test framework

Comment thread CONTRIBUTING.md
@@ -0,0 +1,75 @@
# Contributing to NativeScript
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Extremely trivial note: when this PR lands let me know I need to update a link I have to the current .github/CONTRIBUTING.md path on https://www.nativescript.org/contribute.

Comment thread CONTRIBUTING.md Outdated

* The fun part! Make your code changes

* Follow the [code conventions guide](CodeConvention.md)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: maybe add numbers to these requirements to make these next few sentences a little easier to read and follow. Here’s a rough idea of what I’m thinking.

    1. Ensure your code follows the NativeScript code conventions guide.
    1. Write unit tests for your fix or feature...
    1. Rebase your changes to the latest version of the master branch of this repository.
    1. Make sure all unit tests are green for iOS and Android.
    1. Ensure your changes pass tslint validation.

When you’ve verified these changes to ahead and submit a PR...

@vakrilov vakrilov merged commit e1bba78 into master Jul 6, 2017
@vakrilov vakrilov deleted the update-mds branch July 6, 2017 13:17
@lock
Copy link
Copy Markdown

lock Bot commented Aug 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants