Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Refacto Jest tests
Browse files Browse the repository at this point in the history
Move config files into `package.json`
Update examples
  • Loading branch information
yoriiis committed Apr 2, 2020
1 parent 6dc0da7 commit 1044763
Show file tree
Hide file tree
Showing 16 changed files with 106 additions and 97 deletions.
3 changes: 0 additions & 3 deletions .browserslistrc

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

32 changes: 0 additions & 32 deletions .eslintrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,13 @@
# CHANGELOG

## 1.0.2

### Updates

* Refacto Jest tests
* Move config files into `package.json`
* Update examples

## 1.0.1

### Updates
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# Pollsr

![Pollsr](https://img.shields.io/badge/pollsr-v1.0.1-ff004b.svg?style=for-the-badge) [![TravisCI](https://img.shields.io/travis/com/yoriiis/pollsr/master?style=for-the-badge)](https://travis-ci.com/yoriiis/pollsr) [![Coverage Status](https://img.shields.io/coveralls/github/yoriiis/pollsr?style=for-the-badge)](https://coveralls.io/github/yoriiis/pollsr?branch=master) ![Node.js](https://img.shields.io/node/v/pollsr?style=for-the-badge) [![Bundlephobia](https://img.shields.io/bundlephobia/minzip/pollsr?style=for-the-badge)](https://bundlephobia.com/result?p=fela@latest)
![Pollsr](https://img.shields.io/badge/pollsr-v1.0.2-ff004b.svg?style=for-the-badge) [![TravisCI](https://img.shields.io/travis/com/yoriiis/pollsr/master?style=for-the-badge)](https://travis-ci.com/yoriiis/pollsr) [![Coverage Status](https://img.shields.io/coveralls/github/yoriiis/pollsr?style=for-the-badge)](https://coveralls.io/github/yoriiis/pollsr?branch=master) ![Node.js](https://img.shields.io/node/v/pollsr?style=for-the-badge) [![Bundlephobia](https://img.shields.io/bundlephobia/minzip/pollsr?style=for-the-badge)](https://bundlephobia.com/result?p=fela@latest)

Pollsr is a **minimalist** library to dynamically create polls with a elegante default theme.

Expand Down
25 changes: 0 additions & 25 deletions babel.config.js

This file was deleted.

6 changes: 3 additions & 3 deletions dist/pollsr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/custom-template/demo.js
@@ -1,13 +1,12 @@
import { PollsrCore, PollsrTemplate } from '../../dist/pollsr.js';
import datas from '../datas.json';

const answerId = window.sessionStorage.getItem('pollsr-answer');

class CustomTemplate extends PollsrTemplate {
updateTemplateAfterVote () {
super.updateTemplateAfterVote();

if (answerId) {
if (this.options.hasVoted) {
const answerId = window.sessionStorage.getItem('pollsr-answer');
this.options.element
.querySelector(`.pollsr-button[data-answer-id="${answerId}"]`)
.parentNode.classList.add('active');
Expand All @@ -25,6 +24,7 @@ class CustomTemplate extends PollsrTemplate {
}
}

const answerId = window.sessionStorage.getItem('pollsr-answer');
const pollsrCore = new PollsrCore({
element: document.querySelector('#pollsr-1'),
template: new CustomTemplate(),
Expand Down
4 changes: 2 additions & 2 deletions examples/dist/basic-usage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1044763

Please sign in to comment.