node---path模块,nodeJs的path对象,如何用来处理目录,path.join,path.resolve,path.relative.path
path.dirname(agr)constpath=require('path');path.dirname('dist/js/a.js');//返回dist/js,当dirname的参数agr为文件时候,返回改文件的目录path.dirname(path.resolve('a','b','d/e'));//返回D:\demos\a\b\d绝对路径参数时候,返回上层目录path.dirname(