Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] move component bootstrap instructions to top README #536

Merged
merged 1 commit into from
Aug 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion packages/generator-electrode/component/templates/_readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# <%= projectName %>-component
# &lt;%= projectName %>-component

Welcome to the top level of the repo for React component &lt;%= projectName %>.

This is designed to be a lerna repo with the following two directories:

- `packages`
- `demo-app`

`packages` contains the actual component modules.

`demo-app` contains an Electrode App that allows you to test and develop the components.

To start developing, first install the lerna dependencies at the top level:

```bash
npm install
```

And then bootstrap the modules under `packages`:

```bash
npm run bootstrap
```

To start playing with the included demo components:

```bash
cd demo-app
npm install
clap dev
```

Then open your browser to `http://localhost:3000`
Original file line number Diff line number Diff line change
@@ -1,50 +1,32 @@
# <%= projectName %>

__COMPONENT DESCRIPTION GOES HERE__
# &lt;%= projectName %>

**COMPONENT DESCRIPTION GOES HERE**

## Demo & Examples

Live demo: [<%= ghUser %>.github.io/<%= packageName %>](http://<%= ghUser %>.github.io/<%= packageName %>/)

To build the package locally, please go to the root level and run:
Live demo: [&lt;%= ghUser %>.github.io/&lt;%= packageName %>]\(&lt;http&#x3A;//&lt;%= ghUser %>.github.io/&lt;%= packageName %>/>)

```bash
$ npm install
$ npm run bootstrap
```
To develop and see this component in action, please check the [README](../../README.md) at the top level of this repo for instructions.

To test the package locally, please run:
If you want to run test for this component locally, please run:

```bash
$ clap check
```

To preview the package demo locally by using `demo-app`:

```bash
$ cd ../../demo-app
$ clap dev

```

Then open [`localhost:3000`](http://localhost:3000) in a browser.


## Installation

The easiest way to use <%= packageName %> is to install it from NPM and include it in your own React build process (using [Browserify](http://browserify.org), [Webpack](http://webpack.github.io/), etc).

You can also use the standalone build by including `dist/<%= packageName %>.js` in your page. If you use this, make sure you have already included React, and it is available as a global variable.
The easiest way to use &lt;%= packageName %> is to install it from NPM and include it in your own React build process.

```bash
$ npm install <%= packageName %> --save
```

This component is designed to work with React application built with [Electrode].

## Usage

__EXPLAIN USAGE HERE__
**EXPLAIN USAGE HERE**

```js
var <%= componentName %> = require('<%= packageName %>');
Expand All @@ -54,19 +36,18 @@ var <%= componentName %> = require('<%= packageName %>');

### Properties

* __DOCUMENT PROPERTIES HERE__
- **DOCUMENT PROPERTIES HERE**

### Notes

__ADDITIONAL USAGE NOTES__

**ADDITIONAL USAGE NOTES**

## Development (`src`, `lib` and the build process)

**NOTE:** The source code for the component is in `src`. A transpiled CommonJS version (generated with Babel) is available in `lib` for use with node.js, browserify and webpack. A UMD bundle is also built to `dist`, which can be included without the need for any build system.
**NOTE:** The source code for the component is in `src`. A transpiled CommonJS version (generated with Babel) is available in `lib` for use with node.js and webpack. A UMD bundle is also built to `dist`, which can be included without the need for any build system.

## License

__PUT LICENSE HERE__
**PUT LICENSE HERE**

Copyright (c) <%= currentYear %> <%= developerName %>.
Copyright (c) &lt;%= currentYear %> &lt;%= developerName %>.