Giter VIP home page Giter VIP logo

Comments (6)

klemenoslaj avatar klemenoslaj commented on June 17, 2024

Hi there.

I'm glad you like it!

Should this only be for developers of this repo or also for users of the cli?

That's only for contributors, in an own project you're free to use any other package manager 👍
Sorry for not being clear, I will update the docs a bit.

I tried this repo with npm and looks like it is working as well, if you use a few other commands.

Yes, it should work fine but overall I believe one package manager should be used in the repository,
to ensure the same versions of dependencies are used - kind of purpose of lock files.

All hypothetical here, since so far I am the only contributor 😂


FYI, so far this cli is not published to the NPM registry yet. If you would have a use of it, I could publish it

from ong-cli.

boeckMt avatar boeckMt commented on June 17, 2024

Yes, it should work fine but overall I believe one package manager should be used in the repository,
to ensure the same versions of dependencies are used - kind of purpose of lock files.

Yes, you're right, that could potentially lead to different dependency resolutions if the two log files are not synced.


Until now I only tested it a bit, because we also have the need to build multiple angular libraries in one command.
I created a small tool for it, but processes are not built in parallel and it is much easier.

Nevertheless, a few functions are in there I would like to keep.

  • check if all libraries declared their dependencies correctly
  • set some versions from the main package.json in the libraries for which we currently use a placeholder that replaces the versions at build time.

I will build your CLI and try to use it standalone in our repo, to test if it could work for our use case.

from ong-cli.

klemenoslaj avatar klemenoslaj commented on June 17, 2024

Until now I only tested it a bit, because we also have the need to build multiple angular libraries in one command.
I created a small tool for it, but processes are not built in parallel and it is much easier.

Yeah I had something similar before, a simple topological sort and sequential build of libraries.
That however got very slow as the amount of libraries grew.

Nevertheless, a few functions are in there I would like to keep.

  • check if all libraries declared their dependencies correctly
  • set some versions from the main package.json in the libraries for which we currently use a placeholder that replaces the versions at build time.

Yes, was thinking of adding this to the ong too, but figured that probably better place for that would be Angular builder, so it would happen within the ng build itself, not at an independent detached process.
But maybe it's better if we add it to ong and people can benefit without changing the builder in angular.json 🤔

from ong-cli.

boeckMt avatar boeckMt commented on June 17, 2024

Yeah I had something similar before, a simple topological sort and sequential build of libraries.
That however got very slow as the amount of libraries grew.

We don't build at "runtime" only if a new version is created, so it's not that big of a problem for us. But faster builds are always nice ;)
To use the libraries at "runtime" we have a path mapping in the tsconfig.

Yes, was thinking of adding this to the ong too, but figured that probably better place for that would be Angular builder, so it would happen within the ng build itself, not at an independent detached process.
But maybe it's better if we add it to ong and people can benefit without changing the builder in angular.json 🤔

I think changing the builder is something that people rarely do, because if there are some new features from angular itself you have to migrate manually, but it would be definitely a better place.


Can you install a yarn workspace with some placeholders?
This is the first thing I have to solve with npm and there workspaces. But if there is a solution for it, I think integrating version replacement at build time in the CLI would be helpful. I could help if we are at this place.

from ong-cli.

klemenoslaj avatar klemenoslaj commented on June 17, 2024

We don't build at "runtime" only if a new version is created, so it's not that big of a problem for us. But faster builds are always nice ;)
To use the libraries at "runtime" we have a path mapping in the tsconfig.

💯 yeah. Building libraries during development is just way too slow.

Can you install a yarn workspace with some placeholders?

Sorry, I am not sure what exactly do you mean.

I think integrating version replacement at build time in the CLI would be helpful. I could help if we are at this place

I guess we can try already. The heavy lifting is done already, just checking the existing dependencies graph, then only writing into the package.json of the built libraries.

from ong-cli.

boeckMt avatar boeckMt commented on June 17, 2024

💯 yeah. Building libraries during development is just way too slow.

Ah, so you don't use ong-cli for building during development either?

Sorry, I am not sure what exactly do you mean.

I tried to describe it here npm/rfcs#301 (comment)

E.g. the dependencies for angular in the demo/package.json use version ~13.3.0 and I want that all the libraries and components us the same for there peerDependencies. Or I have one dependency which is used in multiple of my libraries so I don't want to manage this versions manually for each.

Currently I don't use workspaces because when we created our repository, npm didn't support it yet. So I managed all dependencies in the main package.json (but I would like to get away from that).
To define the versions for packages and libraries we used a placeholder 0.0.0-PLACEHOLDER-VENDOR which gets replaced with the version of the main package for the specified dependency at build time.

But this way npm is not capable to install a workspace because it doesn't know wich versions to use. Wanted to ask if something like this is possible with yarn.

I guess we can try already. The heavy lifting is done already, just checking the existing dependencies graph, then only writing into the package.json of the built libraries.

That sound really great :)

from ong-cli.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.