Warm tip: This article is reproduced from serverfault.com, please click

Is NPM only for Open Source?

发布于 2021-08-07 06:09:35

I am using vuepress in order to make my static site so is their any risk that anyone else can see my site source as my site is not open-source and I am using NPM so I want to ask a question that will my vuepress package will be published openly? as it's really important to me and I don't want to reveal the source of my site.

Questioner
I'm Beginner
Viewed
0
kup 2021-08-07 14:47:06

About Is their any risk that anyone else can see my site source

There is no way to protect javascript intended to run in a browser from a determined viewer. If the browser can run it, then any determined viewer can view/run it also.

About NPM:

npm is a package manager for the JavaScript programming language maintained by npm, Inc. npm is the default package manager for the JavaScript runtime environment Node.js.

The npm registry contains packages, many of which are also Node modules, or contain Node modules.

npm has two types of packages,

one is public which everyone can see while the other is, private package which others can't see.

So if you fear that people will see the source code in your package, just make it private or just don't put your code on npm at all.