我是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来运行任务。 –