├── .babelrc ├── .gitignore ├── title.jpg ├── homescreen.png ├── app ├── img │ ├── code.png │ ├── share.png │ ├── coffee.png │ ├── favicon.png │ ├── launcher-icon-1x.png │ ├── play.svg │ └── stop.svg ├── songs │ └── alarm.mp3 ├── js │ └── app.js ├── manifest.json ├── pomodoro.appcache ├── components │ ├── Footer │ │ └── Footer.js │ └── Pomodoro │ │ └── Pomodoro.js ├── index.html └── css │ └── style.css ├── notifications.png ├── .travis.yml ├── .eslintrc.json ├── .editorconfig ├── CONTRIBUTING.md ├── __tests__ ├── mock-dom.js └── components │ ├── Footer │ └── Footer-test.js │ └── Pomodoro │ └── Pomodoro-test.js ├── webpack.config.js ├── LICENSE.md ├── package.json └── README.md /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "react"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /title.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/title.jpg -------------------------------------------------------------------------------- /homescreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/homescreen.png -------------------------------------------------------------------------------- /app/img/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/app/img/code.png -------------------------------------------------------------------------------- /app/img/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/app/img/share.png -------------------------------------------------------------------------------- /notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/notifications.png -------------------------------------------------------------------------------- /app/img/coffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/app/img/coffee.png -------------------------------------------------------------------------------- /app/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/app/img/favicon.png -------------------------------------------------------------------------------- /app/songs/alarm.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/app/songs/alarm.mp3 -------------------------------------------------------------------------------- /app/img/launcher-icon-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afonsopacifer/react-pomodoro/HEAD/app/img/launcher-icon-1x.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - stable 5 | 6 | before_script: 7 | - npm install -g mocha 8 | 9 | script: 10 | - npm run lint 11 | - npm test -------------------------------------------------------------------------------- /app/js/app.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDom from 'react-dom'; 3 | import Pomodoro from './../components/Pomodoro/Pomodoro'; 4 | 5 | ReactDom.render(, document.getElementById('app')); -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parserOptions": { 3 | "ecmaVersion": 6, 4 | "sourceType": "module", 5 | "ecmaFeatures": { 6 | "jsx": true 7 | } 8 | }, 9 | "rules": { 10 | "semi": 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "React Pomodoro", 3 | "icons": [ 4 | { 5 | "src": "img/launcher-icon-1x.png", 6 | "sizes": "48x48", 7 | "type": "image/png", 8 | "density": 1.0 9 | } 10 | ], 11 | "start_url": "index.html", 12 | "display": "standalone" 13 | } 14 | -------------------------------------------------------------------------------- /app/pomodoro.appcache: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | # 2021-06-02:v2 3 | 4 | CACHE: 5 | / 6 | /index.html 7 | /bundle.js 8 | /css/style.css 9 | /img/code.png 10 | /img/coffee.png 11 | /img/favicon.png 12 | /img/play.svg 13 | /img/share.png 14 | /img/stop.svg 15 | /songs/alarm.mp3 16 | 17 | NETWORK: 18 | * 19 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # http://editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | indent_style = space 9 | indent_size = 2 10 | end_of_line = lf 11 | charset = utf-8 12 | trim_trailing_whitespace = true 13 | insert_final_newline = true 14 | -------------------------------------------------------------------------------- /app/components/Footer/Footer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React from 'react'; 4 | 5 | const Footer = () => ( 6 | 9 | ); 10 | 11 | export default Footer; 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 1. Fork it! 4 | 2. Create your feature branch: `git checkout -b my-new-feature` 5 | 3. Commit your changes: `git commit -m 'Add some feature'` 6 | 4. Push to the branch: `git push origin my-new-feature` 7 | 8 | **After your pull request is merged**, you can safely delete your branch. 9 | 10 | ### [<-- Back](https://github.com/afonsopacifer/react-pomodoro/) 11 | -------------------------------------------------------------------------------- /__tests__/mock-dom.js: -------------------------------------------------------------------------------- 1 | let jsdom = require('jsdom'); 2 | 3 | global.document = jsdom.jsdom(''); 4 | global.window = document.defaultView; 5 | 6 | global.Notification = { 7 | requestPermission: function () {} 8 | }; 9 | 10 | global.localStorage = (function() { 11 | var store = {}; 12 | return { 13 | getItem: function(key) { 14 | return store[key]; 15 | }, 16 | setItem: function(key, value) { 17 | store[key] = value.toString(); 18 | }, 19 | clear: function() { 20 | store = {}; 21 | } 22 | }; 23 | })(); 24 | 25 | global.navigator = { 26 | userAgent: 'node.js' 27 | }; -------------------------------------------------------------------------------- /__tests__/components/Footer/Footer-test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import React from 'react'; 4 | import ReactDOM from 'react-dom'; 5 | import TestUtils from 'react-addons-test-utils'; 6 | import Footer from './../../../app/components/Footer/Footer'; 7 | 8 | import { assert } from 'chai'; 9 | 10 | describe('