From 33e155b7c33baea6bdff8591e20368bcd4f73558 Mon Sep 17 00:00:00 2001 From: Adrien Pinet Date: Sat, 24 Feb 2024 17:55:38 +0100 Subject: [PATCH] add CDN dedicated folder and make karma ES module compliant --- .gitignore | 1 + README.md | 26 +++++++++++++-------- build.cdn.js | 16 +++++++++++++ karma.conf.js => karma.conf.cjs | 4 ++-- package.json | 22 +++++++++--------- src/lit-line.ts | 6 ++--- src/timeshift.ts | 32 ++++++-------------------- test/dom-helper.ts | 30 +++++++------------------ test/lit-line.spec.ts | 32 ++++++++------------------ test/timeshift.spec.ts | 21 +++-------------- tsconfig.json | 40 +++++++++++++++------------------ 11 files changed, 95 insertions(+), 135 deletions(-) create mode 100644 build.cdn.js rename karma.conf.js => karma.conf.cjs (82%) diff --git a/.gitignore b/.gitignore index 63c7efb..f62f79c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store build dist +cdn node_modules # Logs diff --git a/README.md b/README.md index f36196c..2487dac 100644 --- a/README.md +++ b/README.md @@ -17,26 +17,34 @@ why? ## Installation -```bash -$ npm install lit-line +You can load our `lit-line` components via CDN: + +```html + ``` -or +or by installing it locally using package manager such as NPM: -```html - +```sh +npm i lit-line@latest ``` +Once installed, you only have to import the desired component and you are good to go. + +```js +import "lit-line"; +``` + +:::tip[About version management] +It is not recommended to use the `@latest` suffix, as a major release could break your application. Instead, use a fixed version such as `0.3.0`. +::: + ## quick start ```javascript