https://github.com/frenchbread/fe_test_task_widget
https://github.com/frenchbread/fe_test_task_widget
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/frenchbread/fe_test_task_widget
- Owner: frenchbread
- License: mit
- Created: 2021-01-06T14:23:37.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-07T12:24:33.000Z (over 4 years ago)
- Last Synced: 2025-02-11T19:36:47.669Z (3 months ago)
- Language: JavaScript
- Size: 163 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fe test task widget
> External widget component for [`EasySize/fe_test_task`](https://github.com/EasySize/fe_test_task).
### Setup
```bash
# clone repo
$ git clone https://github.com/frenchbread/fe_test_task_widget.git && cd fe_test_task_widget# install dependencies
$ yarn
# - or -
$ npm install# start the server
$ yarn run start
# - or -
$ npm run start
```### [EasySize/fe_test_task](https://github.com/EasySize) configuration
1. In separate ternimal tab/window clone project repo, install dependencies.
```bash
# clone repo
$ git clone https://github.com/EasySize/fe_test_task.git && cd fe_test_task# install dependencies
$ yarn
# - or -
$ npm install
```2. Add the following widget configuration to `script.js` file (or modify if it already exists)
```js
// ...let configuration = {
attributes: ['red', 'blue', 'black'],
placeholder: '.product-color',
placeholder_text: 'Surprise me with the color'
}let widget = Widget(configuration)
setTimeout(widget.start, 2000)
```3. Start the server
```bash
# start the server
$ yarn run serve
# - or -
$ npm run serve
```### Testing
While [`EasySize/fe_test_task`](https://github.com/EasySize) server is up and running open [`http://127.0.0.1:3333`](http://127.0.0.1:3333) in your browser.
After loading, a button below "color selection" section should appear. Click it and follow steps in opened modal window.
### Tested in follwing dev environment
```
node v15.0.0
npm v7.0.2
yarn 1.22.10
macOS Catalina v10.15.7
FireFox Developer Edition v85.0b5 (64-bit)
```### License
[MIT](https://github.com/frenchbread/fe_test_task_widget/blob/main/LICENSE)