|
1 | | - <div align="center"> |
2 | | - <img align="center" width="230" src="https://i.imgur.com/pGGFGpi.png" /> |
3 | | - <h2>Javascript Library Boilerplate Basic</h2> |
4 | | - <blockquote>Minimal Library Starter Kit for your Javascript projects</blockquote> |
5 | | - |
6 | | - <a href="https://www.npmjs.com/package/@hodgef/js-library-boilerplate-basic"><img src="https://badgen.net/npm/v/@hodgef/js-library-boilerplate-basic?color=blue" alt="npm version"></a> <a href="https://github.com/hodgef/js-library-boilerplate-basic"><img src="https://img.shields.io/github/last-commit/hodgef/js-library-boilerplate-basic" alt="lastest commit"></a> <a href="https://github.com/hodgef/js-library-boilerplate-basic/actions"><img alt="Build Status" src="https://github.com/hodgef/js-library-boilerplate-basic/workflows/Build/badge.svg?color=green" /></a> <a href="https://github.com/hodgef/js-library-boilerplate-basic/actions"> <img alt="Publish Status" src="https://github.com/hodgef/js-library-boilerplate-basic/workflows/Publish/badge.svg?color=green" /></a> |
7 | | - |
8 | | -<strong>If you like TypeScript, check out [ts-library-boilerplate-basic](https://github.com/hodgef/ts-library-boilerplate-basic).</strong><br /> |
9 | | -<strong>Want a more robust (yet bulkier) alternative? Check out [js-library-boilerplate](https://github.com/hodgef/js-library-boilerplate).</strong><br /> |
10 | | -</div> |
| 1 | +# Gleap JavaScript Admin Helper |
11 | 2 |
|
12 | | -## ⭐️ Features |
| 3 | +A DOM element picker used by Gleap admin tools. It lets a user select a page element and returns a unique CSS selector through `onElementPicked`. |
13 | 4 |
|
14 | | -- Webpack 5 |
15 | | -- Babel 7 |
16 | | -- Hot reloading (`npm start`) |
17 | | -- UMD exports, so your library works everywhere. |
18 | | -- Jest unit testing |
19 | | -- Customizable file headers for your build [(Example 1)](https://github.com/hodgef/js-library-boilerplate-basic/blob/master/build/index.js) [(Example2)](https://github.com/hodgef/js-library-boilerplate-basic/blob/master/build/css/index.css) |
20 | | -- Daily [dependabot](https://dependabot.com) dependency updates |
| 5 | +The helper switches between `picker` and `navigate` modes. It excludes the Gleap admin overlay from selection. |
21 | 6 |
|
22 | | -## 📦 Getting Started |
| 7 | +For customer-facing live chat, in-app bug reporting and feedback, use the [Gleap JavaScript SDK](https://github.com/GleapSDK/JavaScript-SDK). |
23 | 8 |
|
24 | | -``` |
25 | | -git clone https://github.com/hodgef/js-library-boilerplate-basic.git GleapHelper |
26 | | -npm install |
27 | | -``` |
28 | | - |
29 | | -## 💎 Customization |
| 9 | +[Gleap](https://www.gleap.ai) · [JavaScript SDK documentation](https://docs.gleap.ai/documentation/javascript/README) |
30 | 10 |
|
31 | | -> Before shipping, make sure to: |
| 11 | +## Development |
32 | 12 |
|
33 | | -1. Edit `LICENSE` file |
34 | | -2. Edit `package.json` information (These will be used to generate the headers for your built files) |
35 | | -3. Edit `library: "GleapHelper"` with your library's export name in `./webpack.config.js` |
| 13 | +The package uses Webpack and Babel. Its source is in `src/lib/index.js`. |
36 | 14 |
|
37 | | -## 🚀 Deployment |
38 | | - |
39 | | -1. `npm publish` |
40 | | -2. Your users can include your library as usual |
41 | | - |
42 | | -### npm |
43 | | - |
44 | | -``` |
45 | | -import GleapHelper from 'my-library'; |
46 | | -const libraryInstance = new GleapHelper(); |
47 | | -... |
48 | | -``` |
49 | | - |
50 | | -### self-host/cdn |
51 | | - |
52 | | -``` |
53 | | -<script src="build/index.js"></script> |
54 | | -
|
55 | | -const GleapHelper = window.GleapHelper.default; |
56 | | -const libraryInstance = new GleapHelper(); |
57 | | -... |
| 15 | +```sh |
| 16 | +npm install |
| 17 | +npm run build |
58 | 18 | ``` |
59 | 19 |
|
60 | | -## ✅ Libraries built with this boilerplate |
61 | | - |
62 | | -> Made a library using this starter kit? Share it here by [submitting a pull request](https://github.com/hodgef/js-library-boilerplate-basic/pulls)! |
| 20 | +## Attribution and license |
63 | 21 |
|
64 | | -- [Canvas-Txt](https://github.com/geongeorge/Canvas-Txt) - A library to print multiline text on HTML5 canvas with better line breaks and alignments |
65 | | -- [moon-phase-widget](https://github.com/g00dv1n/moon-phase-widget) - Super tiny javascript library to add awesome moon phase widget to your website |
66 | | -- [simple-keyboard-autocorrect](https://github.com/hodgef/simple-keyboard-autocorrect) - Autocorrect module for simple-keyboard |
67 | | -- [simple-keyboard-input-mask](https://github.com/hodgef/simple-keyboard-input-mask) - Input mask module for simple-keyboard |
68 | | -- [simple-keyboard-key-navigation](https://github.com/hodgef/simple-keyboard-key-navigation) - Key navigation module for simple-keyboard |
69 | | -- [swipe-keyboard](https://github.com/hodgef/swipe-keyboard) - Swype type keyboard module for simple-keyboard |
| 22 | +The build setup originated from Francisco Hodge's [JavaScript Library Boilerplate Basic](https://github.com/hodgef/js-library-boilerplate-basic). See [LICENSE](LICENSE) for the retained MIT license and copyright notice. |
0 commit comments