Skip to content

Commit

Permalink
update 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Dec 4, 2013
1 parent 08f0b5b commit e6e16bd
Show file tree
Hide file tree
Showing 456 changed files with 8,969 additions and 8,653 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@

### 最简用例

当出现问题时,请精简出错代码到最简,避免和具体业务相关联,避免其他无关的代码执行
当出现问题时,请精简出错代码到最简,避免和具体业务相关联,避免其他无关的代码执行,并提交到 jsfidder.


## 如何提交 patch

### 代码规范

patch 代码格式请参考 [KISSY 源码规范](http://docs.kissyui.com/docs/html/tutorials/style-guide/kissy-source-style.html)
patch 代码格式请参考 [KISSY 源码规范](http://docs.kissyui.com/1.4/docs/html/tutorials/style-guide/kissy-source-style.html)
并在提交前对代码执行 jshint,确保 pass.

### 环境: Node/Ant/Java

Expand Down
27 changes: 14 additions & 13 deletions bin/kissy-kison.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
var program = require('./lib/commander');
program
.option('-g, --grammar <grammar>', 'Set kison grammar file')
.option('-p, --path <path>', 'Set generated file path')
.option('-e, --encoding [encoding]', 'Set grammar file encoding', 'utf-8')
.option('-w, --watch', 'Watch grammar file change')
// defaults bool true
Expand All @@ -16,9 +15,9 @@ program
.parse(process.argv);

var S = require('../build/kissy-nodejs'),
/*jshint camelcase:false*/
js_beautify = require('js-beautify').js_beautify,
fs = require('fs'),
m_path = program.path,
path = require('path'),
grammar = path.resolve(program.grammar),
encoding = program.encoding;
Expand All @@ -38,13 +37,9 @@ var grammarBaseName = path.basename(grammar, '-grammar.kison');

var modulePath;

if (m_path) {
// S.log('*********** m_path:');
m_path = path.resolve(m_path) + '/';
modulePath = m_path + grammarBaseName + '.js';
} else {
modulePath = path.resolve(grammar, '../' + grammarBaseName + '.js');
}

modulePath = path.resolve(grammar, '../' + grammarBaseName + '.js');


// S.log('*********** modulePath:');
// S.log(modulePath);
Expand All @@ -54,14 +49,20 @@ var codeTemplate = '' +
' Generated by kissy-kison.' +
'*/\n' +
'KISSY.add(function(_, undefined){\n' +
'/*jshint quotmark:false, loopfunc:true, indent:false, unused:false, asi:true, boss:true*/\n' +
'{code}\n' +
'});';

function my_js_beautify(str) {
//return str;
var opts = {"indent_size": "4", "indent_char": " ",
"preserve_newlines": true, "brace_style": "collapse",
"keep_array_indentation": false, "space_after_anon_function": true};
var opts = {
'indent_size': '4',
'indent_char': ' ',
'preserve_newlines': true,
'brace_style': 'collapse',
'keep_array_indentation': false,
'space_after_anon_function': true
};
return js_beautify(str, opts);
}

Expand All @@ -73,7 +74,7 @@ S.use('kison', function (S, KISON) {

console.info('start generate grammar module: ' + modulePath + '\n');
var start = S.now();

/*jshint evil:true*/
var code = new KISON.Grammar(eval(grammarContent)).genCode(kisonCfg);

var moduleCode = my_js_beautify(S.substitute(codeTemplate, {
Expand Down
2 changes: 1 addition & 1 deletion bin/kissy-xtemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ S.use('xtemplate/compiler', function (S, XTemplateCompiler) {
var moduleCode = myJsBeautify(
'/** Compiled By kissy-xtemplate */\n' +
'KISSY.add(function(S,require,exports,module){\n' +
'/*jshint quotmark: false, unused:false, indent:false*/\n' +
'/*jshint quotmark:false, loopfunc:true, indent:false, asi:true, unused:false, boss:true*/\n' +
'return ' + XTemplateCompiler.compileToStr(tplContent)) + ';\n' +
'});';
fs.writeFileSync(modulePath, moduleCode, encoding);
Expand Down
2 changes: 1 addition & 1 deletion build/anim-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/anim.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.41
MIT Licensed
build time: Dec 2 17:30
build time: Dec 4 22:04
*/
/*
Combined processedModules by KISSY Module Compiler:
Expand Down
2 changes: 1 addition & 1 deletion build/anim/base-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/anim/base.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.41
MIT Licensed
build time: Dec 2 17:30
build time: Dec 4 22:04
*/
/*
Combined processedModules by KISSY Module Compiler:
Expand Down
14 changes: 7 additions & 7 deletions build/anim/timer-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 3 additions & 12 deletions build/anim/timer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.41
MIT Licensed
build time: Dec 2 17:30
build time: Dec 4 22:04
*/
/*
Combined processedModules by KISSY Module Compiler:
Expand Down Expand Up @@ -403,18 +403,9 @@ KISSY.add("anim/timer/transform", ["dom", "./fx"], function(S, require) {
var scaleX, scaleY, skew, A = matrix[0], B = matrix[1], C = matrix[2], D = matrix[3];
if(A * D - B * C) {
scaleX = Math.sqrt(A * A + B * B);
A /= scaleX;
B /= scaleX;
skew = A * C + B * D;
C -= A * skew;
D -= B * skew;
scaleY = Math.sqrt(C * C + D * D);
C /= scaleY;
D /= scaleY;
skew /= scaleY;
skew = (A * C + B * D) / (A * D - C * B);
scaleY = (A * D - B * C) / scaleX;
if(A * D < B * C) {
A = -A;
B = -B;
skew = -skew;
scaleX = -scaleX
}
Expand Down
2 changes: 1 addition & 1 deletion build/anim/transition-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/anim/transition.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.41
MIT Licensed
build time: Dec 2 17:30
build time: Dec 4 22:04
*/
/*
Combined processedModules by KISSY Module Compiler:
Expand Down
2 changes: 1 addition & 1 deletion build/attribute-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/attribute.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.41
MIT Licensed
build time: Dec 2 15:11
build time: Dec 4 22:04
*/
/*
Combined processedModules by KISSY Module Compiler:
Expand Down
2 changes: 1 addition & 1 deletion build/base-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/base.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Copyright 2013, KISSY v1.41
MIT Licensed
build time: Dec 2 15:11
build time: Dec 4 22:04
*/
/*
Combined processedModules by KISSY Module Compiler:
Expand Down
Loading

0 comments on commit e6e16bd

Please sign in to comment.