[Pkg-javascript-devel] RFS: vue.js

Paolo Greppi paolo.greppi at libpf.com
Mon Jan 8 15:59:18 UTC 2018


Il 08/01/2018 11:17, Pirate Praveen ha scritto:
> On തിങ്കള്‍ 08 ജനുവരി 2018 03:36 വൈകു, Paolo Greppi wrote:
>> AFAICT upstream does not provide anything that can run in node: all files in dist run in the browser
>> https://github.com/vuejs/vue/tree/dev/dist
>> i.e. there is nothing you can run node -e "require('vue');" against
>>
>> Perhaps what you want is the "ES Module" build, which is "intended for use with modern bundlers like webpack 2 or rollup"
>>
>> The vue.esm.js file could be installed by the libjs-vue binary.
>> It's probably possible to build it with webpack too.
>> Is that acceptable ?
> 
> app/assets/javascripts/sidebar/event_hub.js (and other files) has
> 
> import Vue from 'vue';
> 
> package.json has,
> 
>   "main": "dist/vue.runtime.common.js",
>   "module": "dist/vue.runtime.esm.js",
>   "unpkg": "dist/vue.js",
>   "jsdelivr": "dist/vue.js",
> 
> If you provide the either main or module, I think that would be enough.
> Installing it in /usr/lib/nodejs makes things easier. It can just
> symlink to /usr/share/javascript/vue
> 
> See
> https://anonscm.debian.org/cgit/pkg-javascript/three.js.git/tree/debian/node-three.links

OK I'll find a way to build the ES Module (vue.runtime.esm.js) with webpack, then add a node-vue binary with vue.links as in:

/usr/share/javascript/vue/vue.runtime.esm.js usr/lib/nodejs/vue/vue.runtime.esm.js

It should also be possible to add the autopkgtest require to node-vue ...

Paolo



More information about the Pkg-javascript-devel mailing list