Authored by hf

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

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