Giter VIP home page Giter VIP logo

splayerx's Introduction

SPlayer

Dependencies Status devDependencies Status Build Status appveyor codecov

开发指南

目前架构的特点在 Electron 的基础上使用了 Vue.js MVVM组件化开发框架。

  • 开发中使用 webpack,运行 npm run dev 修改代码后可以同步至表现层,hot reload,不用重新启动。
  • 使用 eslint 控制代码质量,不满足标准的代码无法通过编译并会报错。
  • 每次版本提交会通过 travis-ci 和 appveyor 自动编译,如果不能通过编译会记录错误,且相应的 badge会变红色。
  • tag 一个新的commit时,CI 工具会自动打包发行版本,并放入 GitHub Releases
  • 使用 Karma 进行单元测试,codecov的badge codecov 会显示当前代码的测试覆盖率。
  • 使用 Global Event Bus 做消息通讯
  • 使用 vue-routervuex 用于跨组件数据交互。
  • 使用 vue-resource 进行与 Restful API 服务器之间的通讯

注意事项

  1. 通过Global Event Bus this.$bus 发出指令,例如 play、pause
  2. VideoCanvas 收到 event 之后,调用 DOM 的 function 控制 video 对象
  3. video 对象的事件会绑定至 VideoCanvas 的 methods
  4. 消息中的状态数据通过 vuex commit 至 this.$store
  5. 其他各 vue components 根据 data store 的数据状态更新表现层
  • video-controller 之下的 child components 需要响应 click 事件时注意使用 v-on:click.capture.stop 以保证先于 video-controller 触发点击事件并避免事件穿透
  • 代码引用文件时使用 ~@/ 代表代码根目录,例如 src="~@/assets/"
  • 字体文件放在fonts目录下,css|scss文件放在css目录下
  • 使用 vue-i18n 做多语言支持
  • 优先使用CSS来制作动态效果

Branching Model

Build

# install dependencies
npm install

# serve with hot reload at localhost:9080
npm run dev

# build electron application for production
npm run build

# run unit test
npm run unit

# lint all JS/Vue component files in `src/`
npm run lint

This project was generated with electron-vue@7c4e3e9 using vue-cli. Documentation about the original structure can be found here.

splayerx's People

Contributors

tomasen avatar yurijinx avatar lilacvapor avatar ymmuse avatar

Watchers

Nhut Phan avatar

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.