Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to allow npm publication and unpkg content delivery. #500

Merged
merged 7 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function(grunt) {
// ensure that jshint keeps processing after an error
force: true,
esversion: 6

}
},
watch: {
Expand All @@ -47,47 +47,47 @@ module.exports = function(grunt) {
expand: true,
cwd: 'node_modules/leaflet/dist/',
flatten: true,
filter: 'isFile',
src: ['leaflet.css','leaflet-src.js'],
filter: 'isFile',
src: ['leaflet.css','leaflet-src.js'],
dest: 'dist/'
},
{
expand: true,
cwd: 'node_modules/proj4/dist/',
flatten: true,
filter: 'isFile',
src: ['proj4-src.js'],
filter: 'isFile',
src: ['proj4-src.js'],
dest: 'dist/'
},
{
expand: true,
cwd: 'node_modules/proj4leaflet/src/',
flatten: true,
filter: 'isFile',
src: ['proj4leaflet.js'],
filter: 'isFile',
src: ['proj4leaflet.js'],
dest: 'dist/'
},
{
expand: true,
cwd: 'node_modules/@runette/leaflet-fullscreen/dist/',
flatten: true,
filter: 'isFile',
src: ['Leaflet.fullscreen.js','leaflet.fullscreen.css'],
filter: 'isFile',
src: ['Leaflet.fullscreen.js','leaflet.fullscreen.css'],
dest: 'dist/'
},
{
expand: true,
cwd: 'src',
flatten: true,
filter: 'isFile',
src: ['*.js','*.css','*.md','index.html','package.json'],
filter: 'isFile',
src: ['*.js','*.css','*.md','index.html','package.json'],
dest: 'dist/'
},
{
expand: true,
flatten: true,
filter: 'isFile',
src: ['*.md','index.html','package.json'],
filter: 'isFile',
src: ['index.html'],
dest: 'dist/'
}
],
Expand Down Expand Up @@ -128,7 +128,7 @@ module.exports = function(grunt) {
}
}
},
images: {
images: {
// if you pass images through the process function, it corrupts them,
// so you have to do this in a separate grunt 'target' ('main' being the
// default one, I believe).
Expand All @@ -137,8 +137,8 @@ module.exports = function(grunt) {
expand: true,
cwd: 'node_modules/leaflet/dist/images/',
flatten: true,
filter: 'isFile',
src: ['layers.png','layers-2x.png'],
filter: 'isFile',
src: ['layers.png','layers-2x.png'],
dest: 'dist/images/'
}
]
Expand Down Expand Up @@ -175,4 +175,4 @@ module.exports = function(grunt) {
grunt.registerTask('default', ['clean:dist', 'copy', 'jshint', 'rollup', 'uglify']);
grunt.registerTask('build', ['rollup']);

};
};
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ The `<mapml-viewer>` custom element is a prototype implementation of the
defined in the MapML (Map Markup Language)
[specification](https://maps4html.org/MapML/spec/).

<!-- ## Installation -->
## Installation

Beginning with `v0.8.2`, &lt;mapml-viewer&gt; can be loaded from the [UNPKG content delivery network](https://unpkg.com/) –
```html
<script type="module" src="https://unpkg.com/@maps4html/web-map-custom-element@0.8.2/dist/mapml-viewer.js"></script>
```

– or installed using npm.
```bash
npm install @maps4html/web-map-custom-element
```

Note: `v0.8.X` npm releases are functionally equivalent to [standalone release`v0.8.0`](https://github.com/Maps4HTML/Web-Map-Custom-Element/releases/tag/v0.8.0).

## Usage

Expand Down
Loading