I think we have our wires bit crossed :) I'm not talking about creating a
huge JS file.

I think we will wait until we run into the use-case I'm talking about and
then revisit this topic.

Cheers
Seb

Sebastian Wagner
Director Arrakeen Solutions, OM-Hosting.com
http://arrakeen-solutions.co.nz/
https://om-hosting.com - Cloud & Server Hosting for HTML5
Video-Conferencing OpenMeetings
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Wed, 1 Sept 2021 at 16:18, Maxim Solodovnik <solomax...@gmail.com> wrote:

> On Wed, 1 Sept 2021 at 10:03, seba.wag...@gmail.com <seba.wag...@gmail.com
> >
> wrote:
>
> > It is not about publishing for others.
> > It is about publishing for ourself.
> >
> > How would you internally reference one openmeetings node module into
> > another one?
> >
>
> Well
> We don't reference one JS module inside another due to it will be bundled
> by `npm run build`
> and we will end up with one huge JS file :((((
>
>
> > It's not like Maven where you can have a multi-module project. In NPM you
> > will need to actually publish the common library somewhere and then pull
> it
> > down again into whatever project you you need it.
> >
> > It is a common way to do this. And I can imagine we need it soon. Eg if
> you
> > use SASS and other CSS variables you often want to share "styles" between
> > modules. Cause you only want to have a single definition of those styles.
> > So you create a common-util-xyz node module with your base variables and
> > styles, so you can share use it in all modules.
> >
> > If you do not want to share this module public, you often use an "@" sign
> > to mark it as internal and often its pulled from a different, internal
> > NPM-repository (see
> >
> >
> https://stackoverflow.com/questions/36667258/what-is-the-meaning-of-the-at-prefix-on-npm-packages
> > )
> >
> > There are other ways to resolve a dependency on another internal common
> npm
> > packages. We could do something with
> > https://docs.npmjs.com/cli/v7/commands/npm-link
> > With npm-link you can "bind" another project into your current project.
> > Without publishing it first.
> > There are some handy side effects with it, the build process does fetch
> > less dependencies. But it's also a bit of a hack. Not sure if the
> > Maven-Frontend-Plugin support npm-link (but apparently it does
> > https://stackoverflow.com/a/34745036/1448704)
> >
> > So yeah maybe npm link could be an alternative we use to create common
> npm
> > packages and share code between modules.
> >
> > Thanks
> > Seb
> >
> > Sebastian Wagner
> > Director Arrakeen Solutions, OM-Hosting.com
> > http://arrakeen-solutions.co.nz/
> > https://om-hosting.com - Cloud & Server Hosting for HTML5
> > Video-Conferencing OpenMeetings
> > <
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > >
> > <
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > >
> >
> >
> > On Wed, 1 Sept 2021 at 14:45, Maxim Solodovnik <solomax...@gmail.com>
> > wrote:
> >
> > > Hello Seb,
> > >
> > > I'm -0 for this renaming
> > > due to
> > > 1) so far I don't think these modules might be useful to someone else
> > > 2) this is 2 minutes task so I would refactor just before publishing
> > >
> > > Do you know someone who might need these modules? :)))
> > >
> > > OFF: maybe you know if it is possible to have "provided" NPM
> > dependencies?
> > > :)))
> > >
> > > On Sun, 29 Aug 2021 at 12:23, seba.wag...@gmail.com <
> > seba.wag...@gmail.com
> > > >
> > > wrote:
> > >
> > > > The current node modules are quite generic names. I think we should
> aim
> > > for
> > > > having unique names for those modules:
> > > >  * They may otherwise clash with other already existing node modules
> > > >  * We may want or have to publish some of those modules later (eg if
> we
> > > > introduce our own @lib-xyz module that provides some common
> > > functionality -
> > > > similar to a maven module)
> > > >
> > > > I may try contacting @bui...@apache.org <bui...@apache.org> to find
> > out
> > > if
> > > > they have an idea about hosting for npm modules. Or if they recommend
> > to
> > > > just publish to npmjs.
> > > >
> > > > Re renaming: All we need to do IMHO is to rename the "name" attribute
> > in
> > > > the package.json file:
> > > > name="chat" -> name="apache-openmeetings-chat"
> > > > => and we can still use a different name attribute for the generated
> JS
> > > > file. Or alternatively change that name too. But it would not be
> > > required.
> > > >
> > > > Thanks
> > > > Seb
> > > >
> > > > Sebastian Wagner
> > > > Director Arrakeen Solutions, OM-Hosting.com
> > > > http://arrakeen-solutions.co.nz/
> > > > https://om-hosting.com - Cloud & Server Hosting for HTML5
> > > > Video-Conferencing OpenMeetings
> > > > <
> > > >
> > >
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > > > >
> > > > <
> > > >
> > >
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > > > >
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
>
>
> --
> Best regards,
> Maxim
>

Reply via email to