Go to file
openKylinBot e93a9e0eb3 changed debian/source/format to native 2022-05-13 23:18:44 +08:00
build Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
debian changed debian/source/format to native 2022-05-13 23:18:44 +08:00
doc Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
examples Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
gi function: Use GIArgument.v_int for enum and flags types 2022-05-13 23:18:44 +08:00
gjs Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
installed-tests Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
libgjs-private Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
modules Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
subprojects Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
test api-test-timeout 2022-05-13 23:18:44 +08:00
tools Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
util Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
.clang-format Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
.eslintignore Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
.eslintrc.yml Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
.lint-condo.yaml Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
CONTRIBUTING.md Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
COPYING Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
COPYING.LGPL Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
CPPLINT.cfg Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
NEWS Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
README.MSVC.md Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
README.md Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
gjs.doap Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
js.gresource.xml Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
libgjs.map Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
libgjs.symbols Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
meson.build Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00
meson_options.txt Import Upstream version 1.64.1 2022-05-13 23:18:42 +08:00

README.md

Build Status Coverage report Contributors Last commit Search hit License License

JavaScript bindings for GNOME

Use the GNOME platform libraries in your JavaScript programs. GJS powers GNOME Shell, Polari, GNOME Documents, and many other apps. Under the hood it uses SpiderMonkey, Mozilla's JavaScript engine originally developed for Firefox.

Wiki: https://gitlab.gnome.org/GNOME/gjs/wikis/Home

Installation

Available as part of your GNOME distribution by default. In most package managers the package will be called gjs.

Usage

GJS includes a command-line interpreter, usually installed in /usr/bin/gjs. Type gjs to start it and test out your JavaScript statements interactively. Hit Ctrl+D to exit.

gjs filename.js runs a whole program. gjs -d filename.js does that and starts a debugger as well.

There are also facilities for generating code coverage reports. Type gjs --help for more information.

-d only available in gjs >= 1.53.90

Contributing

For instructions on how to get started contributing to GJS, please read the contributing guide, https://gitlab.gnome.org/GNOME/gjs/blob/master/CONTRIBUTING.md.

History

GJS probably started in August 2008 with this blog post and this experimental code. GJS in its current form was first developed in October 2008 at a company called litl, for their litl webbook product. It was soon adopted as the basis of GNOME Shell's UI code and extensions system and debuted as a fundamental component of GNOME 3.0.

In February 2013 at the GNOME Developer Experience Hackfest GJS was declared the 'first among equals' of languages for GNOME application development. That proved controversial for many, and was later abandoned.

At the time of writing (2018) GJS is used in many systems including Endless OS's framework for offline content and, as a forked version, Cinnamon.

Reading material

JavaScript & SpiderMonkey

GNOME Contribution

License

Dual licensed under LGPL 2.0+ and MIT.

Thanks

The form of this README was inspired by Nadia Odunayo on the Greater Than Code podcast.