# import

> Concatenate files together using import statements.

Latest version **0.0.6** (published 2014-05-16) · 0 weekly downloads

## Install

```sh
npm install import
pnpm add import
yarn add import
bun add import
```

Provides the command `import`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2014-05-16 |
| First published | 2014-04-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hiroki Osame |
| Maintainers | hirokiosame |
| Keywords | import, module, es6 |

## Links

- npm: https://www.npmjs.com/package/import
- Repository: https://github.com/hirokiosame/import
- Issues: https://github.com/hirokiosame/import/issues
- npm.io page: https://npm.io/package/import

## Dependencies (1)

- [optimist](https://npm.io/package/optimist.md) 0.3.x

## Recent versions

- 0.0.6 (latest) — 2014-05-16
- 0.0.5 — 2014-04-23
- 0.0.4 — 2014-04-23
- 0.0.2 — 2014-04-21

## README

# Import

Temporary solution to inline importing front-end Javascript for modular development.

Has tabulation support.
More lightweight than [smash](https://github.com/mbostock/smash).
Removed automatically importing 'index.js'.

## Installation
```npm install import -g```

## How to Use
foo.js
```
function foo(){
	return "foo";
}
```

bar.js
```
function bar(){
	console.log("bar");
}
```

baz.js
```
import "foo";

function baz(){
	console.log(foo());
	return import "bar";
}
baz()();
```

***

See final output
```
$ import test/data1/baz.js
function foo(){
	return "foo";
}

function baz(){
	console.log(foo());
	return function bar(){
		console.log("bar");
	}
}
baz()();
```

or Create an output file
```
$ import test/data1/baz.js > test/data1/out.js
```

or Execute in Node
```
$ import test/data1/baz.js | node
foo
bar
```

---
_Source: https://npm.io/package/import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
