acorn-dynamic-import

WebJar for acorn-dynamic-import

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

acorn-dynamic-import
Last Version

Last Version

4.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

acorn-dynamic-import
WebJar for acorn-dynamic-import
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/kesne/acorn-dynamic-import

Download acorn-dynamic-import

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Dynamic import support in acorn

This is plugin for Acorn - a tiny, fast JavaScript parser, written completely in JavaScript.

For more information, check out the proposal repo.

Usage

Importing this module gives you a plugin that can be used to extend an Acorn parser:

import Parser from 'acorn';
import dynamicImport from 'acorn-dynamic-import';

Parser.extend(dynamicImport).parse('import("something");');

To extend the AST walker for dynamic imports, you can injecting the new node type into acorn-walk like this:

import inject from 'acorn-dynamic-import/lib/walk';
import * as acornWalk from 'acorn-walk';

const walk = inject(acornWalk);

License

This plugin is issued under the MIT license.

Versions

Version
4.0.0
3.0.0
2.0.2
2.0.1