国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Laravel Elixir怎么整合使用Compass?
僅有的幸福
僅有的幸福 2017-05-16 16:51:35
0
1
700

Laravel 5.3的gulpfile.js是這樣的:

var elixir = require('laravel-elixir');

require('laravel-elixir-vue');

elixir(function(mix) {
    mix.sass('app.scss')
       .webpack('app.js');
});

上面可以直接編譯壓縮scss和js。問(wèn)題是如果用compass寫的scss文件,那應(yīng)該怎么編譯呢?
試過(guò)"laravel-elixir-sass-compass": "^0.5.0",這個(gè)包,好像很久沒(méi)更新了,安裝有問(wèn)題:

$ npm install
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\dell\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v7.0.0-nightly2016080329e49fc286
npm ERR! npm  v3.10.5

npm ERR! cb is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\dell\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v7.0.0-nightly2016080329e49fc286
npm ERR! npm  v3.10.5

npm ERR! cb is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     D:\wnmp\www\laravel-5-3-demo\npm-debug.log
僅有的幸福
僅有的幸福

全部回復(fù)(1)
劉奇

這個(gè)包安裝沒(méi)有問(wèn)題的。親測(cè)可用。

npm install --save-dev laravel-elixir-sass-compass

安裝后在gulpfile.js中寫如下代碼

var elixir = require('laravel-elixir');
    require('laravel-elixir-sass-compass');
    
elixir(function(mix) {
    mix.compass('app.scss');
});

然后執(zhí)行 npm run dev
在這里有一個(gè)注意的地方
如果使用的node版本是6.0以上版本,會(huì)報(bào)錯(cuò)的。需要使用6.0一下版本
我使用的是n工具來(lái)管理自己的node版本的。我安裝了5.11.0的就可以使用

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板