Skip to content

Commit

Permalink
docs(): add local CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Sep 6, 2018
1 parent 3dd9604 commit 11d4fb9
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 0 deletions.
121 changes: 121 additions & 0 deletions core/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Contribution guide

## Contribute to Ionic Core

Ionic Core is the fundation of Ionic v4. It's based in [Stencil](https://stenciljs.com) and consist in a set of web components a long of JS and CSS utils.


### Installing dependencies

Before you can build ionic, we assume the following list of software is already installed in your system

- Git
- Node 8 or higher
- Npm 6.0 or higher


### Fork repository

In order to contributo to Ionic, you must have a github account so you can push code and create a new Pull Request (PR).

Once you are all setup, following the Github's guide of how to fork a repository: https://guides.github.com/activities/forking/


### Build Ionic Core

```bash
# Clone your Github repository:
git clone https://github.com/<github username>/ionic.git

# Go to the core directory:
cd ionic/core

# Install npm dependencies
npm install

# Run Ionic dev server
npm run dev
```

### Development Workflow

#### 1. Run Dev Server

```bash
# Move to the core folder
cd core

# Run dev server
npm run dev
```

You should be able to navigate to `http://localhost:3333` which will look like a file browser.

E2E tests are located inside the `src/component` folder, in the following way: `http://localhost:3333/src/components/{COMPONENT}/test/`


**Path examples:**

- ActionSheet basic test: http://localhost:3333/src/components/action-sheet/test/basic
- Nav basic test: http://localhost:3333/src/components/nav/test/basic
- Button basic test:
http://localhost:3333/src/components/button/test/basic


**IMPORTANT**

Leave the dev server running in the background while you make changes. The dev server listen for changes and automatically recompile Ionic for you.



#### 2. Open `core` folder in your IDE

Components implementations live inside the `core/src/components` folder.

You can find each ionic component inside their directory.


#### 3. Run test suite

Before commiting your changes make sure tests are passing:

```
npm run validate
```

#### 4. Create a branch and commit

```bash
# Create a git branch
git checkout -b my-improvement

# Add changes
git add .

# Create commit
git commit -m "fix(component): message"
```

Create a PR:
https://guides.github.com/activities/forking/


### Summary

```bash
# Clone repo
git clone git@github.com:ionic-team/ionic.git

# Move to ionic/core folder
cd ionic/core

# Install npm dependencies
npm i

# Run dev server
npm run dev

# Run test suite
npm run validate
```

4 changes: 4 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ The `@ionic/core` package can by used in simple HTML, or by vanilla JavaScript w
* [@ionic/angular](https://www.npmjs.com/package/@ionic/angular)


## How to contribute

[Check out the CONTRIBUTE guide](CONTRIBUTING.md)

## Related

* [Ionic Documentation](https://ionicframework.com/docs/)
Expand Down

0 comments on commit 11d4fb9

Please sign in to comment.