Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
645 views
in Technique[技术] by (71.8m points)

yarnpkg - How to create run configuration with Yarn instead of npm in WebStorm 2016.2.3

I used to work with npm via WebStorm. I usually just add a npm based run configuration in the right corner, like what described in here.

I recently tried Yarn and I'm trying to do similar thing like with npm, however I can't find the options. Is there any way to do this? Or I just need to wait for updates from JetBrains?

question from:https://stackoverflow.com/questions/40256897/how-to-create-run-configuration-with-yarn-instead-of-npm-in-webstorm-2016-2-3

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

yarn will be supported in 2016.3

As stated in https://youtrack.jetbrains.com/issue/WEB-23737#comment=27-1669437

In WebStorm 2016.3 it will be possible to select yarn package instead of npm:

  • go to Settings | Languages & Frameworks | Node.js and NPM
  • click ellipsis button next to Node.js interpreter to open "Node.js interpreters" dialog

Also, installed yarn packages will be available in drop-down list for your convenience.

Once yarn package set, all npm-related actions will use the specified yarn package.

enter image description here

Also check the WEB-23820 ticket for "yarn tasks" support (side panel similar to NPM tasks one where you can see the tasks and execute them).


UPDATE (2016-11-15)
WebStorm 2016.3 was released yesterday. Both aforementioned tickets were implemented.


UPDATE (2016-12-13)
On Windows, if you install Yarn via .msi installer, the path would be C:Program Files (x86)Yarn -- IDE (PhpStorm 2016.3.1 in this case) detected it automatically.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...