Skip to content

Map imports and advanced imports like Deno for MetaCall #63

Open
@viferga

Description

@viferga

Recently @trgwii suggested the following addition for metacall.json:

{
  ...
  "imports": {
    "ramda": "https://raw.githubusercontent.com/ramda/ramda/v0.27.1/dist/ramda.min.js"
  }
}

And then do in Python (or any other language):

import ramda

An extension to the previous mechanism may be the following:

{
  "imports": {
    "ramda": "npm:ramda",
    "telethon": "pip3:telethon"
  }
}

Python is the language that would need import maps in order to implement this kind of imports. Other languages like Ruby or NodeJS may allow to do this easily like:

require 'https://raw.githubusercontent.com/ramda/ramda/v0.27.1/dist/ramda.min.js'
const R = require('https://raw.githubusercontent.com/ramda/ramda/v0.27.1/dist/ramda.min.js');

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions