|
1 |
| -<div align="center"> |
2 |
| - <h1> |
3 |
| - React Extension Boilerplate |
4 |
| - </h1> |
| 1 | +# React Extension Boilerplate |
5 | 2 |
|
6 |
| - <p> |
7 |
| - <strong>Works for Chrome, Opera, Edge & Firefox.</strong> |
8 |
| - </p> |
9 |
| -</div> |
| 3 | +Works for Chrome, Opera, Edge & Firefox. |
10 | 4 |
|
11 |
| -## Features |
12 |
| - |
13 |
| -<dl> |
14 |
| - <dt>Write in your favourite framework - React! :) </dt> |
15 |
| - <dd> |
16 |
| - Now you can create part of your exstensions in React framework - as you wish ;) |
17 |
| - </dd> |
18 |
| -</dl> |
19 |
| - |
20 |
| -<dl> |
21 |
| - <dt>Write once and deploy to Chrome, Opera, Edge & Firefox</dt> |
22 |
| - <dd> |
23 |
| - Based on WebExtensions. It also includes a tiny polyfill to bring uniformity to the APIs exposed by different browsers. |
24 |
| - </dd> |
25 |
| -</dl> |
26 |
| - |
27 |
| -<dl> |
28 |
| - <dt>Live-reload</dt> |
29 |
| - <dd> |
30 |
| - Your changes to CSS, HTML & JS files will be relayed instantly without having to manually reload the extension. This ends up saving a lot of time and improving the developer experience. Based on https://github.com/xpl/crx-hotreload |
31 |
| - </dd> |
32 |
| -</dl> |
33 |
| - |
34 |
| -<dl> |
35 |
| - <dt>Newest js technology stack</dt> |
36 |
| - <dd> |
37 |
| - You can use ES6, ES5. |
38 |
| - </dd> |
39 |
| -</dl> |
40 |
| - |
41 |
| -<dl> |
42 |
| - <dt>Comfortable styles import</dt> |
43 |
| - <dd> |
44 |
| - With react you can loas styles directy and you can use scss for styling. |
45 |
| - </dd> |
46 |
| -</dl> |
47 |
| - |
48 |
| -<dl> |
49 |
| - <dt>Easily configurable and extendable</dt> |
50 |
| - <dd> |
51 |
| - Project use webpack so you can easly customize your project depends on your needs. In config.json you can define source path for each browser (if needed - default it's the same source), destintantion and develop directory. |
52 |
| - </dd> |
53 |
| -</dl> |
54 |
| - |
55 |
| -<dl> |
56 |
| - <dt>Clean code</dt> |
57 |
| - <dd> |
58 |
| - Clean code is the best way for long term support for project. Boilerplate has fully configured eslint with airbnb styleguide. |
59 |
| - </dd> |
60 |
| -</dl> |
61 |
| - |
62 |
| -<dl> |
63 |
| - <dt>Test your components!</dt> |
64 |
| - <dd> |
65 |
| - Project use some library which support your testing proces. As test runner we use karma, as testing framework mocha. As support to assertion we use chai. |
66 |
| - </dd> |
67 |
| -</dl> |
| 5 | + |
68 | 6 |
|
69 |
| -## Installation |
70 |
| - |
71 |
| -1. Clone the repository `git clone https://github.com/WebExp0528/React-Extension-Boilderplate.git` |
72 |
| -2. Run `npm install` or `yarn install` |
73 |
| -3. Run `npm run build` or `yarn build` |
74 |
| - |
75 |
| -##### Load the extension in Chrome & Opera |
76 |
| - |
77 |
| -1. Open Chrome/Opera browser and navigate to chrome://extensions |
78 |
| -2. Select "Developer Mode" and then click "Load unpacked extension..." |
79 |
| -3. From the file browser, choose to `React-Extension-Boilderplate/dev/chrome` or (`React-Extension-Boilderplate/dev/opera`) |
80 |
| - |
81 |
| -##### Load the extension in Firefox |
82 |
| - |
83 |
| -1. Open Firefox browser and navigate to about:debugging |
84 |
| -2. Click "Load Temporary Add-on" and from the file browser, choose `React-Extension-Boilderplate/dev/firefox` |
85 |
| - |
86 |
| -##### Load the extension in Edge |
| 7 | +## Features |
87 | 8 |
|
88 |
| -https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/adding-and-removing-extensions |
| 9 | +>- ___Write in your favorite framework - React! :)___ |
| 10 | +> |
| 11 | +> Now you can create part of your extensions in React framework - as you wish ;) |
| 12 | +> |
| 13 | +>- ___Write once and deploy to Chrome, Opera, Edge & Firefox___ |
| 14 | +> |
| 15 | +> Based on WebExtensions. It also includes a tiny polyfill to bring uniformity |
| 16 | +> to the APIs exposed by different browsers. |
| 17 | +> |
| 18 | +>- ___Live-reload___ |
| 19 | +> |
| 20 | +> Your changes to CSS, HTML & JS files will be relayed instantly without having |
| 21 | +> to manually reload the extension. This ends up saving a lot of time and |
| 22 | +> improving the developer experience. Based on <https://github.com/xpl/crx-hotreload> |
| 23 | +> |
| 24 | +>- ___Newest js technology stack___ |
| 25 | +> |
| 26 | +> You can use ES6, ES5. |
| 27 | +> |
| 28 | +>- ___Comfortable styles import___ |
| 29 | +> |
| 30 | +> With react you can load styles directly and you can use scss for styling. |
| 31 | +> |
| 32 | +>- ___Easily configurable and extendable___ |
| 33 | +> |
| 34 | +> Project use webpack so you can easily customize your project depends on your needs. |
| 35 | +> In config.json you can define source path for each browser |
| 36 | +> (if needed - default it's the same source), destination and develop directory. |
| 37 | +> |
| 38 | +>- ___Clean code___ |
| 39 | +> |
| 40 | +> Clean code is the best way for long term support for project. Boilerplate has |
| 41 | +> fully configured eslint with airbnb style guide. |
| 42 | +> |
| 43 | +>- ___Test your components!___ |
| 44 | +> |
| 45 | +> Project use some library which support your testing process. |
| 46 | +> As test runner we use karma, as testing framework mocha. |
| 47 | +> As support to assertion we use chai. |
| 48 | +
|
| 49 | +## Run & Installation |
| 50 | + |
| 51 | +>### Run & Build |
| 52 | +> |
| 53 | +>> 1. Clone the repository `git clone https://github.com/WebExp0528/>React-Extension-Boilerplate.git` |
| 54 | +>> 2. Run `npm install` or `yarn install` |
| 55 | +>> 3. Run `npm run build` or `yarn build` |
| 56 | +> |
| 57 | +>### Load the extension in Chrome & Opera |
| 58 | +> |
| 59 | +>> 1. Open Chrome/Opera browser and navigate to chrome://extensions |
| 60 | +>> 2. Select "Developer Mode" and then click "Load unpacked extension..." |
| 61 | +>> 3. From the file browser, choose to `React-Extension-Boilerplate/dev/chrome` |
| 62 | +>> or > (`React-Extension-Boilerplate/dev/opera`) |
| 63 | +> |
| 64 | +>### Load the extension in Firefox |
| 65 | +> |
| 66 | +>>1. Open Firefox browser and navigate to about:debugging |
| 67 | +>>2. Click "Load Temporary Add-on" and from the file browser, choose >>`React-Extension-Boilerplate/dev/firefox` |
| 68 | +> |
| 69 | +>### Load the extension in Edge |
| 70 | +> |
| 71 | +>><https://docs.microsoft.com/en-us/microsoft-edge/extensions/guides/>adding-and-removing-extensions> |
89 | 72 |
|
90 | 73 | ## Developing
|
91 | 74 |
|
92 |
| -The following tasks can be used when you want to start developing the extension and want to enable live reload - |
93 |
| - |
94 |
| -- `npm run watch-dev` or `yarn watch-dev` |
| 75 | +>The following tasks can be used when you want to start developing the extension |
| 76 | +>and want to enable live reload - |
| 77 | +>`npm run watch-dev` or `yarn watch-dev` |
95 | 78 |
|
96 | 79 | ## Packaging
|
97 | 80 |
|
98 |
| -Run `npm run build` or `yarn build` to create a zipped, production-ready extension for each browser. You can then upload that to the appstore. |
| 81 | +>Run `npm run build` or `yarn build` to create a zipped, |
| 82 | +production-ready extension for each browser. |
| 83 | +You can then upload that to the app store. |
99 | 84 |
|
100 | 85 | ---
|
101 | 86 |
|
102 | 87 | This project is licensed under the MIT license.
|
103 | 88 |
|
104 |
| -If you have any questions or comments, please create a new issue. I'd be happy to hear your thoughts. |
| 89 | +If you have any questions or comments, please create a new issue. |
| 90 | +I'd be happy to hear your thoughts. |
0 commit comments