mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-15 02:19:24 +08:00
61 lines
13 KiB
HTML
61 lines
13 KiB
HTML
<html lang="en" data-reactroot=""><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="description" content=""/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="Contributing"/><meta name="twitter:description" content=""/><meta property="og:type" content="website"/><meta property="og:title" content="Contributing"/><meta property="og:description" content=""/><title>Contributing</title><link type="text/css" rel="stylesheet" href="app.css"/></head><body><div id='root'><div class="_wrapper__1nbmuhq" data-reactroot=""><aside class="_sidebar__1gt5k1p"><input type="checkbox" class="_menuButton__1gt5k1p" id="slide-sidebar" role="button"/><label class="_menuIcon__1gt5k1p" for="slide-sidebar">☰</label><div class="_menu__1gt5k1p"><input type="search" value="" placeholder="Filter…" class="_searchbar__1gt5k1p"/><nav class="_navigation__1gt5k1p"><a class="_link__1gt5k1p" href="index.html">Home</a><a class="_link__1gt5k1p" href="showcase.html">Showcase</a><a class="_link__1gt5k1p" href="getting-started.html">Getting Started</a><a class="_link__1gt5k1p" href="theming.html">Theming</a><a class="_link__1gt5k1p" href="icons.html">Icons</a><a class="_link__1gt5k1p _active__1gt5k1p" href="contributing.html">Contributing</a><hr class="_separator__1gt5k1p"/><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="appbar.html">Appbar</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="appbar-action.html">Appbar.Action</a><a class="_link__1gt5k1p" href="appbar-back-action.html">Appbar.BackAction</a><a class="_link__1gt5k1p" href="appbar-content.html">Appbar.Content</a><a class="_link__1gt5k1p" href="appbar-header.html">Appbar.Header</a></div></div><a class="_link__1gt5k1p" href="bottom-navigation.html">BottomNavigation</a><a class="_link__1gt5k1p" href="button.html">Button</a><a class="_link__1gt5k1p" href="caption.html">Caption</a><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="card.html">Card</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="card-actions.html">Card.Actions</a><a class="_link__1gt5k1p" href="card-content.html">Card.Content</a><a class="_link__1gt5k1p" href="card-cover.html">Card.Cover</a></div></div><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="checkbox.html">Checkbox</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="checkbox-android.html">Checkbox.Android</a><a class="_link__1gt5k1p" href="checkbox-ios.html">Checkbox.IOS</a></div></div><a class="_link__1gt5k1p" href="chip.html">Chip</a><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="dialog.html">Dialog</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="dialog-actions.html">Dialog.Actions</a><a class="_link__1gt5k1p" href="dialog-content.html">Dialog.Content</a><a class="_link__1gt5k1p" href="dialog-scroll-area.html">Dialog.ScrollArea</a><a class="_link__1gt5k1p" href="dialog-title.html">Dialog.Title</a></div></div><a class="_link__1gt5k1p" href="divider.html">Divider</a><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="">Drawer</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="drawer-item.html">Drawer.Item</a><a class="_link__1gt5k1p" href="drawer-section.html">Drawer.Section</a></div></div><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="fab.html">FAB</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="fab-group.html">FAB.Group</a></div></div><a class="_link__1gt5k1p" href="headline.html">Headline</a><a class="_link__1gt5k1p" href="helper-text.html">HelperText</a><a class="_link__1gt5k1p" href="icon-button.html">IconButton</a><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="">List</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="list-accordion.html">List.Accordion</a><a class="_link__1gt5k1p" href="list-icon.html">List.Icon</a><a class="_link__1gt5k1p" href="list-item.html">List.Item</a><a class="_link__1gt5k1p" href="list-section.html">List.Section</a></div></div><a class="_link__1gt5k1p" href="modal.html">Modal</a><a class="_link__1gt5k1p" href="paragraph.html">Paragraph</a><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="portal.html">Portal</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="portal-host.html">Portal.Host</a></div></div><a class="_link__1gt5k1p" href="progress-bar.html">ProgressBar</a><div><div class="_row__1gt5k1p"><a class="_link__1gt5k1p" href="radio-button.html">RadioButton</a><button class="_buttonIcon__1gt5k1p _expandedIcon__1gt5k1p" style="opacity:0"><svg width="16px" height="16px" viewBox="0 0 16 16"><polygon stroke="none" stroke-width="1" fill-rule="evenodd" fill="currentColor" points="8 4 2 10 3.4 11.4 8 6.8 12.6 11.4 14 10"></polygon></svg></button></div><div class="_sectionItems__1gt5k1p _sectionItemsVisible__1gt5k1p"><a class="_link__1gt5k1p" href="radio-button-android.html">RadioButton.Android</a><a class="_link__1gt5k1p" href="radio-button-group.html">RadioButton.Group</a><a class="_link__1gt5k1p" href="radio-button-ios.html">RadioButton.IOS</a></div></div><a class="_link__1gt5k1p" href="searchbar.html">Searchbar</a><a class="_link__1gt5k1p" href="snackbar.html">Snackbar</a><a class="_link__1gt5k1p" href="subheading.html">Subheading</a><a class="_link__1gt5k1p" href="surface.html">Surface</a><a class="_link__1gt5k1p" href="switch.html">Switch</a><a class="_link__1gt5k1p" href="text.html">Text</a><a class="_link__1gt5k1p" href="text-input.html">TextInput</a><a class="_link__1gt5k1p" href="title.html">Title</a><a class="_link__1gt5k1p" href="touchable-ripple.html">TouchableRipple</a></nav></div></aside><div class="_container__z02bld"><main class="_content__z02bld"><div class="_markdown__1e8xr4b"><h1>Contributing to React Native Paper</h1>
|
|
<h2>Code of Conduct</h2>
|
|
<p>We want this community to be friendly and respectful to each other. Please read <a href="/CODE_OF_CONDUCT.md">the full text</a> so that you can understand what actions will and will not be tolerated.</p>
|
|
<h2>Our Development Process</h2>
|
|
<p>The core team works directly on GitHub and all work is public.</p>
|
|
<h3>Development workflow</h3>
|
|
<blockquote>
|
|
<p><strong>Working on your first pull request?</strong> You can learn how from this <em>free</em> series: <a href="https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github">How to Contribute to an Open Source Project on GitHub</a>.</p>
|
|
</blockquote>
|
|
<ol>
|
|
<li>Fork the repo and create your branch from <code>master</code> (a guide on <a href="https://help.github.com/articles/fork-a-repo/">how to fork a repository</a>).</li>
|
|
<li>Run <code>yarn bootstrap</code> to setup the developement environment.</li>
|
|
<li>Do the changes you want and test them out in the example app before sending a pull request.</li>
|
|
</ol>
|
|
<h3>Commit message convention</h3>
|
|
<p>We prefix our commit messages with one of the following to signify the kind of change:</p>
|
|
<ul>
|
|
<li><code>fix</code>: bug fixes, e.g. fix Button color on DarkTheme.</li>
|
|
<li><code>feat</code>: new features, e.g. add Snackbar component.</li>
|
|
<li><code>refactor</code>: code/structure refactor, e.g. new structure folder for components.</li>
|
|
<li><code>docs</code>: changes into documentation, e.g. add usage example for Button.</li>
|
|
<li><code>test</code>: adding or updating tests, eg unit, snapshot testing.</li>
|
|
<li><code>chore</code>: tooling changes, e.g. change circle ci config.</li>
|
|
<li><code>BREAKING</code>: for changes that break existing usage, e.g. change API of a component.</li>
|
|
</ul>
|
|
<p>Our pre-commit hooks verify that your commit message matches this format when committing.</p>
|
|
<h3>Linting and tests</h3>
|
|
<p>We use <code>flow</code> for type checking, <code>eslint</code> with <code>prettier</code> for linting and formatting the code, and <code>jest</code> for testing. Our pre-commit hooks verify that the linter and tests pass when commiting. You can also run the following commands manually:</p>
|
|
<ul>
|
|
<li><code>yarn flow</code>: run flow on all files.</li>
|
|
<li><code>yarn lint</code>: run eslint and prettier.</li>
|
|
<li><code>yarn test</code>: run tests.</li>
|
|
</ul>
|
|
<h3>Sending a pull request</h3>
|
|
<p>When you're sending a pull request:</p>
|
|
<ul>
|
|
<li>Prefer small pull requests focused on one change.</li>
|
|
<li>Verify that <code>flow</code>, <code>eslint</code> and tests are passing.</li>
|
|
<li>Preview the documentation to make sure it looks good.</li>
|
|
<li>Follow the pull request template when opening a pull request.</li>
|
|
</ul>
|
|
<p>When you're working on a component:</p>
|
|
<ul>
|
|
<li>Follow the guidelines described in the <a href="https://material.io/guidelines/">official material design docs</a>.</li>
|
|
<li>Write a brief description of every prop when defining <code>type Props</code> to aid with documentation.</li>
|
|
<li>Provide an example usage for the component (check other components to get a idea).</li>
|
|
</ul>
|
|
<h3>Running the example</h3>
|
|
<p>The example app uses <a href="https://expo.io/">Expo</a>. You will need to install the Expo app for <a href="https://play.google.com/store/apps/details?id=host.exp.exponent">Android</a> and <a href="https://itunes.apple.com/app/apple-store/id982107779">iOS</a> to start developing.</p>
|
|
<p>After you're done, you can run <code>yarn start</code> in the <code>example/</code> folder and scan the QR code to launch it on your device.</p>
|
|
<h3>Working on documentation</h3>
|
|
<p>The documentation is automatically generated from the <a href="https://flowtype.org">flowtype</a> annotations in the components. You can add comments above the type annotations to add descriptions. To preview the generated documentation, run <code>yarn start</code> in the <code>docs/</code> folder.</p>
|
|
<h2>Reporting issues</h2>
|
|
<p>You can report issues on our <a href="https://github.com/callstack/react-native-paper/issues">bug tracker</a>. Please follow the issue template when opening an issue.</p>
|
|
<h2>License</h2>
|
|
<p>By contributing to React Native Paper, you agree that your contributions will be licensed under its <strong>MIT</strong> license.</p>
|
|
</div></main></div></div></div>
|
|
<script>
|
|
window.__INITIAL_PATH__ = 'contributing';
|
|
</script>
|
|
<script src="app.bundle.js"></script><script src="scripts/snack.js"></script></body></html> |