Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

路径问题 #3

Open
tthallos opened this issue Apr 17, 2015 · 0 comments
Open

路径问题 #3

tthallos opened this issue Apr 17, 2015 · 0 comments

Comments

@tthallos
Copy link

比如现在有examples目录

examples
├── gulpfile.js
├── public
└── src
    ├── main.js
    └── modules
        └── oz.js

gulpfile.js

gulp.task('ozma', function(){
  return gulp.src('src/main.js')
    .pipe(ozma({
      baseUrl: 'src',
      disableAutoSuffix: true,
      loader: 'src/modules/oz.js'
    }))
    .pipe(gulp.dest('public'));
})

最后在public下会是这个路径

public/src/main.js

vinyl-fs的dest方法里有个saveFile方法,发现传过来的file.relative就是src/main.js。试了下其他的gulp插件,传进来的file.relative都是main.js。

这个有什么好的解决办法吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant