90 | );
91 | }
92 | }
93 |
94 | export default Timer;
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React Timer Basic
2 |
3 | A basic timer that will start a countdown based on an input of time in seconds.
4 |
5 | The Timer provides start, stop, and rest functionality. When the timer reaches a value <= 10, the timer color changes to red.
6 |
7 | Go **[here](http://react-timer-basic.drminnaar.me/)** for live demo.
8 |
9 | Component Diagram
10 | 
11 |
12 | This project also demonstrates:
13 |
14 | * a typcial React project layout structure
15 | * babel setup and configuration
16 | * webpack setup and configuration
17 | * eslint setup and configuration
18 | * SCSS setup and configuration
19 |
20 | **Screenshots:**
21 |
22 | ... | ...
23 | --- | ---
24 |  | 
25 |  | 
26 |
27 | ---
28 |
29 | ## Developed With
30 |
31 | * [Node.js](https://nodejs.org/en/) - Javascript runtime
32 | * [React](https://reactjs.org/) - A javascript library for building user interfaces
33 | * [Babel](https://babeljs.io/) - A transpiler for javascript
34 | * [Webpack](https://webpack.js.org/) - A module bundler
35 | * [SCSS](http://sass-lang.com/) - A css metalanguage
36 | * [Bootstrap 4](https://getbootstrap.com/) - Bootstrap is an open source toolkit for developing with HTML, CSS, and JS
37 | * [Surge] - Static web publishing for Front-End Developers
38 |
39 | ---
40 |
41 | ## Related Projects
42 |
43 | * [react-starter]
44 |
45 | A basic template that consists of the essential elements that are required to start building a React application
46 |
47 | * [react-clicker]
48 |
49 | A basic React app that allows one to increase, decrease, or reset a counter
50 |
51 | * [react-clock-basic]
52 |
53 | A basic clock that displays the current date and time
54 |
55 | * [react-timer-advanced]
56 |
57 | A basic countdown timer that offers an advanced UI experience
58 |
59 | * [react-masterminds]
60 |
61 | A basic game of guessing a number with varying degrees of difficulty
62 |
63 | * [react-movie-cards]
64 |
65 | A basic application that displays a list of movies as a list of cards
66 |
67 | * [react-calculator-standard]
68 |
69 | A calculator that provides the essential arithmetic operations, an expression builder, and a complete history of all expressions
70 |
71 | * [react-bitcoin-monitor]
72 |
73 | An app that monitors changes in the Bitcoin Price Index (BPI)
74 |
75 | * [react-weather-standard]
76 |
77 | A weather application that displays the current weather, daily forecasts, and hourly forecasts based on your current geolocation
78 |
79 | ---
80 |
81 | ## Getting Started
82 |
83 | These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
84 |
85 | ### Prerequisites
86 |
87 | The following software is required to be installed on your system:
88 |
89 | * Node 8.x
90 | * Npm 3.x
91 |
92 | Type the following commands in the terminal to verify your node and npm versions
93 |
94 | ```bash
95 | node -v
96 | npm -v
97 | ```
98 |
99 | ### Install
100 |
101 | Follow the following steps to get development environment running.
102 |
103 | * Clone _'react-timer-basic'_ repository from GitHub
104 |
105 | ```bash
106 | git clone https://github.com/drminnaar/react-timer-basic.git
107 | ```
108 |
109 | _OR USING SSH_
110 |
111 | ```bash
112 | git clone git@github.com:drminnaar/react-timer-basic.git
113 | ```
114 |
115 | * Install node modules
116 |
117 | ```bash
118 | cd react-timer-basic
119 | npm install
120 | npm dedupe
121 | ```
122 |
123 | ### Build
124 |
125 | * Build application
126 |
127 | This command will also run ESLint as part of build process.
128 |
129 | ```bash
130 | npm run build
131 | ```
132 |
133 | * Build application and start watching for changes
134 |
135 | This command will also run ESLint as part of build process.
136 |
137 | ```bash
138 | npm run build:watch
139 | ```
140 |
141 | ### Run ESlint
142 |
143 | * Lint project using ESLint
144 |
145 | ```bash
146 | npm run lint
147 | ```
148 |
149 | * Lint project using ESLint, and autofix
150 |
151 | ```bash
152 | npm run lint:fix
153 | ```
154 |
155 | ### Run
156 |
157 | * Run start
158 |
159 | This will run the _'serve'_ npm task
160 |
161 | ```bash
162 | npm start
163 | ```
164 |
165 | * Run webpack dev server
166 |
167 | ```bash
168 | npm run serve:dev
169 | ```
170 |
171 | * Alternatively run live-server (simple development http server with live reload capability)
172 |
173 | ```bash
174 | npm run serve
175 | ```
176 |
177 | ---
178 |
179 | ## Versioning
180 |
181 | I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/drminnaar/react-timer-basic/tags).
182 |
183 | ## Authors
184 |
185 | * **Douglas Minnaar** - *Initial work* - [drminnaar](https://github.com/drminnaar)
186 |
187 | [Surge]: https://surge.sh/
188 | [react-starter]: https://github.com/drminnaar/react-starter
189 | [react-clicker]: https://github.com/drminnaar/react-clicker
190 | [react-clock-basic]: https://github.com/drminnaar/react-clock-basic
191 | [react-timer-basic]: https://github.com/drminnaar/react-timer-basic
192 | [react-timer-advanced]: https://github.com/drminnaar/react-timer-advanced
193 | [react-masterminds]: https://github.com/drminnaar/react-masterminds
194 | [react-movie-cards]: https://github.com/drminnaar/react-movie-cards
195 | [react-calculator-standard]: https://github.com/drminnaar/react-calculator-standard
196 | [react-bitcoin-monitor]: https://github.com/drminnaar/react-bitcoin-monitor
197 | [react-weather-standard]: https://github.com/drminnaar/react-weather-standard
--------------------------------------------------------------------------------