Giter VIP home page Giter VIP logo

praise's Introduction

praise手势点赞

  • css3绘制手势
  • ES6完成点赞+1功能的父类PraiseButton
  • 子类Thumb实现点击点赞,点击10次后手指变灰。
  • 用babel编译ES6代码,使用System.js加载对应编译文件
  • 将编译文件挂载为jQuery的组件
  • 实现Selenium-webdriver的e2e功能测试
  • 实现Karma完成点赞+1组件的单元测试

目录结构

├── LICENSE
├── README.md
├── dist
├── e2e.js
├── geckodriver
├── index.html
├── karma.conf.js
├── package-lock.json
├── package.json
├── src
│   ├── css
│   │   └── main.css
│   └── js
│       ├── index.js
│       └── thumb.js
├── test
│   ├── test.js
│   └── test.spec.js
└── tree.js

5 directories, 14 files

下载

下载当前项目

git clone https://github.com/pengxiaohua/praise
cd praise 

安装

安装node_modules

npm install 

编译

babel编译es6代码

babel src/js/index.js -o dist/index-es5.js
babel src/js/thumb.js -o dist/thumb-es5.js

启动

本人是在XAMPP环境下运行的

localhost:8080/praise/

功能测试

使用的是 selenium-webdriver,安装浏览器启动程序这里选择的是Firefox启动程序geckodriver macos v0.18.0版本,下载解压后和测试文件e2e.js放在一个目录下,开始测试

node e2e.js

单元测试

使用karma进行简单的单元测试

karma init(默认选项)
karma start

praise's People

Contributors

pengxiaohua avatar

Watchers

James Cloos avatar

praise's Issues

suggest

The teacher has three points to say.
1.Folder placed quite conform to specification
2.After the project to use their own thinking to write, can not copy,This is the work of their own
3.Functional tests do not pass parameters

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.