Share Posted October 14, 2021 In a Vim editor I can open the .npmrc file with this command: myproject $ vim ~/.npmrc <ENTER> How do I do this in Visual Studio Code ? 1) myproject $ vscode ~/.mpmrc <ENTER> or . . . 2) myproject $ npm set editor code myproject $ npm config edit Link to comment Share on other sites More sharing options...
Share Posted October 14, 2021 I never use commands to open files, but this says #2. https://stackoverflow.com/a/54247331/2760155 1 Link to comment Share on other sites More sharing options...
Author Share Posted October 15, 2021 I also never use commands to open files. I open them manually. 'myproject > npm set editor code' followed by 'myproject > npm config edit' did NOT work for me. 1) There is a npmrc file in C:\Users\SteinarV\AppData\Roaming\npm\node_modules\npm\npmrc. Maybe I can open that file manually, and paste in these lines: '//npm.greensock.com/:_authToken=<my auth token> @gsap:registry=https://npm.greensock.com' But I can NOT open this npmrc file with the 'Visual Studio Code' editor. 2) Or maybe I can create a .npmrc file manually in my project root folder, and paste in the above lines ? 3) Then the first time that I install GSAP to a project I need to install via: npm install gsap@npm:@gsap/shockingly Link to comment Share on other sites More sharing options...
Share Posted October 16, 2021 6 hours ago, SteinarvDesign said: But I can NOT open this npmrc file with the 'Visual Studio Code' editor. I'm on Windows too, but I've never had that problem. When I installed VS Code, I set the option to add it context menu so I can right click on a file to open it. But I rarely do that. I usually just create and edit the file within my project folder... If you still can't get it working, you should probably direct your problem to the VS Code team as they would be more knowledgeable on the subject. 1 Link to comment Share on other sites More sharing options...
Author Share Posted October 18, 2021 GSAP with html, css, js, CDN files and a 'scripts' folder for the bonus plugins is the best solution so far. A project with a bundler - Webpack or Parcel - is more problematic because of the large number of dependencies the bundler relies on. Creating a .npmrc file within my project folder and installing via: 'npm install gsap@npm:@gsap/shockingly' is working, but several security vulnerabilities not related to GSAP is a problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now