我是Angular 2開發人員的新手,如果還不夠,我正在嘗試與Play框架集成爲後端。未找到「autoprefixer」任務的插件
我試圖按照有關設置了那種由丹尼斯Sinyakov一個偉大的職位:https://www.toptal.com/java/building-modern-web-applications-with-angularjs-and-play-framework
的想法是代理將進入到角應用到播放應用程序的請求。
它建議將'autoprefixer'任務作爲配置中的一部分與我遇到問題。 當我開始在角應用程序,我得到以下錯誤:
jit-grunt: Plugin for the "autoprefixer" task not found.
這裏是我的Gruntfile.js的部分可能會感興趣。
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Automatically load required Grunt tasks
require('jit-grunt')(grunt, {
useminPrepare: 'grunt-usemin',
ngtemplates: 'grunt-angular-templates',
cdnify: 'grunt-google-cdn'
});
// Configurable paths for the application
var appConfig = {
app: require('./bower.json').appPath || 'app',
dist: 'dist'
};
這
grunt.registerTask('serve', 'Compile then start a connect web server', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
}
grunt.task.run([
'clean:server',
'wiredep',
'concurrent:server',
'autoprefixer:server',
'configureProxies:server',
'connect:livereload',
'watch'
]);
});
欣賞關於如何安裝這個插件的所有提示,並進一步上對其進行配置,如果這是必要的。
這裏可能相關的問題:HTTP://計算器.com/questions/36972598/grunt-jit-grunt-plugin-for-the-protractor-task-not-found嘗試加載grunt.loadNpmTasks('grunt-autoprefixer');沒有使用jit-grunt – Revive
我已經運行'npm install grunt-autoprefixer --save-dev',添加了'grunt.loadNpmTasks('grunt-autoprefixer');'到Gruntfile.js,但我仍然得到錯誤**必需的配置屬性「autoprefixer.server」丟失。 **。你也可以詳細說明不使用jit-grunt嗎?我使用Intellij來運行任務。 –