Authored by hf

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

{
"disallowEmptyBlocks": true,
"disallowKeywordsOnNewLine": ["else", "else if"],
"disallowKeywords": ["with", "eval"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowMultipleSpaces": {"allowEOLComments": true},
"disallowNamedUnassignedFunctions": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowOperatorBeforeLineBreak": ["."],
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforeComma": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowSpaceBeforeSemicolon": true,
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideObjectBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"maximumLineLength": 120,
"requireAnonymousFunctions": {
"allExcept": ["declarations"]
},
"requireBlocksOnNewline": {
"includeComments": true
},
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireDollarBeforejQueryAssignment": true,
"requireDotNotation": true,
"requireLineBreakAfterVariableAssignment": true,
"requireObjectKeysOnNewLine": true,
"requireOperatorBeforeLineBreak": true,
"requirePaddingNewLineAfterVariableDeclaration": true,
"requirePaddingNewLinesBeforeLineComments": true,
"requirePaddingNewLinesInObjects": true,
"requireParenthesesAroundIIFE": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"void",
"while",
"with",
"return",
"typeof"
],
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": 1,
"requireSpaceBeforeKeywords": [
"else",
"while",
"catch"
],
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInForStatement": true,
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"requireVarDeclFirst": true,
"validateAlignedFunctionParameters": {
"lineBreakAfterOpeningBrace": true,
"lineBreakBeforeClosingBrace": true
},
"validateIndentation": 4,
"validateParameterSeparator": ", ",
"maxErrors": 20
}
... ...
{
"asi": false,
"bitwise": false,
"boss": false,
"browser": true,
"couch": false,
"curly": true,
"debug": false,
"devel": true,
"dojo": false,
"eqeqeq": true,
"eqnull": true,
"es3": false,
"esnext": false,
"evil": false,
"expr": true,
"forin": true,
"funcscope": true,
"gcl": false,
"globalstrict": false,
"immed": true,
"iterator": false,
"jquery": false,
"lastsemic": false,
"latedef": true,
"laxbreak": true,
"laxcomma": false,
"loopfunc": false,
"mootools": false,
"moz": false,
"multistr": false,
"newcap": true,
"noarg": true,
"node": true,
"noempty": false,
"nonew": true,
"nonstandard": false,
"nomen": false,
"onecase": false,
"onevar": false,
"passfail": false,
"phantom": false,
"plusplus": false,
"proto": false,
"prototypejs": false,
"regexdash": true,
"regexp": false,
"rhino": false,
"scripturl": true,
"shadow": false,
"shelljs": false,
"smarttabs": true,
"strict": false,
"sub": false,
"supernew": false,
"trailing": true,
"undef": true,
"unused": "vars",
"validthis": true,
"withstmt": false,
"white": true,
"worker": false,
"wsh": false,
"yui": false,
"maxerr": 20,
"predef": ["define", "seajs", "wx"],
"quotmark": "single"
}
... ...
*.iml
.idea/
.ipr
.iws
*~
~*
*.diff
*.patch
*.bak
.DS_Store
Thumbs.db
.project
.*proj
.svn/
*.swp
*.swo
*.pyc
*.pyo
.build
node_modules
_site
sea-modules
spm_modules
.cache
dist
coverage
css/
.sass-cache/
... ...
dist
_site
sea-modules
spm_modules
node_modules
.git
tests
examples
test
coverage
... ...
存放静态资源
\ No newline at end of file
require 'compass/import-once/activate'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
fonts_dir = "font"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
output_style = :expanded
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
Encoding.default_external = "utf-8"
\ No newline at end of file
... ...
/**
* GULP-FILE
* author: xuqi(qi.xu@yoho.cn)
* date: 2015/9/30
*/
var gulp = require('gulp'),
compass = require('gulp-compass'),
cp = require('child_process');
gulp.task('default', ['compass', 'compass-watch', 'spm-doc']);
// compass
gulp.task('compass', function() {
gulp.src('sass/**/*.scss')
.pipe(
compass({
config_file: 'config.rb',
css: 'css',
sass: 'sass'
})
).on('error', function(error) {
console.log(error);
this.emit('end');
});
});
// compass watch
gulp.task('compass-watch', function() {
gulp.watch('sass/**/*.scss', ['compass']);
});
// start spm server
gulp.task('spm-doc', function() {
var sd = cp.exec('spm doc');
// sd.stdout.on('data', function(data) {
// console.log(data);
// });
sd.stderr.on('data', function(data) {
console.log(data);
});
sd.on('exit', function(code) {
console.log('process spm doc exit with code ' + code);
});
});
\ No newline at end of file
... ...
var yohobuy;
require('./js/index');
module.exports = yohobuy;
... ...
alert('I am test');
\ No newline at end of file
... ...
{
"name": "yohobuy",
"version": "0.0.1",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
"author": "xuqi <xuqi9010@gmail.com>",
"repository": {
"type": "git",
"url": ""
},
"bugs": {
"url": ""
},
"licenses": "MIT",
"spm": {
"main": "index.js",
"dependencies": {
},
"devDependencies": {
"expect.js": "0.3.1"
}
},
"devDependencies": {
"spm": "3",
"gulp": "^3.9.0",
"gulp-compass": "^2.1.0"
},
"scripts": {
"test": "spm test",
"build": "spm build"
}
}
... ...
body {
background-color: #ff0;
}
\ No newline at end of file
... ...
<script src="http://172.16.6.248:8000/static/js/sea.js?nowrap"></script>
<script>
seajs.config({
base: 'http://172.16.6.248:8000'
});
seajs.use('js/index');
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -10,5 +10,19 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="telephone=no" name="format-detection" />
<meta content="email=no" name="format-detection" />
<script type="text/javascript">
(function (doc, win) {
var docEl = doc.documentElement;
(function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) {
return;
}
docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
}());
})(document, window);
</script>
<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
</head>
<body>
\ No newline at end of file
... ...