cuijiudai
V2EX  ›  问与答

grunt 如何在 Gruntfile.js 获取文件的路径?

  •  
  •   cuijiudai · May 23, 2014 · 5284 views
    This topic created in 4410 days ago, the information mentioned may be changed or developed.
    我想的是在一个目录下有 dev 文件夹,在dev开发,然后js文件经过打包放到dev的上层文件夹,
    下面是seajs 的 transport 插件的配置,但是应该如何写配置呢?

    transport:{
    options : {
    paths: ["."],
    alias: '<%= pkg.spm.alias %>',
    idleading:'dev/',
    debug:false
    },
    devtodest:{
    files : [{
    expand: true,
    cwd: 'dev/',
    src: ['**/*.js'],
    dest:'dev/ss'
    }]
    }
    }
    1 replies    2014-05-23 19:21:29 +08:00
    emric
        1
    emric  
       May 23, 2014
    问题描述不清楚, gruntfile 在那个目录?
    解决问题方法: 相对路径
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   841 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 20:18 · PVG 04:18 · LAX 13:18 · JFK 16:18
    ♥ Do have faith in what you're doing.