Skip to content

Commit

Permalink
more and more
Browse files Browse the repository at this point in the history
  • Loading branch information
squallstar committed Feb 17, 2017
1 parent a6cc701 commit 18f8837
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
23 changes: 23 additions & 0 deletions docs/Building-components.md
@@ -0,0 +1,23 @@
# Building components

To start creating a component, use the CLI to generate a boilerplate including the basic things you'll need:

```
$ fliplet create-widget "my-awesome-component"
```

The above code will create a new folder named "my-awesome-component" including the skeleton of your component, including these files:

```
css/
img/
js/interface.js
widget.json
interface.html
build.html
```

We'll first focus on the `widget.json`, which is the definition of your component. If you're used to npm, it's similar to the `package.json` file for npm modules.

## The component definition file (`widget.json`)

8 changes: 7 additions & 1 deletion docs/JS-APIs.md
Expand Up @@ -50,4 +50,10 @@ Our SDK uses [Javascript promises](https://developer.mozilla.org/en-US/docs/Web/
Fliplet.Pages.get().then(function (pages) {

});
```
```

Make sure you're familiar with promises before diving into building components.

When you're ready, move to the next section of the documentation to start building your first component.

<a href="Building-components.html" class="btn">Build a component →</a>
2 changes: 1 addition & 1 deletion docs/Quickstart.md
Expand Up @@ -47,7 +47,7 @@ You can see the version you have installed by running the command below:

```shell
$ fliplet --version
3.0.0
3.0.1
```

You can check the latest available version of the Fliplet CLI on the [Npm](https://www.npmjs.com/package/fliplet-cli) website.
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Expand Up @@ -7,7 +7,7 @@ To get a brief introduction to the technologies we use and the stack of the plat
- [Introduction to the platform](Introduction.md)
- [Quickstart](Quickstart.md)
- [The JS APIs](JS-APIs.md)
- Building components
- [Building components](Building-components.md)
- Building themes
- [API Documentation](API-Documentation.md)
- Publishing
Expand Down
2 changes: 1 addition & 1 deletion fliplet-create-widget.js
Expand Up @@ -39,7 +39,7 @@ ncp(path.join(__dirname, 'widget-template'), folderPath, function (err) {
log('Widget has been successfully created. To run it for development:');
log('');
log(' $ cd ' + packageName);
log(' $ fliplet run-widget');
log(' $ fliplet run');
log('');
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "fliplet-cli",
"version": "3.0.0",
"version": "3.0.1",
"description": "",
"main": "fliplet.js",
"scripts": {
Expand Down

0 comments on commit 18f8837

Please sign in to comment.