Re: [Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld
Hi, On Thu, May 10, 2018 at 01:31:56PM +0500, Pirate Praveen wrote: > > You'll need to update webpack.config.js with system path for it to find apt > installed modules. I naively tried diff --git a/webpack.config.js b/webpack.config.js index 7ce5c6e..87f7559 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,11 +20,11 @@ const outputs = [ entry: [ // 'babel-polyfill' is very large, list features explicitly 'regenerator-runtime/runtime', - 'core-js/fn/array/includes', - 'core-js/fn/object/assign', - 'core-js/fn/promise', - 'core-js/fn/string/starts-with', - 'core-js/fn/symbol', + '/usr/lib/nodejs/core-js/fn/array/includes', + '/usr/lib/nodejs/core-js/fn/object/assign', + '/usr/lib/nodejs/core-js/fn/promise', + '/usr/lib/nodejs/core-js/fn/string/starts-with', + '/usr/lib/nodejs/core-js/fn/symbol', // main lib './lib/index.js' ], which did not help. > > jsonld.js does not work. The file size of this uncompressed file is way > > smaller than the minimazion result and doese not work together with the > > R code. Thus I really need to undergo the process to create the > > minimized JS. > > https://wiki.debian.org/Javascript/#Using_build_tools_like_grunt has > examples. Is there any actual package example? The anchor does not exist (any more) on that wiki page (which should be updated to Salsa anyway ;-) ). Kind regards Andreas. -- http://fam-tille.de -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld
Il 10/05/2018 23:45, Andreas Tille ha scritto: >>> [1] >>> https://salsa.debian.org/r-pkg-team/r-cran-jsonld/blob/master/debian/JS/get-jsonld.min >>> >> >> Hi, I'm an upstream developer for jsonld.js and the one to blame for >> the webpack config. ;-) > > Thanks a lot for stepping in here. > >> I'm getting 404 on that salsa repo so I'm not >> sure what your script is doing. > > I re-checked the link and I guess it was just a temporary error. Andreas, I get 404 errors when accessing all the links you supply for the project: https://salsa.debian.org/r-pkg-team/r-cran-jsonld/ When you create a project on salsa, you can set the Visibility Level: - Private: Project access must be granted explicitly to each user. - Internal: The project can be accessed by any logged in user. - Public: The project can be accessed without any authentication. I usually set it to "Public". Maybe the project r-pkg-team/r-cran-jsonld/ has tight setting that make it visible only to the members of the r-pkg-team ? You can change the visibility in https://salsa.debian.org/r-pkg-team/r-cran-jsonld/edit under "Permissions". Paolo -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld
Hi David, On Thu, May 10, 2018 at 02:42:29PM -0400, David I. Lehn wrote: > On Wed, May 9, 2018 at 5:35 AM, Andreas Tillewrote: > > I was stumbling upon an issue with some minimized JS in the package > > r-cran-jsonld (ITPed in #898224). I tried to recreate jsonld.min.js and > > have written a script[1] which calls webpack in a clone of the Github > > reporsitory. Unfortunately the webpack call ends in: > > > > webpack-merge@4.1.2 node_modules/webpack-merge > > └── lodash@4.17.10 > > ... > > ERROR in multi regenerator-runtime/runtime core-js/fn/array/includes > > core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with > > core-js/fn/symbol ./lib/index.js > > Module not found: Error: Can't resolve 'babel-loader' in > > '/home/andreas/debian-maintain/salsa/r-pkg-team/0_prospective/r-cran-jsonld/debian/JS/jsonld.js' > > @ multi regenerator-runtime/runtime core-js/fn/array/includes > > core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with > > core-js/fn/symbol ./lib/index.js > > ... > > Any idea how to get the minimized JS? Simply taking the non-minimized > > jsonld.js does not work. The file size of this uncompressed file is way > > smaller than the minimazion result and doese not work together with the > > R code. Thus I really need to undergo the process to create the > > minimized JS. > > > > Any idea how to approach this? > > ... > > [1] > > https://salsa.debian.org/r-pkg-team/r-cran-jsonld/blob/master/debian/JS/get-jsonld.min > > > > Hi, I'm an upstream developer for jsonld.js and the one to blame for > the webpack config. ;-) Thanks a lot for stepping in here. > I'm getting 404 on that salsa repo so I'm not > sure what your script is doing. I re-checked the link and I guess it was just a temporary error. > In npm world you can build > jsonld.min.js with "npm install && npm run build-webpack". That's how > it's published to npm. This works for me now. > I've never tried building with apt installed > modules. If upstream changes would help make this all easier, let me > know. While your hint was sufficient for me to get the compressed JS out of the JS sources you might like to have a look at https://salsa.debian.org/r-pkg-team/r-cran-jsonld/tree/a5535fdc49edb0584c774f224c1bc23ff76810f0/debian/JS There is the error https://salsa.debian.org/r-pkg-team/r-cran-jsonld/blob/a5535fdc49edb0584c774f224c1bc23ff76810f0/debian/JS/get-jsonld.min.err if I try to build via webpack --config ../webpack.config.js lib/jsonld.js dist/jsonld.js --output-library=jsonld No idea whether there is some hidden bug in the JS code. Kind regards Andreas. -- http://fam-tille.de -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld
On Wed, May 9, 2018 at 5:35 AM, Andreas Tillewrote: > I was stumbling upon an issue with some minimized JS in the package > r-cran-jsonld (ITPed in #898224). I tried to recreate jsonld.min.js and > have written a script[1] which calls webpack in a clone of the Github > reporsitory. Unfortunately the webpack call ends in: > > webpack-merge@4.1.2 node_modules/webpack-merge > └── lodash@4.17.10 > ... > ERROR in multi regenerator-runtime/runtime core-js/fn/array/includes > core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with > core-js/fn/symbol ./lib/index.js > Module not found: Error: Can't resolve 'babel-loader' in > '/home/andreas/debian-maintain/salsa/r-pkg-team/0_prospective/r-cran-jsonld/debian/JS/jsonld.js' > @ multi regenerator-runtime/runtime core-js/fn/array/includes > core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with > core-js/fn/symbol ./lib/index.js > ... > Any idea how to get the minimized JS? Simply taking the non-minimized > jsonld.js does not work. The file size of this uncompressed file is way > smaller than the minimazion result and doese not work together with the > R code. Thus I really need to undergo the process to create the > minimized JS. > > Any idea how to approach this? > ... > [1] > https://salsa.debian.org/r-pkg-team/r-cran-jsonld/blob/master/debian/JS/get-jsonld.min > Hi, I'm an upstream developer for jsonld.js and the one to blame for the webpack config. ;-) I'm getting 404 on that salsa repo so I'm not sure what your script is doing. In npm world you can build jsonld.min.js with "npm install && npm run build-webpack". That's how it's published to npm. I've never tried building with apt installed modules. If upstream changes would help make this all easier, let me know. -dave -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld
On Thu, May 10, 2018 at 2:31 PM, Andreas Tillewrote: > jsonld.js does not work. The file size of this uncompressed file is way > smaller than the minimazion result and doese not work together with the > R code. Thus I really need to undergo the process to create the > minimized JS. https://wiki.debian.org/Javascript/#Using_build_tools_like_grunt has examples. Is there any actual package example? The anchor does not exist (any more) on that wiki page (which should be updated to Salsa anyway ;-) ). https://wiki.debian.org/Javascript/Nodejs#Using_build_tools_like_grunt last link seems a mistake in copy-paste, this is the correct link. -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel
Re: [Pkg-javascript-devel] Problems to recreate minimized JS in r-cran-jsonld
On Wed, May 9, 2018 at 3:05 PM, Andreas Tillewrote: Hi, I was stumbling upon an issue with some minimized JS in the package r-cran-jsonld (ITPed in #898224). I tried to recreate jsonld.min.js and have written a script[1] which calls webpack in a clone of the Github reporsitory. Unfortunately the webpack call ends in: webpack-merge@4.1.2 node_modules/webpack-merge └── lodash@4.17.10 Hash: eaf5c95c94821ab4944c9f696b4a89040915c26b Version: webpack 3.5.6 Child Hash: eaf5c95c94821ab4944c Time: 140ms Asset Size Chunks Chunk Names jsonld.js 3.61 kB 0 [emitted] jsonld [0] multi regenerator-runtime/runtime core-js/fn/array/includes core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with core-js/fn/symbol ./lib/index.js 100 bytes {0} [built] ERROR in multi regenerator-runtime/runtime core-js/fn/array/includes core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with core-js/fn/symbol ./lib/index.js Module not found: Error: Can't resolve 'babel-loader' in '/home/andreas/debian-maintain/salsa/r-pkg-team/0_prospective/r-cran-jsonld/debian/JS/jsonld.js' @ multi regenerator-runtime/runtime core-js/fn/array/includes core-js/fn/object/assign core-js/fn/promise core-js/fn/string/starts-with core-js/fn/symbol ./lib/index.js You'll need to update webpack.config.js with system path for it to find apt installed modules. jsonld.js does not work. The file size of this uncompressed file is way smaller than the minimazion result and doese not work together with the R code. Thus I really need to undergo the process to create the minimized JS. Any idea how to approach this? https://wiki.debian.org/Javascript/#Using_build_tools_like_grunt has examples. -- Pkg-javascript-devel mailing list Pkg-javascript-devel@alioth-lists.debian.net https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel