npm npm_folder gruntfile相对根path规范
我想在我的节点操作在lib文件夹和我的项目结构是这样的,
- SRC
- LIB
- node_modules
- 的package.json
- Gruntfile.js
- DOC
所以我正在使用concat任务,
module.exports = function(grunt){ grunt.initConfig({ concat: { dist: { src: ['../src/js/controller.js', '../src/js/service.js'], dest: '../dist/js/built.js', }, }, }); grunt.loadNpmTasks('grunt-contrib-concat'); }
这wokrs和dist文件夹中创buildbuilt.js文件。 但是我应该使用“../”所有的path,我会有这么多的configuration。 我可以在Gruntfile.js中只将它设置为根path一次吗 ? 有没有像{root:"../"}
这样的设置?