JVM-NPM::Rhino

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Лицензия

Лицензия

Группа

Группа

org.bsc
Идентификатор

Идентификатор

jvm-npm-rhino
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

JVM-NPM::Rhino
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Скачать jvm-npm-rhino

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.bsc/jvm-npm-rhino/ -->
<dependency>
    <groupId>org.bsc</groupId>
    <artifactId>jvm-npm-rhino</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.bsc/jvm-npm-rhino/
implementation 'org.bsc:jvm-npm-rhino:1.1.0'
// https://jarcasting.com/artifacts/org.bsc/jvm-npm-rhino/
implementation ("org.bsc:jvm-npm-rhino:1.1.0")
'org.bsc:jvm-npm-rhino:jar:1.1.0'
<dependency org="org.bsc" name="jvm-npm-rhino" rev="1.1.0">
  <artifact name="jvm-npm-rhino" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.bsc', module='jvm-npm-rhino', version='1.1.0')
)
libraryDependencies += "org.bsc" % "jvm-npm-rhino" % "1.1.0"
[org.bsc/jvm-npm-rhino "1.1.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.kohsuke.metainf-services : metainf-services Необязательный jar 1.7
org.mozilla : rhino Необязательный jar 1.7.7.1
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

jvm-npm

Support for NPM module loading in Javascript runtimes on the JVM.

Implementation is based on [http://nodejs.org/api/modules.html] and should be fully compatible. This, of course, does not include the full node.js API, so don't expect all of the standard NPM modules that depend on it to work.

If you are writing your own NPM modules in DynJS, Rhino or Nashorn, this should work just fine.

Note:

DynJS implementation is currently considered legacy, so it is suggested to use it with Rhino and/or Nashorn

Usage

Nashorn

To enable JVM-NPM for Nashorn in your project add dependency below

    <dependency>
        <groupId>org.bsc</groupId>
        <artifactId>jvm-npm-core</artifactId>
        <version>${jvmnpm.version}</version>
    </dependency>

and in your code load module

    final ScriptEngineManager manager = new ScriptEngineManager();
	
	final ScriptEngine service = manager.getEngineByName("nashorn");
	
	service.eval( "load('classpath:jvm-npm.js');");

Rhino

To enable JVM-NPM for Rhino in your project add dependencies below

    <dependency>
        <groupId>org.bsc</groupId>
        <artifactId>jvm-npm-core</artifactId>
        <version>${jvmnpm.version}</version>
    </dependency>
    
    <dependency>
        <groupId>org.bsc</groupId>
        <artifactId>jvm-npm-rhino</artifactId>
        <version>${jvmnpm.version}</version>
    </dependency>
    

and in your code load module

    final ScriptEngineManager manager = new ScriptEngineManager();
	
	final ScriptEngine service = manager.getEngineByName("rhino-npm");
	
	service.eval( "load('classpath:jvm-npm.js');");

JDK7

If you need run on JRE7 then include deps

    <dependency>
        <groupId>org.bsc</groupId>
        <artifactId>jvm-npm-core</artifactId>
        <version>${jvmnpm.version}</version>
    </dependency>
    
    <dependency>
        <groupId>org.bsc</groupId>
        <artifactId>jvm-npm-rhino</artifactId>
        <version>${jvmnpm.version}</version>
        <classifier>jdk7</classifier>
    </dependency>
    

Debug

set system property jvm-npm.debug at true

Версии библиотеки

Версия
1.1.0
1.0.0
0.3.1