NOTICE: Upcoming Grunt and build system changes


Hi All,

Recently I did a rewrite of the build system for OS.js. This brings some changes to the Grunt commands, of which most of them has been deprecated (you can still use them for some time, but it will warn you). You can expect this in the master branch soon.. As of October 4th 2016 this is in master branch.

The new build system detaches from Grunt itself and is modular. This makes it much easier to make modifications and scripts for customizing OS.js and its build process(es). It also paves the way for making custom build targets, and [maybe] eventually moving away from Grunt itself in favor of a normal command line parser with a bit of glue.

New base tool

You don’t have to use Grunt anymore for building. You can just run:

node osjs foo:bar --bass=jazz

Please note that testing tools etc. still rely on Grunt.

New Tasks

Here’s a complete list of all the available tasks after the changes:


Available targets: dist, dist-dev (default is both. Exception is for ‘build:config’, which uses targets from configuration section below)

build --target=TARGET
build:config --target=TARGET
build:core --target=TARGET (--standalone) (--nw) (--compress)
build:package --name=REPO/NAME --target=TARGET (--compress)
build:packages --target=TARGET (--compress)
build:theme --style=NAME
build:theme --icons=NAME
build:theme --static
build:theme --fonts


Available targets: client, server (default is both)

config --target=TARGET
config:add-repository --name=FOO
config:remove-repository --name=FOO
config:enable-package --name=FOO
config:disable-package --name=FOO
config:add-mount --name=FOO --description=BAR --path=PATH
config:add-preload --name=FOO --path=PATH
config:get --name=FOO
config:set --name=FOO --value=BAR


Available targets: dist, dist-dev (default is dist-dev)

generate:apache-htaccess (--target=TARGET)
generate:apache-vhost --out=FILE (--target=TARGET)
generate:nginx-config --out=FILE
generate:lighttpd-config --OUT=FILE
generate:package --name=REPO/NAME (--type=FOO)
generate:handler --name=FOO


These are all Grunt tasks only

all                   # Build everything
test                  # Run all tests
mochaTest             # Run server unit tests
eslint                # Run javascript linting
csslint               # Run css linting
validate_xml          # Run HTML linting
watch                 # Start watching files for changes (auto build)


These tasks are not available via Grunt.

run (--target=TARGET --port=NUMBER)  # Starts the server

UPDATE: Version bump - alpha80