0

I'm creating a new programming language specific to our use cases. And I'm looking for an already available package manager I can reuse for dependency management of my language. I plan to use npm as the package manager because it's quite popular and easy to use.

For example, a package containing the new language might look like:

pkgA/ helloworld.me # my language package.json 

And with dependencies installed:

pkgA/ node_modules/ pkgB/ hithere.me package.json helloworld.me package.json package-lock.json 

In the code, language and its compiler will have its own way to resolve references.

# helloworld.me > "hello world" 

using dependency

# helloworld.me import pkgB.hithere > "hello world" < hithere 

I have been exploring answers to the following questions. It would be great and very helpful if you have already done something similar.

  1. Can npm be used with any other language?
  2. Is this a good or bad idea?
  3. Are there any restrictions npm platform might have?
  4. Are there any other package managers specifically designed as language agnostic? or do i have to build my own PM?

1 Answer 1

1

After more research, I found this post - Can I distribute non javascript files via npm?

Based on the terms, it looks like using npm for other incompatible languages is not allowed.

Packages that are not functionally compatible with the npm command-line client. For example, a "package" cannot simply be a PNG or JPEG image, a movie file, or a text document uploaded directly to the registry. Using the Public Registry as a general purpose database is not allowed.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.