https://github.com/quickly/quickly
:book: ES6 and Node.js-like environment for QML
https://github.com/quickly/quickly
Last synced: 14 days ago
JSON representation
:book: ES6 and Node.js-like environment for QML
- Host: GitHub
- URL: https://github.com/quickly/quickly
- Owner: quickly
- Created: 2016-03-12T20:14:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-21T21:39:50.000Z (over 8 years ago)
- Last Synced: 2025-09-26T09:25:32.716Z (2 months ago)
- Language: JavaScript
- Homepage: http://ibeliever.github.io/quickly
- Size: 337 KB
- Stars: 220
- Watchers: 19
- Forks: 31
- Open Issues: 115
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-qt-qml - Quickly - ES6 and Node.js-like environment for QML. (JavaScript)
README
Quickly
=======
[](https://gitter.im/quickly/quickly)
[](https://zenhub.io)
[](https://www.npmjs.com/package/qmlify)
[](https://www.npmjs.com/package/qmlify)
[](https://github.com/quickly/quickly/issues)
[](https://travis-ci.org/quickly/quickly)
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](http://quickly.readthedocs.org/en/latest/) 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](https://github.com/quickly/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:
```es6
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:
```qml
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/.