boot-cljsjs icon indicating copy to clipboard operation
boot-cljsjs copied to clipboard

Provide Extern generation task

Open Deraen opened this issue 8 years ago • 0 comments

npm package externs-generator provides a way to build extern file programmatically. Probably won't work for all libs, but should be useful.

It is possible to create a task which builds a temp dir with source files (library file and dependencies) and then shell out to npm. npm is already available at the CI and we can install the externs-generator globally.

(extern :files ["cljsjs/pouchdb/development/poucbdb.inc.js"
                ;; dependencies
                "cljsjs/jquery/development/jquery.inc.js"]
        :object "PouchDB"
        :output "cljsjs/pouchcb/common/pouchdb.ext.js")

Assigning to myself to keep track of this for my TODO list, but if someone want's to implement this, feel free.

Deraen avatar Sep 07 '16 16:09 Deraen