As the initial merge (#1808076: Convert edit module JavaScript to use Create.js, VIE, and Backbone) seems to be near completion, deciding on a) whether we should add additional tooling (for linting, testing, minifying, build processes etc.) to this, and if yes b) what tool to use (grunt, ant) seems advisable. I am not sure of how best to handle this on d.o.

This could (but would not have to) c) relate to if and how we want to split the existent code in to more, smaller files (e.g. separate files for each model/view).

Comments

frega’s picture

Committed initial (and lenient) grunt file for edit.module in 85ab6f1eef8eb02415e92c8fb6453b4e47bc6ddd.

Run grunt or grunt watch in the edit.module directory (Intro to grunt here). grunt lints (& moans), concats and "builds" to js/build/edit.js and js/build/edit.min.js respectively (watch does this continuously).

$ grunt 
Running "lint:all" (lint) task
Lint free.

Running "concat:dist" (concat) task
File "js/build/edit.js" created.

Running "min:dist" (min) task
File "js/build/edit.min.js" created.
Uncompressed size: 62673 bytes.
Compressed size: 7158 bytes gzipped (30263 bytes minified).

If that's ok, I'd change edit.module to reflect the changes accordingly. Moreover, do we want to further split the files (one per model, view etc.) and how backboney do we want to be :) - Backbone.Router for "page state" (i.e. "Quick Edit" on/off) and Backbone.Views subsequently that - do we have any use for #fragments/routes?

Wim Leers’s picture