Node.js 如何改进节点中的路径
我在节点模块中有很多目录路径,我希望在IntelliJ\WebStorm(或任何其他IDE)中完成代码 下面是我目前如何做的一个例子。它不会让我完成代码,但至少我不必键入整个路径:Node.js 如何改进节点中的路径,node.js,intellij-idea,autocomplete,path,webstorm,Node.js,Intellij Idea,Autocomplete,Path,Webstorm,我在节点模块中有很多目录路径,我希望在IntelliJ\WebStorm(或任何其他IDE)中完成代码 下面是我目前如何做的一个例子。它不会让我完成代码,但至少我不必键入整个路径: export const sharedFolder = assetServerFolder + 'Shared/'; export const sharedTsFolder = sharedFolder + 'Scripts/App/Ts/'; export const sharedImagesFolder = sh
export const sharedFolder = assetServerFolder + 'Shared/';
export const sharedTsFolder = sharedFolder + 'Scripts/App/Ts/';
export const sharedImagesFolder = sharedFolder + 'Content/Images/';
有谁有更好的方法吗?当您加入路径时,您应该使用
path.join
功能使代码更易于移植。见:
/
适用于这些对象。所有这些都不能让我在IDE中完成代码。