# inject-files-cli

---

### usage

#### global

```
$ npm install inject-files-cli --global

$ inject-files-cli source/index.html build/index.html
```

#### as a dev-dependency

##### install
```
$ npm install inject-files-cli --save-dev
```
##### in package.json
```js
{
  ...
  "scripts": {
		"inject": "inject-files-cli source/index.html build/index.html"
	},
  ...
}
```
##### run the npm-script
```
$ npm run inject
```

---

### CLI

inject-files-cli input output [timer];

#### input
Type: `string`

name of input file, including relative-path and extension

#### output
Type: `string`

name of output file, including relative-path and extension

#### timer
Type: `boolean`

log the time (ms) taken to inject files

---

### insert markers

Just insert a `<<marker>>` in your code

#### in your HTML

```html
<head>
	<title>example</title>
	<style>
<<styles/style.css>>
	</style>
</head>
<body>
	<p>hello world</p>
	<script>
<<scripts/script.js>>
	</script>
</body>
```

#### in your CSS

```css
element {
	style: beautiful-styles;
}

<<more-styles.css>>
```

#### in your JavaScript

```js
function greeter() {
	console.log('Hello World');
}

<<more-functions.js>>
```

---

### related

**inject-files** - API for this module

GitHub: [inject-files](https://github.com/patrickneugebauer/inject-files)

npm: [inject-files](https://www.npmjs.com/package/inject-files)

**inject-dev-server** - dev server using the inject-files API

GitHub: [inject-dev-server](https://github.com/patrickneugebauer/inject-dev-server)

npm: [inject-dev-server](https://www.npmjs.com/package/inject-dev-server)
