2 ms·
my workflow is npm to get the packages in VS2017 called from package-mgr console gulp to move the package from node to wwwroot system.js.config declares the
by 0x4f3759df 9y ago
my workflow is
npm to get the packages in VS2017 called from package-mgr console
gulp to move the package from node to wwwroot
system.js.config declares the packages
system.js to load the package
npm get the @types files (so typescript knows how to compile and I get autocomplete)
and then I do a typescript import
---
real pain in the neck to setup but now its really not bad at all
- pjmlp 9y agoI still get by, by just putting whatever I need into the scripts folder and then using ASP.NET bundling APIs. Similar approach on the Java projects, a scripts folder under the webapp resources. It might be old fashion, but keeps me sane.
- wereHamster 9y agoVS Code will automatically pull type definitions from npmjs.org, so you get code highlighting and inline errors for free (not sure how much such automation is included in VS2017). Many npm modules come with their own typings. Those which don't usually have them in the definitelytyped repo. For those 'npm install <foo> @types/<foo>' should be enough so that typescript can find both the code and corresponding type definitions. The rest of your setup seems to be related how you build and bundle the files. I use webpack and a typescript loader, and there is literally nothing more that I have to do after installing the packages, I can just import (or require) them in my code.