javascript - jQuery library in *server side* Google Apps Container Bound Script -
is possible utilize jquery library server side in doc or sheet container bound google apps script? if so, how?
in this question, asked how utilize jquery in container bound google apps script. reply correct, client side. interested in using utility functions such $.extend() in server side code.
i've thought bit this, haven't had chance seek out yet. in case helps others, here thoughts might going in right direction.
the first step how bring code gas. here older blog post google devrel on how include underscore on container side. basic thought copy/pasting js library gas library. referencing gas library in container bound script.
http://googleappsdeveloper.blogspot.com/2012/11/using-open-source-libraries-in-apps.html
underscore much smaller library of course of study , doesn't have same dependencies jquery does. happily jquery 2 updated work without browser on server side @ to the lowest degree node. here steps using node. note in node depends on htmlparser , jsdom. in gas have xmlservice, don't think can count on having same js construction jsdom objects. may have bring in jsdom (along dependencies), or maybe write jsdom wrapper on xmlservice.
http://www.hacksparrow.com/jquery-with-node-js.html
assuming step 2 can made work, there may still jquery dependency issues. don't want/need of jquery. cut down dependencies @ building own trimmed downwards version. here instructions doing that. remove ajax illustration grunt custom:-ajax
.
https://www.npmjs.com/package/jquery
hope helps or @ to the lowest degree makes clear why hard :).
javascript jquery google-apps-script
No comments:
Post a Comment