📖 ES6 and Node.js-like environment for QML
Switch branches/tags
greenkeeper-babel-eslint-6.0.4 greenkeeper-babel-eslint-6.0.5 greenkeeper-babel-eslint-6.1.0 greenkeeper-babel-eslint-6.1.1 greenkeeper-babel-eslint-6.1.2 greenkeeper-babel-eslint-7.0.0 greenkeeper-babel-eslint-7.1.0 greenkeeper-babel-eslint-7.1.1 greenkeeper-babel-eslint-7.2.0 greenkeeper-babel-eslint-7.2.1 greenkeeper-babel-eslint-7.2.2 greenkeeper-babel-eslint-7.2.3 greenkeeper-babel-preset-es2015-6.13.0 greenkeeper-babel-preset-es2015-6.13.1 greenkeeper-babel-preset-es2015-6.13.2 greenkeeper-babel-preset-es2015-6.14.0 greenkeeper-babel-preset-es2015-6.16.0 greenkeeper-babel-preset-es2015-6.18.0 greenkeeper-babel-preset-es2015-6.22.0 greenkeeper-babel-preset-es2015-6.24.0 greenkeeper-babel-preset-es2015-6.24.1 greenkeeper-babel-preset-stage-0-6.16.0 greenkeeper-babel-preset-stage-0-6.22.0 greenkeeper-babel-preset-stage-0-6.24.1 greenkeeper-eslint-2.10.0 greenkeeper-eslint-2.10.1 greenkeeper-eslint-2.11.0 greenkeeper-eslint-2.11.1 greenkeeper-eslint-2.12.0 greenkeeper-eslint-2.13.0 greenkeeper-eslint-2.13.1 greenkeeper-eslint-3.0.0 greenkeeper-eslint-3.0.1 greenkeeper-eslint-3.1.0 greenkeeper-eslint-3.1.1 greenkeeper-eslint-3.2.0 greenkeeper-eslint-3.2.1 greenkeeper-eslint-3.2.2 greenkeeper-eslint-3.3.0 greenkeeper-eslint-3.3.1 greenkeeper-eslint-3.4.0 greenkeeper-eslint-3.5.0 greenkeeper-eslint-3.6.0 greenkeeper-eslint-3.6.1 greenkeeper-eslint-3.7.0 greenkeeper-eslint-3.7.1 greenkeeper-eslint-3.8.0 greenkeeper-eslint-3.8.1 greenkeeper-eslint-3.9.0 greenkeeper-eslint-3.9.1 greenkeeper-eslint-3.10.0 greenkeeper-eslint-3.10.1 greenkeeper-eslint-3.10.2 greenkeeper-eslint-3.11.0 greenkeeper-eslint-3.11.1 greenkeeper-eslint-3.12.0 greenkeeper-eslint-3.12.1 greenkeeper-eslint-3.13.0 greenkeeper-eslint-3.13.1 greenkeeper-eslint-3.14.0 greenkeeper-eslint-3.14.1 greenkeeper-eslint-3.15.0 greenkeeper-eslint-3.16.0 greenkeeper-eslint-3.16.1 greenkeeper-eslint-3.17.0 greenkeeper-eslint-3.18.0 greenkeeper-eslint-3.19.0 greenkeeper-eslint-plugin-class-property-1.0.0 greenkeeper-eslint-plugin-class-property-1.0.1 greenkeeper-eslint-plugin-class-property-1.0.2 greenkeeper-eslint-plugin-class-property-1.0.3 greenkeeper-eslint-plugin-class-property-1.0.4 greenkeeper-eslint-plugin-class-property-1.0.5 greenkeeper-eslint-plugin-class-property-1.0.6 greenkeeper-gulp-sourcemaps-1.7.0 greenkeeper-gulp-sourcemaps-1.7.1 greenkeeper-gulp-sourcemaps-1.7.2 greenkeeper-gulp-sourcemaps-1.7.3 greenkeeper-gulp-sourcemaps-1.8.0 greenkeeper-gulp-sourcemaps-1.8.1 greenkeeper-gulp-sourcemaps-1.9.0 greenkeeper-gulp-sourcemaps-1.9.1 greenkeeper-gulp-sourcemaps-1.9.2 greenkeeper-gulp-sourcemaps-1.9.3 greenkeeper-gulp-sourcemaps-1.10.0 greenkeeper-gulp-sourcemaps-1.10.1 greenkeeper-gulp-sourcemaps-1.11.0 greenkeeper-gulp-sourcemaps-1.11.1 greenkeeper-gulp-sourcemaps-2.0.0 greenkeeper-gulp-sourcemaps-2.0.1 greenkeeper-gulp-sourcemaps-2.1.0 greenkeeper-gulp-sourcemaps-2.1.1 greenkeeper-gulp-sourcemaps-2.2.0 greenkeeper-gulp-sourcemaps-2.2.1 greenkeeper-gulp-sourcemaps-2.2.2 greenkeeper-gulp-sourcemaps-2.2.3 greenkeeper-gulp-sourcemaps-2.3.0 greenkeeper-gulp-sourcemaps-2.3.1 greenkeeper-gulp-sourcemaps-2.4.0 greenkeeper-gulp-sourcemaps-2.4.1 greenkeeper-gulp-sourcemaps-2.5.0 greenkeeper-gulp-sourcemaps-2.5.1 greenkeeper-gulp-sourcemaps-2.5.2 greenkeeper-gulp-sourcemaps-2.6.0 master qpm
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
example
qmlify
quickly
.babelrc
.codeclimate.yml
.eslintignore
.eslintrc
.gitignore
.travis.yml
README.md
gulpfile.js
logo.png
logo.psd
package.json

README.md

Quickly =======

Gitter ZenHub.io

npm npm GitHub issues Travis branch

Quickly is a build tool and QML module with provides an NodeJS-like ES6 environment for Javascript used in QML. The goal of the project is to allow you to write awesome modern ES6 Javascript taking advantage of classes, decorators, arrow functions, and best of all, many of the vast array of NPM packages available using the standard ES6 module imports. You can then take that code and use in directly from QML, just as you would with plain, old, QML-specific Javascript. You can even build a library using ES6 and NPM packages, and then distribute that as a standard QML module or QPM package for other developers to use in regular QML or QML-specific Javascript.

For those who would prefer to stick with standard QML-specific Javascript, you can also do that and still use the Quickly library, which gives you promises, the fetch API, and many polyfills. This is great for longtime QML developers or existing projects that just want to drop in some easy-to-use features from modern JS core libraries.

Check out the documentation for more details, usage, and API documentation. If you want a quick and easy way to get started on a new app using Quickly, use quickly-skeleton, a starter kit for building a Qt/QML app with Quickly.

Installation

If you want to get started on your own without reading the docs or using the starter kit, just install QMLify using npm:

npm install -g qmlify

And install the Quickly core library using qpm (read the docs if you don't want to use qpm):

qpm install com.sonrisesoftware.quickly

Examples

Write modern ES6 like this:

import * as url from 'url'  // Use core Node modules

const data = url.parse('http://www.google.com')

// Use the Promise polyfill

const promise = new Promise((resolve, reject) => {
    resolve('Why again did we need a promise here?')
})

// Use the Array.prototype.includes() poylfill

const array = ['A', 'B', 'C']
console.log(array.includes('B'))

// Use ES6 classes

export class Document {
    title = ''
    body = ''

    constructor(title, body) {
        this.title = title
        this.body = body
    }
}

And compile that into JS that QML understands:

import "file.js" as JS

Item {
    Component.onCompleted: {
        var doc = new JS.Document('Hello, World', 'Contents')
    }
}

Licensing

QMLify

QMLify is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

Quickly core modules

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.