Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #38802 > unrolled thread

Using a single module

Started byAndrew Poulos <ap_prog@hotmail.com>
First post2020-09-18 14:05 +1000
Last post2020-09-26 23:36 +0200
Articles 20 on this page of 21 — 6 participants

Back to article view | Back to comp.lang.javascript


Contents

  Using a single module Andrew Poulos <ap_prog@hotmail.com> - 2020-09-18 14:05 +1000
    Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-18 04:40 -0700
      Re: Using a single module Andrew Poulos <ap_prog@hotmail.com> - 2020-09-20 15:27 +1000
        Re: Using a single module Arno Welzel <usenet@arnowelzel.de> - 2020-09-20 11:27 +0200
          Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-20 02:38 -0700
            Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-20 02:51 -0700
    Re: Using a single module "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-09-18 11:06 -0700
      Re: Using a single module Andrew Poulos <ap_prog@hotmail.com> - 2020-09-20 15:27 +1000
      Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-20 02:46 -0700
    Re: Using a single module Arno Welzel <usenet@arnowelzel.de> - 2020-09-20 11:26 +0200
      Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-20 02:42 -0700
        Re: Using a single module Arno Welzel <usenet@arnowelzel.de> - 2020-09-24 19:34 +0200
          Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-24 11:16 -0700
            Re: Using a single module Arno Welzel <usenet@arnowelzel.de> - 2020-09-24 20:44 +0200
              Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-24 11:59 -0700
                Re: Using a single module Scott Sauyet <scott.sauyet@gmail.com> - 2020-09-24 19:55 -0700
                  Re: Using a single module Julio Di Egidio <julio@diegidio.name> - 2020-09-24 20:13 -0700
                    Re: Using a single module Arno Welzel <usenet@arnowelzel.de> - 2020-09-26 23:37 +0200
                    Re: Using a single module Scott Sauyet <scott.sauyet@gmail.com> - 2020-09-26 15:41 -0700
                      Re: Using a single module Jon Ribbens <jon+usenet@unequivocal.eu> - 2020-09-26 23:04 +0000
                Re: Using a single module Arno Welzel <usenet@arnowelzel.de> - 2020-09-26 23:36 +0200

Page 1 of 2  [1] 2  Next page →


#38802 — Using a single module

FromAndrew Poulos <ap_prog@hotmail.com>
Date2020-09-18 14:05 +1000
SubjectUsing a single module
Message-ID<67Wdnb4wtM6Kr_nCnZ2dnUU7-aPNnZ2d@westnet.com.au>
I'm trying my first use of modules and there some concepts that escape 
me despite goog's help.

If I find an ES module I'd like to use I can add it to the head of the 
page eg
   <script type="module" src="modules/jspdf.es.min.js"></script>

To use it in my code I need the script element that includes index.js to 
have type="module" eg
   <script type="module" src="scripts/index.js"></script>

In index.js I have: import { ...

If I have other script files referenced in my page eg
   <script src="scripts/two.js"></script>

and two.js wants to reference functions in index.js then it seems I need to
   a. export the functions in index.js
   b. add type="module" to the two.js' script element

Then if there's another js file, third.js, that references a function in 
index.js then I need to do the same. And so on for every other js file 
that references function in files that are included as modules.

So I end up with every script element having type="module" and every js 
file exporting functions even though there's only one actual module I'd 
like to use. Is that correct or am I missing something?

Andrew Poulos

[toc] | [next] | [standalone]


#38805

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-18 04:40 -0700
Message-ID<ff088a45-1c0f-4cc3-bad2-f0e841299460o@googlegroups.com>
In reply to#38802
On Friday, 18 September 2020 06:05:58 UTC+2, Andrew Poulos  wrote:
> I'm trying my first use of modules and there some concepts that escape 
> me despite goog's help.
> 
> If I find an ES module I'd like to use I can add it to the head of the 
> page eg
>    <script type="module" src="modules/jspdf.es.min.js"></script>
> 
> To use it in my code I need the script element that includes index.js to 
> have type="module" eg
>    <script type="module" src="scripts/index.js"></script>
> 
> In index.js I have: import { ...
> 
> If I have other script files referenced in my page eg
>    <script src="scripts/two.js"></script>
> 
> and two.js wants to reference functions in index.js then it seems I need to
>    a. export the functions in index.js
>    b. add type="module" to the two.js' script element
> 
> Then if there's another js file, third.js, that references a function in 
> index.js then I need to do the same. And so on for every other js file 
> that references function in files that are included as modules.
> 
> So I end up with every script element having type="module" and every js 
> file exporting functions even though there's only one actual module I'd 
> like to use. Is that correct or am I missing something?

Indeed, the docs as well as various articles I have opened
do not seem to consider a mixed scenario at all: which may
be telling.

Anyway, I have found this solution, using dynamic imports:
<https://stackoverflow.com/a/63316858>

Another approach I have seen mentioned is to transpile the
modules to standard JS.

Can't tell you more, I have never tried modules in the browser...

Julio

[toc] | [prev] | [next] | [standalone]


#38817

FromAndrew Poulos <ap_prog@hotmail.com>
Date2020-09-20 15:27 +1000
Message-ID<44OdnYKC14DddfvCnZ2dnUU7-IXNnZ2d@westnet.com.au>
In reply to#38805
On 18/09/2020 9:40 pm, Julio Di Egidio wrote:
> On Friday, 18 September 2020 06:05:58 UTC+2, Andrew Poulos  wrote:
>> I'm trying my first use of modules and there some concepts that escape
>> me despite goog's help.
>>
>> If I find an ES module I'd like to use I can add it to the head of the
>> page eg
>>     <script type="module" src="modules/jspdf.es.min.js"></script>
>>
>> To use it in my code I need the script element that includes index.js to
>> have type="module" eg
>>     <script type="module" src="scripts/index.js"></script>
>>
>> In index.js I have: import { ...
>>
>> If I have other script files referenced in my page eg
>>     <script src="scripts/two.js"></script>
>>
>> and two.js wants to reference functions in index.js then it seems I need to
>>     a. export the functions in index.js
>>     b. add type="module" to the two.js' script element
>>
>> Then if there's another js file, third.js, that references a function in
>> index.js then I need to do the same. And so on for every other js file
>> that references function in files that are included as modules.
>>
>> So I end up with every script element having type="module" and every js
>> file exporting functions even though there's only one actual module I'd
>> like to use. Is that correct or am I missing something?
> 
> Indeed, the docs as well as various articles I have opened
> do not seem to consider a mixed scenario at all: which may
> be telling.
> 
> Anyway, I have found this solution, using dynamic imports:
> <https://stackoverflow.com/a/63316858>

Dang, how do you guys find these things when I spend hours searching and 
find nothing?

> Another approach I have seen mentioned is to transpile the
> modules to standard JS.

Yes, I managed to find a UMD version of the module and I'm using that 
instead.

> Can't tell you more, I have never tried modules in the browser...

Thanks

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#38820

FromArno Welzel <usenet@arnowelzel.de>
Date2020-09-20 11:27 +0200
Message-ID<hsolk1F9ljhU2@mid.individual.net>
In reply to#38817
Andrew Poulos:

> On 18/09/2020 9:40 pm, Julio Di Egidio wrote:
>> On Friday, 18 September 2020 06:05:58 UTC+2, Andrew Poulos  wrote:
>>> I'm trying my first use of modules and there some concepts that escape
>>> me despite goog's help.
>>>
>>> If I find an ES module I'd like to use I can add it to the head of the
>>> page eg
>>>     <script type="module" src="modules/jspdf.es.min.js"></script>
>>>
>>> To use it in my code I need the script element that includes index.js to
>>> have type="module" eg
>>>     <script type="module" src="scripts/index.js"></script>
>>>
>>> In index.js I have: import { ...
>>>
>>> If I have other script files referenced in my page eg
>>>     <script src="scripts/two.js"></script>
>>>
>>> and two.js wants to reference functions in index.js then it seems I need to
>>>     a. export the functions in index.js
>>>     b. add type="module" to the two.js' script element
>>>
>>> Then if there's another js file, third.js, that references a function in
>>> index.js then I need to do the same. And so on for every other js file
>>> that references function in files that are included as modules.
>>>
>>> So I end up with every script element having type="module" and every js
>>> file exporting functions even though there's only one actual module I'd
>>> like to use. Is that correct or am I missing something?
>>
>> Indeed, the docs as well as various articles I have opened
>> do not seem to consider a mixed scenario at all: which may
>> be telling.
>>
>> Anyway, I have found this solution, using dynamic imports:
>> <https://stackoverflow.com/a/63316858>
> 
> Dang, how do you guys find these things when I spend hours searching and 
> find nothing?

Just have a look at the documentation:

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports>


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38821

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-20 02:38 -0700
Message-ID<c31cf0f5-983b-477e-94aa-21b00f67ff08o@googlegroups.com>
In reply to#38820
On Sunday, 20 September 2020 11:27:38 UTC+2, Arno Welzel  wrote:
> Andrew Poulos:
> > On 18/09/2020 9:40 pm, Julio Di Egidio wrote:
> >> On Friday, 18 September 2020 06:05:58 UTC+2, Andrew Poulos  wrote:
> >>> I'm trying my first use of modules and there some concepts that escape
> >>> me despite goog's help.
> >>>
> >>> If I find an ES module I'd like to use I can add it to the head of the
> >>> page eg
> >>>     <script type="module" src="modules/jspdf.es.min.js"></script>
> >>>
> >>> To use it in my code I need the script element that includes index.js to
> >>> have type="module" eg
> >>>     <script type="module" src="scripts/index.js"></script>
> >>>
> >>> In index.js I have: import { ...
> >>>
> >>> If I have other script files referenced in my page eg
> >>>     <script src="scripts/two.js"></script>
> >>>
> >>> and two.js wants to reference functions in index.js then it seems I need to
> >>>     a. export the functions in index.js
> >>>     b. add type="module" to the two.js' script element
> >>>
> >>> Then if there's another js file, third.js, that references a function in
> >>> index.js then I need to do the same. And so on for every other js file
> >>> that references function in files that are included as modules.
> >>>
> >>> So I end up with every script element having type="module" and every js
> >>> file exporting functions even though there's only one actual module I'd
> >>> like to use. Is that correct or am I missing something?
> >>
> >> Indeed, the docs as well as various articles I have opened
> >> do not seem to consider a mixed scenario at all: which may
> >> be telling.
> >>
> >> Anyway, I have found this solution, using dynamic imports:
> >> <https://stackoverflow.com/a/63316858>
> > 
> > Dang, how do you guys find these things when I spend hours searching and 
> > find nothing?
> 
> Just have a look at the documentation:
> 
> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports>

That does not mention use of dynamic imports to load non-modules,
which was the problem...  But easy enough was to find someone asking
the same question.

Julio

[toc] | [prev] | [next] | [standalone]


#38824

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-20 02:51 -0700
Message-ID<29e2f1a4-a529-4cdb-ac9e-dc8ac67e29c9o@googlegroups.com>
In reply to#38821
On Sunday, 20 September 2020 11:38:52 UTC+2, Julio Di Egidio  wrote:
> On Sunday, 20 September 2020 11:27:38 UTC+2, Arno Welzel  wrote:
> > Andrew Poulos:
> > > On 18/09/2020 9:40 pm, Julio Di Egidio wrote:
> > >> On Friday, 18 September 2020 06:05:58 UTC+2, Andrew Poulos  wrote:
> > >>> I'm trying my first use of modules and there some concepts that escape
> > >>> me despite goog's help.
> > >>>
> > >>> If I find an ES module I'd like to use I can add it to the head of the
> > >>> page eg
> > >>>     <script type="module" src="modules/jspdf.es.min.js"></script>
> > >>>
> > >>> To use it in my code I need the script element that includes index.js to
> > >>> have type="module" eg
> > >>>     <script type="module" src="scripts/index.js"></script>
> > >>>
> > >>> In index.js I have: import { ...
> > >>>
> > >>> If I have other script files referenced in my page eg
> > >>>     <script src="scripts/two.js"></script>
> > >>>
> > >>> and two.js wants to reference functions in index.js then it seems I need to
> > >>>     a. export the functions in index.js
> > >>>     b. add type="module" to the two.js' script element
> > >>>
> > >>> Then if there's another js file, third.js, that references a function in
> > >>> index.js then I need to do the same. And so on for every other js file
> > >>> that references function in files that are included as modules.
> > >>>
> > >>> So I end up with every script element having type="module" and every js
> > >>> file exporting functions even though there's only one actual module I'd
> > >>> like to use. Is that correct or am I missing something?
> > >>
> > >> Indeed, the docs as well as various articles I have opened
> > >> do not seem to consider a mixed scenario at all: which may
> > >> be telling.
> > >>
> > >> Anyway, I have found this solution, using dynamic imports:
> > >> <https://stackoverflow.com/a/63316858>
> > > 
> > > Dang, how do you guys find these things when I spend hours searching and 
> > > find nothing?
> > 
> > Just have a look at the documentation:
> > 
> > <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports>
> 
> That does not mention use of dynamic imports to load non-modules,

Of course that should read: to load modules from non-modules.

> which was the problem...  But easy enough was to find someone asking
> the same question.

Julio

[toc] | [prev] | [next] | [standalone]


#38807

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2020-09-18 11:06 -0700
Message-ID<d2c6b62b-e3cc-4d6c-b711-01bc3d6be789n@googlegroups.com>
In reply to#38802
On Thursday, September 17, 2020 at 11:05:58 PM UTC-5, Andrew Poulos wrote:
> I'm trying my first use of modules and there some concepts that escape 
> me despite goog's help. 
> 
> If I find an ES module I'd like to use I can add it to the head of the 
> page eg 
> <script type="module" src="modules/jspdf.es.min.js"></script> 
> 
> To use it in my code I need the script element that includes index.js to 
> have type="module" eg 
> <script type="module" src="scripts/index.js"></script> 
> 
> In index.js I have: import { ... 
> 
> If I have other script files referenced in my page eg 
> <script src="scripts/two.js"></script> 
> 
> and two.js wants to reference functions in index.js then it seems I need to 
> a. export the functions in index.js 
> b. add type="module" to the two.js' script element 
> 
> Then if there's another js file, third.js, that references a function in 
> index.js then I need to do the same. And so on for every other js file 
> that references function in files that are included as modules. 
> 
> So I end up with every script element having type="module" and every js 
> file exporting functions even though there's only one actual module I'd 
> like to use. Is that correct or am I missing something? 

I'd suggest you use only the index.js module. 

```
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Hello World</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <script type="module" src='./main.js' defer></script>
</head>
<body>
  <noscript>JavaScript must be enabled</noscript>
</body>
</html>
```

Inside that entry point module import the other dependencies.
For importing other modules use:

```
import a from './module-a.js'
```

For importing code from non-modules:

```
import './foo.js'
```

As Julio has mentioned, you can do this dynamically as well:

```
(async () => {
    if (somethingIsTrue) {
      // import module for side effects
      await import('/modules/my-module.js');
    }
})();
```

Some more examples are available on MDN:

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import>

If your non-module script wants to use a module the quickest hack might be assigning to the window object,
but a better question might be: why can't the other files be converted to modules as well?

[toc] | [prev] | [next] | [standalone]


#38818

FromAndrew Poulos <ap_prog@hotmail.com>
Date2020-09-20 15:27 +1000
Message-ID<44Odnb2C14DRdfvCnZ2dnUU7-IVQAAAA@westnet.com.au>
In reply to#38807
On 19/09/2020 4:06 am, Michael Haufe (TNO) wrote:
> On Thursday, September 17, 2020 at 11:05:58 PM UTC-5, Andrew Poulos wrote:
>> I'm trying my first use of modules and there some concepts that escape
>> me despite goog's help.
>>
>> If I find an ES module I'd like to use I can add it to the head of the
>> page eg
>> <script type="module" src="modules/jspdf.es.min.js"></script>
>>
>> To use it in my code I need the script element that includes index.js to
>> have type="module" eg
>> <script type="module" src="scripts/index.js"></script>
>>
>> In index.js I have: import { ...
>>
>> If I have other script files referenced in my page eg
>> <script src="scripts/two.js"></script>
>>
>> and two.js wants to reference functions in index.js then it seems I need to
>> a. export the functions in index.js
>> b. add type="module" to the two.js' script element
>>
>> Then if there's another js file, third.js, that references a function in
>> index.js then I need to do the same. And so on for every other js file
>> that references function in files that are included as modules.
>>
>> So I end up with every script element having type="module" and every js
>> file exporting functions even though there's only one actual module I'd
>> like to use. Is that correct or am I missing something?
> 
> I'd suggest you use only the index.js module.
> 
> ```
> <!DOCTYPE html>
> <html>
> <head>
>      <meta charset='utf-8'>
>      <meta http-equiv='X-UA-Compatible' content='IE=edge'>
>      <title>Hello World</title>
>      <meta name='viewport' content='width=device-width, initial-scale=1'>
>      <script type="module" src='./main.js' defer></script>
> </head>
> <body>
>    <noscript>JavaScript must be enabled</noscript>
> </body>
> </html>
> ```
> 
> Inside that entry point module import the other dependencies.
> For importing other modules use:
> 
> ```
> import a from './module-a.js'
> ```
> 
> For importing code from non-modules:
> 
> ```
> import './foo.js'

Hmm, so using a module where the rest of the code has not been designed 
to use modules is not just a case of drop a file into a folder...

> As Julio has mentioned, you can do this dynamically as well:
> 
> ```
> (async () => {
>      if (somethingIsTrue) {
>        // import module for side effects
>        await import('/modules/my-module.js');
>      }
> })();

If "somethingIsTrue" necessary because importing a module multiple times 
cause issues?

> Some more examples are available on MDN:
> 
> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import>
> 
> If your non-module script wants to use a module the quickest hack might be assigning to the window object,
> but a better question might be: why can't the other files be converted to modules as well?

Perhaps if I'd known about modules before I started but I'm not going to 
introduce such a change midway.

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#38823

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-20 02:46 -0700
Message-ID<0bd7ce5a-7bcc-46bf-ac3f-662288cf4a9eo@googlegroups.com>
In reply to#38807
On Friday, 18 September 2020 20:06:50 UTC+2, Michael Haufe (TNO)  wrote:
> On Thursday, September 17, 2020 at 11:05:58 PM UTC-5, Andrew Poulos wrote:

> > like to use. Is that correct or am I missing something? 
> 
> I'd suggest you use only the index.js module. 
> 
> ```
> <!DOCTYPE html>
> <html>
> <head>
>     <meta charset='utf-8'>
>     <meta http-equiv='X-UA-Compatible' content='IE=edge'>
>     <title>Hello World</title>
>     <meta name='viewport' content='width=device-width, initial-scale=1'>
>     <script type="module" src='./main.js' defer></script>

You do not need defer with modules...

> </head>
> <body>
>   <noscript>JavaScript must be enabled</noscript>
> </body>
> </html>
> ```
> 
> Inside that entry point module import the other dependencies.
> For importing other modules use:

I like that idea: non-modules cannot import from modules, but
of course modules can access code from non-modules...  Here is
a quick example (can only be run through a web server):

----/Test.html------------
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Test</title>
	<script src="nonmod.js"></script>
</head>
<body>
	<script type="module">
		import { test } from "./mod.js";
		
		console.log("nonmod: " + nonmod_test());
		console.log("mod: " + test());
	 </script>
</body>
</html>
----------------

----/mod.js------------
export function test() {
	return nonmod_test();
}
----------------

----/nonmod.js------------
function nonmod_test() {
	return "42";
}
----------------

Julio

[toc] | [prev] | [next] | [standalone]


#38819

FromArno Welzel <usenet@arnowelzel.de>
Date2020-09-20 11:26 +0200
Message-ID<hsolhpF9ljhU1@mid.individual.net>
In reply to#38802
Andrew Poulos:

> I'm trying my first use of modules and there some concepts that escape 
> me despite goog's help.
> 
> If I find an ES module I'd like to use I can add it to the head of the 
> page eg
>    <script type="module" src="modules/jspdf.es.min.js"></script>
> 
> To use it in my code I need the script element that includes index.js to 
> have type="module" eg
>    <script type="module" src="scripts/index.js"></script>
> 
> In index.js I have: import { ...

Why do you import a module within another module? The idea is to have a
script and one or more modules - but not modules importing other modules.

Also see:

<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules>

[...]
> So I end up with every script element having type="module" and every js 
> file exporting functions even though there's only one actual module I'd 
> like to use. Is that correct or am I missing something?

See above. Do not create modules importing other modules but only *one*
script which imports one or more modules.


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38822

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-20 02:42 -0700
Message-ID<2f1bf4d2-d350-4da1-8bfa-3af3a0ea60d3o@googlegroups.com>
In reply to#38819
On Sunday, 20 September 2020 11:26:27 UTC+2, Arno Welzel  wrote:
> Andrew Poulos:

> > In index.js I have: import { ...
> 
> Why do you import a module within another module? The idea is to have a
> script and one or more modules - but not modules importing other modules.
> 
> Also see:
> 
> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules>

What are you even talking about?

  <script type="module" src="main.js"></script>

Notice that only a module can import from a module...

Julio

[toc] | [prev] | [next] | [standalone]


#38850

FromArno Welzel <usenet@arnowelzel.de>
Date2020-09-24 19:34 +0200
Message-ID<ht43lqFmtc4U1@mid.individual.net>
In reply to#38822
On 20.09.20 11:42, Julio Di Egidio wrote:

> On Sunday, 20 September 2020 11:26:27 UTC+2, Arno Welzel  wrote:
>> Andrew Poulos:
> 
>>> In index.js I have: import { ...
>>
>> Why do you import a module within another module? The idea is to have a
>> script and one or more modules - but not modules importing other modules.
>>
>> Also see:
>>
>> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules>
> 
> What are you even talking about?
> 
>   <script type="module" src="main.js"></script>
> 
> Notice that only a module can import from a module...

I stand corrected. Of course you're right. Also see:

<https://github.com/mdn/js-examples/tree/master/modules/basic-modules>



-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38852

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-24 11:16 -0700
Message-ID<2d750160-fd2a-47fe-b1ba-3a1067e81622o@googlegroups.com>
In reply to#38850
On Thursday, 24 September 2020 19:35:02 UTC+2, Arno Welzel  wrote:
> On 20.09.20 11:42, Julio Di Egidio wrote:
> > On Sunday, 20 September 2020 11:26:27 UTC+2, Arno Welzel  wrote:
> >> Andrew Poulos:
> > 
> >>> In index.js I have: import { ...
> >>
> >> Why do you import a module within another module? The idea is to have a
> >> script and one or more modules - but not modules importing other modules.
> >>
> >> Also see:
> >>
> >> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules>
> > 
> > What are you even talking about?
> > 
> >   <script type="module" src="main.js"></script>
> > 
> > Notice that only a module can import from a module...
> 
> I stand corrected. Of course you're right. Also see:
> 
> <https://github.com/mdn/js-examples/tree/master/modules/basic-modules>

Why should anyone see yet another example, and one about
just using modules, which, as already pointed out, is not
even the question that was asked?  --  Never mind.

*Plonk*

Julio

[toc] | [prev] | [next] | [standalone]


#38854

FromArno Welzel <usenet@arnowelzel.de>
Date2020-09-24 20:44 +0200
Message-ID<ht47nhFno5tU1@mid.individual.net>
In reply to#38852
Julio Di Egidio:

> On Thursday, 24 September 2020 19:35:02 UTC+2, Arno Welzel  wrote:
>> On 20.09.20 11:42, Julio Di Egidio wrote:
>>> On Sunday, 20 September 2020 11:26:27 UTC+2, Arno Welzel  wrote:
>>>> Andrew Poulos:
>>>
>>>>> In index.js I have: import { ...
>>>>
>>>> Why do you import a module within another module? The idea is to have a
>>>> script and one or more modules - but not modules importing other modules.
>>>>
>>>> Also see:
>>>>
>>>> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules>
>>>
>>> What are you even talking about?
>>>
>>>   <script type="module" src="main.js"></script>
>>>
>>> Notice that only a module can import from a module...
>>
>> I stand corrected. Of course you're right. Also see:
>>
>> <https://github.com/mdn/js-examples/tree/master/modules/basic-modules>
> 
> Why should anyone see yet another example, and one about
> just using modules, which, as already pointed out, is not
> even the question that was asked?  --  Never mind.
> 
> *Plonk*

You don't even know, what "*Plonk*" means, do you?


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38855

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-24 11:59 -0700
Message-ID<a95dff26-3c75-4386-af45-60a2187f153bo@googlegroups.com>
In reply to#38854
On Thursday, 24 September 2020 20:44:11 UTC+2, Arno Welzel  wrote:
> Julio Di Egidio:
> 
> > On Thursday, 24 September 2020 19:35:02 UTC+2, Arno Welzel  wrote:
> >> On 20.09.20 11:42, Julio Di Egidio wrote:
> >>> On Sunday, 20 September 2020 11:26:27 UTC+2, Arno Welzel  wrote:
> >>>> Andrew Poulos:
> >>>
> >>>>> In index.js I have: import { ...
> >>>>
> >>>> Why do you import a module within another module? The idea is to have a
> >>>> script and one or more modules - but not modules importing other modules.
> >>>>
> >>>> Also see:
> >>>>
> >>>> <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules>
> >>>
> >>> What are you even talking about?
> >>>
> >>>   <script type="module" src="main.js"></script>
> >>>
> >>> Notice that only a module can import from a module...
> >>
> >> I stand corrected. Of course you're right. Also see:
> >>
> >> <https://github.com/mdn/js-examples/tree/master/modules/basic-modules>
> > 
> > Why should anyone see yet another example, and one about
> > just using modules, which, as already pointed out, is not
> > even the question that was asked?  --  Never mind.
> > 
> > *Plonk*
> 
> You don't even know, what "*Plonk*" means, do you?

I do, it's you who are yet another example of
Dunning-Kruger augmented by an absolute lack of
integrity, intellectual and probably otherwise.
Congratulations, idiot.

*Plonk*

Julio

[toc] | [prev] | [next] | [standalone]


#38860

FromScott Sauyet <scott.sauyet@gmail.com>
Date2020-09-24 19:55 -0700
Message-ID<1eca2a7a-2faf-4340-a2d9-d4d4328fc542n@googlegroups.com>
In reply to#38855
Julio Di Egidio wrote:
> Arno Welzel wrote:
>> Julio Di Egidio wrote:

>>> *Plonk*

>> You don't even know, what "*Plonk*" means, do you?

> I do, it's you who are yet another example of
> Dunning-Kruger augmented by an absolute lack of
> integrity, intellectual and probably otherwise.
> Congratulations, idiot.
> 
> *Plonk*

That has got to be one of the best self-owns I've ever seen on USENET!

Congratulations, Julio, by responding to Arno, you definitively showed
that you do not in fact understand what it meant.  Hint: if you had
killfiled Arno, you would not have seen his reply and hence could not
have responded.

  -- Scott

[toc] | [prev] | [next] | [standalone]


#38861

FromJulio Di Egidio <julio@diegidio.name>
Date2020-09-24 20:13 -0700
Message-ID<98ea0324-1844-470f-8687-b086d8f00ac8o@googlegroups.com>
In reply to#38860
On Friday, 25 September 2020 04:55:40 UTC+2, Scott Sauyet  wrote:
> Julio Di Egidio wrote:
> > Arno Welzel wrote:
> >> Julio Di Egidio wrote:
> 
> >>> *Plonk*
> 
> >> You don't even know, what "*Plonk*" means, do you?
> 
> > I do, it's you who are yet another example of
> > Dunning-Kruger augmented by an absolute lack of
> > integrity, intellectual and probably otherwise.
> > Congratulations, idiot.
> > 
> > *Plonk*
> 
> That has got to be one of the best self-owns I've ever seen on USENET!
> 
> Congratulations, Julio, by responding to Arno, you definitively showed
> that you do not in fact understand what it meant.  Hint: if you had
> killfiled Arno, you would not have seen his reply and hence could not
> have responded.

FYI, you other clueless moron, I have been on Usenet since 1991:
but you read Wikipedia, hijacked by fraudsters and other morons
just like you, and some blogs.... of course.  Must be a generational
thing, you guys are fucking clueless on the whole line.  Indeed, on
the same note, since not to feed the trolls is another golden rule,
you go on explaining things to Jonas, you and the parade of stupid
fucks.  Pathetic.  (EOD.)

*Plonk*

Julio

[toc] | [prev] | [next] | [standalone]


#38877

FromArno Welzel <usenet@arnowelzel.de>
Date2020-09-26 23:37 +0200
Message-ID<ht9qk0Fsvb0U2@mid.individual.net>
In reply to#38861
Julio Di Egidio:

> On Friday, 25 September 2020 04:55:40 UTC+2, Scott Sauyet  wrote:
>> Julio Di Egidio wrote:
>>> Arno Welzel wrote:
>>>> Julio Di Egidio wrote:
>>
>>>>> *Plonk*
>>
>>>> You don't even know, what "*Plonk*" means, do you?
>>
>>> I do, it's you who are yet another example of
>>> Dunning-Kruger augmented by an absolute lack of
>>> integrity, intellectual and probably otherwise.
>>> Congratulations, idiot.
>>>
>>> *Plonk*
>>
>> That has got to be one of the best self-owns I've ever seen on USENET!
>>
>> Congratulations, Julio, by responding to Arno, you definitively showed
>> that you do not in fact understand what it meant.  Hint: if you had
>> killfiled Arno, you would not have seen his reply and hence could not
>> have responded.
> 
> FYI, you other clueless moron, I have been on Usenet since 1991:

And you still did not learn the basics m(


-- 
Arno Welzel
https://arnowelzel.de

[toc] | [prev] | [next] | [standalone]


#38878

FromScott Sauyet <scott.sauyet@gmail.com>
Date2020-09-26 15:41 -0700
Message-ID<6da5f5b6-7abc-4412-b2b4-2a7b2f72551bn@googlegroups.com>
In reply to#38861
Julio Di Egidio wrote:
> Scott Sauyet wrote: 
>> Julio Di Egidio wrote: 
>>> Arno Welzel wrote: 
>>>> Julio Di Egidio wrote: 

>>>>> *Plonk* 
>> 
>>>> You don't even know, what "*Plonk*" means, do you? 
>> 
>>> I do, it's you who are yet another example of 

[...flame-fest deleted...] 

>>> 
>>> *Plonk* 
>> 
>> That has got to be one of the best self-owns I've ever seen on USENET! 
>> 
>> Congratulations, Julio, by responding to Arno, you definitively showed 
>> that you do not in fact understand what it meant. Hint: if you had 
>> killfiled Arno, you would not have seen his reply and hence could not 
>> have responded.

> FYI, you other clueless moron, I have been on Usenet since 1991: 

Wow, you beat me by a year!  I started reading in 1992, and posted for
the first time in February, 1993.  Started in comp.lang.javascript in
2009 or so.

> but you read Wikipedia, hijacked by fraudsters and other morons 
> just like you, and some blogs.... of course. 

You seem to think you know a lot about me.

> Must be a generational  thing, 

I have no idea how old you are or you think I am, but what makes you
think we're of significantly different ages?

> you guys are fucking clueless on the whole line. Indeed, on 
> the same note, since not to feed the trolls is another golden rule, 
> you go on explaining things to Jonas, you and the parade of stupid 
> fucks. Pathetic. (EOD.) 

And to you.  You're right, I must be clueless.

But there is a special kind of idiocy in claiming to killfile someone
and then responding to their very next message.

  -- Scott

[toc] | [prev] | [next] | [standalone]


#38879

FromJon Ribbens <jon+usenet@unequivocal.eu>
Date2020-09-26 23:04 +0000
Message-ID<slrnrmvi8r.ja8i.jon+usenet@raven.unequivocal.eu>
In reply to#38878
On 2020-09-26, Scott Sauyet <scott.sauyet@gmail.com> wrote:
> But there is a special kind of idiocy in claiming to killfile someone
> and then responding to their very next message.

The conclusion I came to some time ago is that the only plausible
explanation is that "*Plonk*" is Julio's nickname and it being at
the bottom of his every post is just because it's part of his Usenet
signature.

Also that there's no point in ever reading his posts, let alone
responding to them.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web