# grunt-resource-publish

> Html resource auto concat and replace

Latest version **0.1.5** (published 2015-11-27) · 0 weekly downloads

## Install

```sh
npm install grunt-resource-publish
pnpm add grunt-resource-publish
yarn add grunt-resource-publish
bun add grunt-resource-publish
```

## 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.1.5 |
| Published | 2015-11-27 |
| First published | 2015-07-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+7 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | ThomasJ |
| Maintainers | thomasjang |
| Keywords | gruntplugin |

## Links

- npm: https://www.npmjs.com/package/grunt-resource-publish
- Repository: https://github.com/thomasJang/grunt-resource-publish
- Issues: https://github.com/thomasJang/grunt-resource-publish/issues
- npm.io page: https://npm.io/package/grunt-resource-publish

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ^1.1.0
- [lodash](https://npm.io/package/lodash.md) ^3.10.0
- [maxmin](https://npm.io/package/maxmin.md) ^1.1.0
- [uri-path](https://npm.io/package/uri-path.md) ^0.0.2
- [clean-css](https://npm.io/package/clean-css.md) ^3.0.0
- [uglify-js](https://npm.io/package/uglify-js.md) ^2.0.0

## Recent versions

- 0.1.5 (latest) — 2015-11-27
- 0.1.3 — 2015-11-16
- 0.1.2 — 2015-07-21
- 0.1.1 — 2015-07-21
- 0.1.0 — 2015-07-21

## README

# grunt-resource-publish

> The best Grunt plugin ever.

## Getting Started
This plugin requires Grunt `~0.4.5`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-resource-publish --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-resource-publish');
```

## The "resource_publish" task

### Overview
In your project's Gruntfile, add a section named `resource_publish` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
	resource_publish: {
		run: {
			options: {
				detect: {
					js: true,
					css: false
				},
				app_root: "절대경로를 사용하는 페이지인 경우."
			},
			files: [
				{
					src: 'test/target/**/*.html',
					resource_dest: "test/target/__",
					resource_dest_label: "/static/__" // replace로 표현할 경로 라벨
				}
			]
		}
	}
});
```

```html
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">

	<link rel="stylesheet" type="text/css" href="css/app.css" />
	<script type="text/javascript" src="js/app.js"></script>
	<script type="text/javascript" src="js/app12.js"></script>

	<title></title>
</head>
<body>

</body>
</html>
```

#### run resource_publish

```html
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">

	<link rel="stylesheet" type="text/css" href="css/app.css" />
	<script type="text/javascript" src="test/target/__/res_000.20150621191250.js" data-min="true"></script>
	

	<title></title>
</head>
<body>

</body>
</html>
```


## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
_(Nothing yet)_

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