rollup-plugin-rebase
Advanced tools
Comparing version 0.11.4 to 0.11.5
@@ -1,2 +0,2 @@ | ||
/*! rollup-plugin-rebase v0.11.4 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! rollup-plugin-rebase v0.11.5 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
'use strict'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! rollup-plugin-rebase v0.11.4 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! rollup-plugin-rebase v0.11.5 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
import nodentRuntime from 'nodent-runtime'; | ||
@@ -3,0 +3,0 @@ import path from 'path'; |
{ | ||
"name": "rollup-plugin-rebase", | ||
"version": "0.11.4", | ||
"version": "0.11.5", | ||
"description": "The Rollup Rebase Plugin copies static assets as required from your JavaScript code to the destination folder and adjusts the references in there to point to the new location.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -25,6 +25,6 @@ # Rollup Rebase <br/>[![Sponsored by][sponsor-img]][sponsor] [![Version][npm-version-img]][npm] [![Downloads][npm-downloads-img]][npm] [![Build Status Unix][travis-img]][travis] [![Build Status Windows][appveyor-img]][appveyor] [![Dependencies][deps-img]][deps] | ||
- Adjust asset references in the output JavaScript files to map to the relative new location. | ||
- Transforms CSS files to inline all includes from `@import` via [PostCSS Smart Import](https://github.com/sebastian-software/postcss-smart-import) into the origin files. | ||
- Renames all assets based on their hash (SHA256 + Base62) so that conflicts are automatically eliminated while producing a flat zero depth output structure. | ||
- Transforms CSS files to inline all includes from `@import` via [PostCSS Import](https://github.com/postcss/postcss-import) into the origin files. | ||
- Renames all assets based on their hash (XXHash + Base62) so that conflicts are automatically eliminated while producing a flat output structure. | ||
- Supports *normal* CSS, but also [SugarSS](https://github.com/postcss/sugarss), [SCSS](https://github.com/postcss/postcss-scss) and [Sass](https://github.com/aleshaoleg/postcss-sass) via the standard PostCSS parser plugins. | ||
- Processes all files which do not match this extension list: `.jsx`, `.js`, `.tsx`, `.ts`, `.json`, `.vue`. | ||
- Processes all files which do not match this extension list: `.jsx`, `.js`, `.tsx`, `.ts`, `.json`. | ||
@@ -47,8 +47,10 @@ | ||
Rollup rebase comes with a binary which can be called from within your `scripts` section | ||
Rollup Rebase comes with a binary which can be called from within your `scripts` section | ||
in the `package.json` file. | ||
```js | ||
import { rollup } from "rollup" | ||
import rebasePlugin from "rollup-plugin-rebase" | ||
const input = "./src/index.js" | ||
const outputFolder = "./lib"; | ||
@@ -58,8 +60,5 @@ const rebase = rebasePlugin({ outputFolder }) | ||
rollup({ | ||
entry: entry, | ||
... | ||
input: input, | ||
external: rebase.isExternal, | ||
... | ||
plugins: [ | ||
... | ||
rebase | ||
@@ -70,3 +69,2 @@ ] | ||
bundle.write({ | ||
... | ||
dest: `${outputFolder}/index.js` | ||
@@ -73,0 +71,0 @@ }) |
587702
78