例如我有我的laravel项目,它有这种结构
./
--assets
---- postcss
------的style.css
我想在app app文件夹外输出那个style.css(根目录以上一级)。这是可能的(我正在运行灵药)
编辑: - 我的gulp文件
var gulp = require('gulp');
var elixir = require('laravel-elixir');
require('laravel-elixir-postcss');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir.extend('changePath', function() {
gulp.task('css', function () {
return gulp.src("./resources/assets/postcss/")
.pipe($.cleanCss())
.pipe(gulp.dest("../css/style.css"));
});
elixir(function(mix) {
mix.postcss('style.css', {
plugins:[
//require('csstyle'),
require('autoprefixer'),
//require('cssnext'),
require('lost'),
require('postcss-font-magician')
// require('stylelint')
]
})
.changePath();
});
答案 0 :(得分:0)
你不能上目的路径中的目录吗?例如:
/tmp