Display randomly positioned, non-overlapping, customized dots in your HTML.
npm install dotsy element
element that results in getting one of the following files from jsDelivr:
element using the recommended "dotsy.es2017-esm.min.js":
html
`
A
#### Using npm
This library has been published to npm. After opening a folder in VS Code, run in the terminal:
`
npm i dotsy
`
Verify that dotsy has been added to the node_modules folder. Then you can choose:
Using the CommonJS module (the .cjs file) in myFile.js:
`js
const dotsy = require('dotsy');
const settings = new dotsy.Settings();
`
Using the ESM module (the .mjs file) in myFile.js or myFile.ts:
`ts
import * as dotsy from 'dotsy';
const settings = new dotsy.Settings();
`
How to use this repo
Follow these steps to set up (and verify) a development environment for this repository:
1. Install Node.js, Git and VS Code.
2. Fork (or clone), checkout and then open the root folder of this repository in VS Code.
3. Open the VS Code Terminal and run:
npm ci
This loads all the devDependencies from the tree as specified in package-lock.json.
4. Compiling the library:
All of the following commands run some script as defined in package.json:
npm run strictcheck to do type checking, to check whether a successful compilation is possible.
npm run clean to run eslint (performing auto-fixes).
npm test to run all unit tests from the 'tests' folder.
npm run build creates a single-file library in different formats and language versions in the 'dist' folder. Note: the 'src' folder contains all the source code files.
5. Testing localhost:
For testing localhost with live reload from VS Code, you could install the VS Code extension Five Server. Then open '/localhost/index.html' in VS Code and click > Go Live in the bottom right corner of VS Code. The browser starts up automatically.
License
The Dotsy repository uses the most permissive licensing available. The "BSD Zero Clause License" (0BSD) allows for
commercial + non-commercial use, closed + open source, with + without modifications, etc. and is equivalent to licenses like:
- "MIT No Attribution License" (MIT-0).
- "The Unlicense" (Unlicense).
- "CC0" (CC0).
The "BSD Zero Clause License" (0BSD) does not have the condition
> (...), provided that the above copyright notice and this permission notice appear in all copies.
which is part of the "MIT License" (MIT) and its shorter equivalent "ISC License" (ISC). Apart from that they are all equivalent.
Ask or contribute
- ask questions about anything that is not clear or when you'd like help.
- share ideas or what you've made.
- report a bug.
- request an enhancement.
- open a pull request. (The command npm run clean` runs eslint.)