New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mappable-world/mappable-cli

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mappable-world/mappable-cli - npm Package Compare versions

Comparing version 0.0.4 to 0.0.6

3

dist/index.js

@@ -47,3 +47,4 @@ #!/usr/bin/env node

PACKAGE_VERSION: '0.0.1-beta.1',
PACKAGE_NAME: packageName
PACKAGE_NAME: packageName,
PACKAGE_NAME_ENC: encodeURIComponent(packageName),
};

@@ -50,0 +51,0 @@ copyTemplateFiles(TEMPLATE_DIR, TARGET, true, macros);

{
"name": "@mappable-world/mappable-cli",
"version": "0.0.4",
"version": "0.0.6",
"description": "Library for encapsulating the logic of autotests and building packages mappable.world js API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -7,3 +7,3 @@ # %PACKAGE_NAME% package

[![npm version](https://badge.fury.io/js/%PACKAGE_NAME%.svg)](https://badge.fury.io/js/%PACKAGE_NAME%)
[![npm version](https://badge.fury.io/js/%PACKAGE_NAME_ENC%.svg)](https://badge.fury.io/js/%PACKAGE_NAME%)
[![npm](https://img.shields.io/npm/dm/%PACKAGE_NAME%.svg)](https://www.npmjs.com/package/%PACKAGE_NAME%)

@@ -19,18 +19,41 @@

to use Mappable JS Module you need to add your module loading handler to JS API
Recommended use `MMapEntityTileLoader` as usual npm package:
```sh
npm i %PACKAGE_NAME%
```
and dynamic import
```js
const {MMapEntityTileLoader} = await import('%PACKAGE_NAME%/dist/esm/index');
```
But you can use CDN with module loading handler in JS API:
### Development
```js
mappable.import.loaders.unshift(async (pkg) => {
if (!pkg.includes('%PACKAGE_NAME%')) {
if (!pkg.startsWith('%PACKAGE_NAME%')) {
return;
}
if (location.href.includes('localhost')) {
await mappable.import.script(`/dist/index.js`);
} else {
// You can use another CDN
await mappable.import.script(`https://unpkg.com/${pkg}/dist/index.js`);
await mappable.import.script(`./node_modules/%PACKAGE_NAME%/dist/index.js`);
return window[`${pkg}`];
});
```
### Production
```js
mappable.import.loaders.unshift(async (pkg) => {
if (!pkg.includes('%PACKAGE_NAME%')) {
return;
}
Object.assign(mappable, window[`${pkg}`]);
// You can use another CDN
await mappable.import.script(`https://unpkg.com/${pkg}/dist/index.js`);
return window[`${pkg}`];

@@ -37,0 +60,0 @@ });

@@ -24,2 +24,9 @@ const path = require('path');

}
},
'index.umd': {
import: './src/index.ts',
library: {
name,
type: 'umd'
}
}

@@ -26,0 +33,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc