✅ Working with npm in razor pages with vscode
I need to use npm for my project, and i don't quite understand how to add it t the solution. All of the info/tutorials i could find were about doing it with visual studio, and i could't find nothing useful about how to do it with cli. if i could get js/css files from npm standalone i could put them into the lib folder, but im entirely new to npm and don't know how to do it either. Can someone please help?
6 Replies
Generally, stuff installed from NPM is not meant to be used directly, but rather referenced in other scripts and built into the final output
What exactly do you want to install?
showdown npm package to use with my website
I'd just use the
browser
method, then
https://www.npmjs.com/package/showdown#cdn
https://www.npmjs.com/package/showdown#browser
To use it with NPM you would most likely need to use a bundler of some sortso... i just download the file and it into wwwroot?
Or use the CDN link
thank you so much, this works perfectly!