summarize mutliple typings in one file - angularjs

My problem is, that I've some older Angular 1 projects, where I use Ui-Router in version 0.2.8 and I want to upgrade to the newest RC release which is no longer available with NuGet
https://ui-router.github.io/ng1/tutorial/helloworld
but in my Project I've no npm or bower, its a Visual Studio project where I use NuGet so far and I've no chance to use npm at the moment.
when I get the ui-router from npm in an new project, I see all the Typing files. Is it possible to summarize them all in one file? Is there a tool out there that can do this? Or what would be the best Solution for my problem?

Related

How to link NPM pacakge locally to remove dependence on remote?

I am building a react project for which I am using a 3rd party library. The library is available as an npm package, which solves the purpose. But the package is unreliable as it has very few downloads and not updated in years. I am trying to use it as a local package instead of a remote one. I npm installed it, but cant figure out to link it locally.
Note: I searched for other well maintained packages, but couldn't find one & I had to stick to this one.

How to I update my React version in the ASP.NET Core React/Redux template project?

I've started learning React with Redux and part of my development has seen me want to use the Material UI to make my application more interesting. I created my project in Visual Studio 2017 using the React with Redux template for ASP.NET Core.
I followed the documentation presented at the MatrialUI site and opted to use the CDN option for delivery of the MaterialUI library.
I started creating a few elements and was quickly confronted with the message that I needed to upgrade my react installation to use the Toolbar.
My question is, when we use the Visual Studio React/Redux ASP.NET Core template, how do I update my react installation? Is that carried out via NPM? I can't see any nuget packages relating to React.
Many thanks
Hey not sure if you found an answer yet but here is my take:
I tried using npm update inside the "ClientApp" folder, but that didn't seem to work. Something that did work though was manually updating each package. So open up a separate terminal -> cd into the ClientApp directory and then
npm i <package name>#<newest version>
so an example would be
npm i react#16.8.6
Some packages you will definitely need to update are React, React-DOM and rimraf. But you might choose to just update all of them while you're at it. When you're using ASP.NET Core try and go for the 2.2 version, which at least already has Bootstrap 4 installed.
Another tip: With Visual Studio, if you hover over the package names in the package.json file inside, it will show you the latest version. That's gonna make it a bit easier to find out what version you want to update to.
Hope that helped! And if anyone has a better solution please let me know.

How do you manage versioning of dependencies, in nodejs?

We've been a Windows shop, mainly relying on Visual Studio as our IDE and build tool. We've begun to explore using Angular and node, and angular-cli.
We have a project that depends upon "angular-cli": "1.0.0-beta.10". I was trying to get this to build on a new machine.
I installed nodejs, then did a global install of angular-cli using npm:
npm install -g angular-cli
Then I tried to do a build:
ng build
I got an error:
It seems like you're using a project generated using an old version of the Angular CLI.
The latest CLI now uses webpack and has a lot of improvements including a simpler
workflow, a faster build, and smaller bundles.
To get more info, including a step-by-step guide to upgrade the CLI, follow this link:
https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14
What I did to get things working was to uninstall angular-cli, and then install version beta.10
npm uninstall -g angular-cli
npm install -g angular-cli#1.0.0-beta.10
After that, things work just fine.
Unfortunately, that's not a solution.
We will, eventually, have multiple projects using node packages, we need them to be able to run simultaneously, without having to uninstall and reinstall global packages.
And we need to be able to run builds automatically on our build machines, without having to RDP into the build machines to mess about with which node packages are installed.
That is, if I have three projects that use angular-cli#1.0.0-beta.10, I expect all three to work on any of the developers machines, and that the build machines will be able to check out any of the three projects and successfully build them.
And if I update one to use beta-12, and another to use beta-14, I expect to be able to commit them to version control, and for the build machine to be able to check out any of three and still be able to build them, regardless of which version they use.
I thought the whole idea of tracking local dependencies in package.json, and storing local copies in node_modules was to avoid dependencies on globally installed packages.
How do people usually manage this issue?
Is there a way I can configure angular-cli so it doesn't depend upon a global install?
Are there other packages with which I'm likely to encounter similar problems? Is there an approach that will work for any of them?
The Angular-CLI can be run with, and the global ng command uses, a locally installed version for each project. This local version can be accessed using the command ./node_modules/.bin/ng
I recommend uninstalling the global CLI you have and taking the time to modify your package.json scripts to reference the local CLI installation rather than the global ng. This is my method to handle varied CLIs on my Jenkins server.
On that note, I do highly suggest following the instructions to move from Beta.10 to Beta.14 (https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14) if you can stomach the change to WebPack. Any projects utilizing CLI Beta.14 or higher can be upgraded to the latest beta simply by uninstalling the CLI, reinstalling it, and then running ng init (Diff [d] any files you've modified!) to update the boilerplate.
Copy & Paste the typescript components html's and css/scss files to a new build, it's not even worth it to mess with the core build of those stuff.
Bear in mind that you might see imports being grayed and the same very imports to be needed to add in app.module.ts as its a core file nowadays to every single project of ours.

Is there an official nuget package for Angular 2?

I'm currently working in a work environment where I do not have access to npm / node. The npm download location is actually blocked so I can't get any packages.
I want to build an Angular 2 site. As I can't access npm, I want to use Nuget to get the files. Although I can see the Angular 1 packages, I cannot seem to see any Angular 2 packages. Is there one for Nuget?
Also, is populating the node_module folder and compiling the Typescript the only thing that npm does for Angular? If I can just get a copy of the node_module folder (from outside work) and get TypeScript working in my solution, can I basically bypass the need for npm?
In short; No.
You can see a list of all available NuGet package versions here, with the most recent being 1.5.3.
Even performing a generic search shows most recent versions as 1.5.3.
Sometimes they'll have beta versions of packages available that you can install with a command similar to: Install-Package EntityFramework -Version 6.1.3-beta1 -Pre, but it doesn't appear as if they have created any pre-release packages.
So, as #Michal Dymel mentioned, you could get it from a CDN or some other location.

bower packages update crashed the app - how to roll back

I've installed another additional module for my app with bower. As project dependencies in bower.json were not very strict, and a lot of time passed since last update, bower updated a lot of packages to newer ones. There were a lot of changes, and incompatibility between packages was the reason for major app crash.
I never asked for this, not a good moment for total upgrade&debug. How can I just roll back to previous packages?
Original package sources are in .gitignore and built with grunt into one file (so I can't just revert the commit - as packages renewed by bower will be the same in the next build)
I couldn't find out the old package set which was OK for my app (as package sources with specific version numbers are in .gitignore) UPD: found versions in built file, see my answer
I couldn't find any information about sort of "bower package history" or "bower undo".
UPD: I solved the issue for myself and described the solution in the answer. But I'm really not sure it's a good way, and would be grateful for any kind of mentorship about the subject.
I solved the problem for myself by digging into incompatiblities showed by bower, and finding compromise package set. Main issues were between newest angular asked by some packages and angular-ui-bootsrap working with older versions only for that moment. Also there were some issues with other newest packages, which I downgraded and will solve later on. So I used bower install [PackageName]#=[SpecificPackageVersion] (can use --save here to save it to bower.json) for manually setting compromise packages.
At the moment I realized, that there were old package versions in license comment blocks in the previous commits of built file, so in order to have old working set of packages I could:
git checkout HEAD~1 to have old file, which was built with previous package set
grep (search) package names or license comments in it
bower install [PackageName]#=[OldWorkingPackageVersion] (can use --save to save it to bower.json)
git checkout [BranchName] to make HEAD back
Make build (with previous packages installed again)
However, I'm not sure it's a good solution, and would be grateful for any kind of clarification about the subject.

Resources