Bug#933007: [Pkg-javascript-devel] Bug#933007: pkg-js-tools: Automatically link components in node_modules directory
Le 25/07/2019 à 20:08, Pirate Praveen a écrit : > > > On 2019, ജൂലൈ 25 11:15:50 PM IST, Xavier Guimard wrote: >> Package: pkg-js-tools >> Version: 0.8.1 >> Severity: wishlist >> >> When using components in node modules, the best way to use them is to >> install them in node_modules/ directory. However, dpkg-source install >> them at the top source directory under a directory named by "component" >> field value (debian/watch). >> >> The idea here is, before build, to automatically read debian/watch to >> find >> components, read /package.json to find the node name and >> create a link "../ => " in node_modules directory >> (created on-the-fly). Also, it will remove automatically node_modules >> directory during dh_clean step. >> Then no need to overwrite NODE_PATH in debian/rules. >> >> Any comment is welcome here ;-). > > Good idea. It would be nice if we can somehow automate installation too, > instead of adding each module in debian/install. May be we can read > package.json#dependencies to determine which should be installed (but it can > get complex if we consider whole dependency tree). Or provide > debian/node_modules file to explicitly list the node modules to be installed. Good idea! By default, all component will be installed in /usr/share/nodejs or /usr/lib/nodejs depending on "Architecture" field value, if debian/nodeSubmodules exists, then only component listed here will be installed. To install in nodejs root directory, a custom debian/install will be required Only component/**.(js|json|node) files will be installed except component/test*
Bug#933007: [Pkg-javascript-devel] Bug#933007: pkg-js-tools: Automatically link components in node_modules directory
On 2019, ജൂലൈ 25 11:15:50 PM IST, Xavier Guimard wrote: >Package: pkg-js-tools >Version: 0.8.1 >Severity: wishlist > >When using components in node modules, the best way to use them is to >install them in node_modules/ directory. However, dpkg-source install >them at the top source directory under a directory named by "component" >field value (debian/watch). > >The idea here is, before build, to automatically read debian/watch to >find >components, read /package.json to find the node name and >create a link "../ => " in node_modules directory >(created on-the-fly). Also, it will remove automatically node_modules >directory during dh_clean step. >Then no need to overwrite NODE_PATH in debian/rules. > >Any comment is welcome here ;-). Good idea. It would be nice if we can somehow automate installation too, instead of adding each module in debian/install. May be we can read package.json#dependencies to determine which should be installed (but it can get complex if we consider whole dependency tree). Or provide debian/node_modules file to explicitly list the node modules to be installed. -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Bug#933007: [Pkg-javascript-devel] Bug#933007: pkg-js-tools: Automatically link components in node_modules directory
Le 25/07/2019 à 19:45, Xavier Guimard a écrit : > Package: pkg-js-tools > Version: 0.7 > Severity: wishlist > > When using components in node modules, the best way to use them is to > install them in node_modules/ directory. However, dpkg-source install > them at the top source directory under a directory named by "component" > field value (debian/watch). > > The idea here is, before build, to automatically read debian/watch to find > components, read /package.json to find the node name and > create a link "../ => " in node_modules directory > (created on-the-fly). Also, it will remove automatically node_modules > directory during dh_clean step. > Then no need to overwrite NODE_PATH in debian/rules. > > Any comment is welcome here ;-). To disable this, just to not call dh_auto_build in override_dh_auto_build
Bug#933007: pkg-js-tools: Automatically link components in node_modules directory
Package: pkg-js-tools Version: 0.8.1 Severity: wishlist When using components in node modules, the best way to use them is to install them in node_modules/ directory. However, dpkg-source install them at the top source directory under a directory named by "component" field value (debian/watch). The idea here is, before build, to automatically read debian/watch to find components, read /package.json to find the node name and create a link "../ => " in node_modules directory (created on-the-fly). Also, it will remove automatically node_modules directory during dh_clean step. Then no need to overwrite NODE_PATH in debian/rules. Any comment is welcome here ;-).