Skip to content

Commit

Permalink
Prepare for publish v1.6.0; First publish @nfreear/my-map (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Oct 28, 2023
1 parent b00866b commit 6a98141
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .gitignore
@@ -1,3 +1,4 @@
lerna.json

packages/**/example
packages/**/My*.js
Expand All @@ -11,6 +12,7 @@ plugins
out

MyEditorElement.js
MyAnimat*Element.js
template.html

# CustomElementParser.js
Expand Down Expand Up @@ -38,7 +40,6 @@ my-no-co*
MyNoCo*
demo/my-user*

*.mjs
/*.html
*2.html
*test*.html
Expand All @@ -50,7 +51,7 @@ when-do
Untitled

*BAK*
*COPY*
# *COPY*
.env
.DS_Store
node_modules
28 changes: 28 additions & 0 deletions .npmignore
@@ -0,0 +1,28 @@

lerna.json
_config.yml
.github
demo
scripts
packages
src/build/*
src/leaflet*
src/plugins/*
out/*
.DS_Store
# feed.json
jsdoc-conf.json
MyEditorElement.js
MyAnimat*Element.js
template.html

_BAK*
_tests*
_old*
when-do
what-the-flow

# !custom.js
# !index.js
# !src/*
# !src/**/*
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -4,14 +4,14 @@

# My Elements #

A collection of experimental custom elements (Web Components).
A collection of useful custom elements (Web Components).

* [nfreear.github.io/elements/demo][demo]
* [codepen.io/collection/mrpzOQ][pen]

## Rationale ##

* Experimental, particularly `<my-page>`, `<my-nav>` which are probably not for production !!
* Some experimental, particularly `<my-page>`, `<my-nav>` which are probably not for production !!
* Should be usable without (or with) a build system, minimalist,
* Accessible and usable for end-users - use WAI-ARIA where appropriate!
* Simple for developers to try out,
Expand Down
2 changes: 1 addition & 1 deletion my.js
@@ -1,7 +1,7 @@
/**
* Import custom elements via a `my.js?use=my-elem,..` URL parameter.
*
* @example <script src="my.js?use=my-map,my-..." type="module"></script>
* @example <script src="path/to/my.js?use=my-map,my-..." type="module"></script>
* @license MIT
*/

Expand Down
8 changes: 5 additions & 3 deletions package.json
@@ -1,8 +1,8 @@
{
"name": "ndf-elements",
"x-old-name": "ndf-web-components",
"version": "1.5.0",
"description": "A collection of custom elements | Was: 'ndf-web-components'",
"version": "1.6.0",
"description": "A collection of useful custom elements.",
"x-copyright": "© 2021 Nick Freear.",
"author": "Nick Freear",
"license": "MIT",
Expand All @@ -20,7 +20,7 @@
"./custom": {
"import": "./custom.js"
},
"my": {
"./my": {
"import": "./my.js"
},
"./my-map": {
Expand All @@ -33,6 +33,8 @@
"build:feed": "node ./src/build/feed.js > ./src/feed.json",
"build:template": "node ./src/build/template.js > ./src/template.html",
"copy": "node ./scripts/copy.mjs",
"dry": "npm publish --workspaces --access=public --dry-run",
"prepare": "npm run build && npm test # && npm run version",
"start": "npm run build:feed && npx servor --reload",
"inner:grep": "grep -rn '\\.innerHTML' src",
"inner:count": "grep -r '\\.innerHTML =' src | wc -l",
Expand Down
31 changes: 26 additions & 5 deletions packages/my-map/README.md
Expand Up @@ -8,12 +8,15 @@
Easily embed a map powered by [Leaflet][]. Includes [accessibility][myp] and [translation][myp] Leaflet plugins.

* [nfreear.github.io/elements/demo][demo]
* Demo on [CodePen][]

## Usage

Available on the [Unpkg][] CDN:

```html
<script src="https://unpkg.com/@nfreear/my-map@1" type="module"></script>

<my-map
latlng="51.505,-0.09"
zoom="13"
Expand All @@ -23,22 +26,40 @@ Available on the [Unpkg][] CDN:

<p> My map description ... </p>
</my-map>
```

<script src="https://unpkg.com/my-map@1" type="module" ></script>
<!--
```
<custom-element-demo>
<template>
<script src="https://unpkg.com/@nfreear/my-map@1" type="module"></script>
<my-map latlng="51.505,-0.09" zoom="13">
<marker latlng="51.505, -0.09" hidden>Hello, I'm a popup!</marker>
<p> My map description ... </p>
</my-map>
</template>
</custom-element-demo>
```
-->


## License

License: [MIT][].
* License: [MIT][].

[ci]: https://github.com/nfreear/elements/actions/workflows/node.js.yml
[ci-img]: https://github.com/nfreear/elements/actions/workflows/node.js.yml/badge.svg
[leaflet-img]: https://img.shields.io/badge/leaflet-1.9.4-green.svg?style=flat
[codepen]: https://codepen.io/nfreear/pen/KKeJKov
[demo]: https://nfreear.github.io/elements/demo/
[mit]: https://github.com/nfreear/elements/blob/main/LICENSE.txt
[npm]: https://www.npmjs.com/package/my-map
[npm-img]: https://img.shields.io/npm/v/my-map
[npm]: https://www.npmjs.com/package/@nfreear/my-map
[npm-img]: https://img.shields.io/npm/v/%40nfreear/my-map
[unpkg]: https://unpkg.com
"A fast, global content delivery network for everything on npm"
[up-cdn]: https://unpkg.com/my-map@1.1.0/index.js
[up-cdn]: https://unpkg.com/@nfreear/my-map@1/index.js
[skypack]: https://cdn.skypack.dev
"A JavaScript Delivery Network for modern web apps"
[leaflet]: https://leafletjs.com/
Expand Down
7 changes: 2 additions & 5 deletions packages/my-map/package.json
@@ -1,7 +1,7 @@
{
"name": "my-map",
"name": "@nfreear/my-map",
"description": "Easily embed a map powered by Leaflet.",
"version": "1.5.1",
"version": "1.6.0",
"type": "module",
"main": "index.js",
"module": "index.js",
Expand All @@ -12,9 +12,6 @@
"type": "git",
"url": "https://github.com/nfreear/elements.git"
},
"scripts": {
"start": "servor"
},
"keywords": [
"leaflet",
"leafletjs",
Expand Down
4 changes: 2 additions & 2 deletions scripts/copy.mjs
Expand Up @@ -11,8 +11,8 @@ const PACKAGES = [
paths: [
'src/MyElement.js',
'src/Options.js',
'src/components/MyMapElement.js',
'src/templates/my-map.tpl.html'
'src/components/MyMapElement.js'
// Deprecated: 'src/templates/my-map.tpl.html'
]
}
];
Expand Down

0 comments on commit 6a98141

Please sign in to comment.