Skip to content

Commit

Permalink
Update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iBelieve committed Mar 26, 2016
1 parent b9287b0 commit 2891cc2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
6 changes: 5 additions & 1 deletion docs/corejs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ The following pollyfills are included (links are to documentation, usually on MD
Core Modules
------------

- url
- url (exposed as Url to qml)
- querystring (exposed as Querystring)
- punycode (exposed as Punycode)
- path (incomplete, exposed as Paths, not Path, because of the QtQuick.Path)
- fs (incomplete, exposed as FileSystem)

Usage
-----
Expand Down
32 changes: 14 additions & 18 deletions docs/distributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,25 @@ To bridge the gap between the QML way of doing things and the ES6 style, ``qmlif

Test 0.1 test.js

// package.yml
exports:
test: ExampleModule/Test

Optionally, you can specify the default or latest version in the export::

// package.yml
exports:
test: ExampleModule/Test 0.1
// quickly.json
{
"exports": {
"test": "ExampleModule/Test"
}
}

And install the ``package.yml`` file along side the ``qmldir`` and QML/JS files. Now in your app you'd do the following::
And install the ``quickly.json`` file (from the build folder, NOT the original one in your source folder) along side the ``qmldir`` and QML/JS files. Now in your app you'd do the following::

// app.js
import {test} from 'test'

test()

// package.yml
dependencies:
test: 0.1

If a default version is available and you want to use that, you can leave the dependency out of the ``package.yml`` file.

Note that the ``package.yml`` is used to both list dependencies and/or exports, depending on your needs. To see all available QMLified modules, run::
// quickly.json
{
"dependencies": {
"test": "0.1"
}
}

$ qmlify --modules
If a default version is available and you want to use that, you can leave the dependency out of the ``quickly.json`` file.
6 changes: 3 additions & 3 deletions docs/qmlify.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ QMLify Transpiler
Babel setup and basic usage
---------------------------

To use ``qmlify``, you will need to the ``babel`` CLI installed globally using NPM::
To use ``qmlify``, you will need to the ``babel`` and ``qmlify`` CLIs installed globally using NPM::

$ npm install -g babel-cli
$ npm install -g babel-cli qmlify

You will need to add a ``.babelrc`` file to tell ``babel`` (used by ``qmlify``) which transformations to apply. Here is a sample ``.babelrc`` file with ES6 and some additional features enabled:

Expand All @@ -27,7 +27,7 @@ Based on the this config file, you will need the following NPM packages saved lo

Now just run `qmlify` on your src directory like this::

$ qmlify src build
$ qmlify -d src

This will transpile all JS files and copy any other files to the ``build`` directory. Now, run or reference your main QML file from the ``build`` directory instead of the `src` directory.

Expand Down

0 comments on commit 2891cc2

Please sign in to comment.