设置一个新项目,该项目将包含我想从任务文件加载的多个grunt任务.
在运行我的第一个任务时,'core'应该为网站构建核心css,我收到一个我似乎无法解决的错误.一直在做一些谷歌搜索,没有找到这个具体问题.任何具有相同错误消息的问题通常都是OP的拼写错误或错位的花括号的结果.不确定这是不是这样,但也许其他人看到了我显然没有看到的东西.
Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: require('./package.json')
});
grunt.loadTasks('grunt-tasks');
};
Run Code Online (Sandbox Code Playgroud)
咕噜任务/咕噜-core.js
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-sass');
grunt.config('core', {
sass : {
options : {
sourceMap : true,
includePaths : 'node_modules/bootstrap-sass/assets/stylesheets'
},
dist : {
files : {
'main.css' : 'main.scss'
}
}
}
});
grunt.registerTask('core', ['sass:dist']);
};
Run Code Online (Sandbox Code Playgroud)
错误:
$ grunt core
Running "sass:dist" (sass) task
Verifying property sass.dist exists in config...ERROR
>> Unable to process task.
Warning: Required config property "sass.dist" missing. Use --force to continue. …Run Code Online (Sandbox Code Playgroud) 我正用这个撞到墙上.我有raphael js版本2.0,我需要让图像以跨浏览器的方式旋转.我很乐意在CSS3中做到这一点,但并非所有浏览器都支持我需要做的事情.
所以,在绞尽脑汁之后,我去了Raphael游乐场并在那里尝试了一些代码.在那里也不起作用.这里发生了什么?
去游乐场:http://raphaeljs.com/playground.html 运行此代码,应该看到一个正方形的轮廓.paper.rect(100,100,300,300).animate({rotation:" - 45"},2000);
使用转换工作:
paper.rect(100,100,300,300).animate({transform:"r45"},2000);
但不幸的是,通过变换,我似乎无法指定一个中心点.我希望对象从左下角旋转.我可以用这段代码做到这一点:
paper.rect(100,100,300,300).rotate(45,0,300)
但这没有动画,或接受缓和,或有任何回调.
我在几个例子中看过"轮换",包括:
http://www.irunmywebsite.com/raphael/additionalhelp.php#PAGETOP http://net.tutsplus.com/tutorials/javascript-ajax/an-introduction-to-the-raphael-js-library/
谢谢, - 基思