Giter Club home page Giter Club logo

frontend-nanodegree-arcade-game's People

Contributors

6stringbeliever avatar bcuz avatar cherylcourt avatar durant-udacity avatar ethanlin-twer avatar hkasemir avatar nicolasartman avatar rhynodesigns avatar siakaramalegos avatar susansmith avatar walesmd avatar yyforyongyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

guanxin0206 oxyf

frontend-nanodegree-arcade-game's Issues

Post Styleguide: Update to Udacity Styleguide

https://github.com/udacity/frontend-nanodegree-styleguide-zh/blob/master/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%B8%88%E7%BA%B3%E7%B1%B3%E5%AD%A6%E4%BD%8D%E6%A0%B7%E5%BC%8F%E6%8C%87%E5%8D%97%20-%20JavaScript.md

自己根据 ES6 Styleguide 进行了一些取舍:

  • UTF-8。不知道如何使用 ESLint 验证
  • 注释。我觉得注释蛮没有必要的,保留意见
  • 分号。我觉得始终不采用分号
  • 变量命令。完全遵循同意
  • 字符串使用单引号。完全同意
  • 尽量使用 const。 prefer-const
  • 始终不使用 var。no-var
  • http://eslint.org/docs/rules/quote-props.html

Infra: Introduce npm/yarn

  • npm init
  • npm install -g yarn
  • commit yarn.lock file
  • run npm test in travis script section
  • add node_modules to .gitignore file
  • cache yarn in travis

Pitfall: use yarn to install dependencies every time after yarn.lock is introduced instead of using npm. Otherwise dependencies can't get resolved correctly by travis calling yarn

Infra: Git commit message check


  • 必须有自己的名字
  • 必须有 issue number(没需求就不做卡)
  • 必须有 前缀(feature/refactor/fix/chore/style/docs)
  • 前缀后面必须有冒号
  • 冒号后面必须有一个空格
  • 空格后面必须小写开头
  • 必须不多于70个字符
  • 详细的错误信息

后两个太难,暂时放弃了。

image

#!/bin/sh

commit_regex="\[Linesh\]\[#\d*\]\s\(Chore\|Feature\|Fix\|Docs\|Style\|Refactor\|Test\):\s[a-z]"
error_msg="Aborting commit, please double check your commit message."

if ! echo "$1" | grep -iqE "$commit_regex" ;
then
        echo "$error_msg" >&2
        exit 1
fi

Code review

Infra: Run the first test

  • yad babel-register for mocha to compile es6 tests
  • create test directory and a sample test file
  • import { expect } from 'chai'
  • import { describe, it } from 'mocha'
  • add npm test script: "test": "mocha test/ --recursive --compilers js:babel-core/register"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.