rollup-plugin-rebase
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -14,7 +14,7 @@ import fs from "fs-extra" | ||
function bundle(entry, output) { | ||
var plugin = rebasePlugin({ outputFolder, entry, verbose: true }) | ||
function bundle(input, outputFile) { | ||
var plugin = rebasePlugin({ outputFolder, input, verbose: true }) | ||
return rollup({ | ||
entry, | ||
input, | ||
external: plugin.isExternal, | ||
@@ -25,3 +25,3 @@ plugins: [ plugin ] | ||
format: "es", | ||
dest: output | ||
file: outputFile | ||
}) | ||
@@ -28,0 +28,0 @@ ) |
@@ -1,2 +0,2 @@ | ||
/*! rollup-plugin-rebase v0.8.0 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! rollup-plugin-rebase v0.9.0 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
'use strict'; | ||
@@ -32,2 +32,3 @@ | ||
/* eslint-disable max-params */ | ||
function processStyle(code, id, dest) { | ||
@@ -63,3 +64,3 @@ var parser = styleParser[path.extname(id)]; | ||
exclude = _options$exclude === undefined ? defaultExclude : _options$exclude, | ||
entry = options.entry, | ||
input = options.input, | ||
outputFolder = options.outputFolder, | ||
@@ -93,6 +94,6 @@ verbose = options.verbose; | ||
var input = fs.createReadStream(id); | ||
var inputStream = fs.createReadStream(id); | ||
return new Promise(function (resolve, reject) { | ||
input.on("readable", function () { | ||
return new Promise(function (resolve) { | ||
inputStream.on("readable", function () { | ||
var fileSource = id; | ||
@@ -111,4 +112,4 @@ var fileContent = fs.readFileSync(fileSource); | ||
var entryFolder = path.dirname(path.resolve(entry)); | ||
var relativeToRoot = path.relative(path.dirname(fileSource), entryFolder).replace(/\\/g, "/"); | ||
var inputFolder = path.dirname(path.resolve(input)); | ||
var relativeToRoot = path.relative(path.dirname(fileSource), inputFolder).replace(/\\/g, "/"); | ||
@@ -115,0 +116,0 @@ // Adjust destId so that it points to the root folder - from any |
@@ -1,2 +0,2 @@ | ||
/*! rollup-plugin-rebase v0.8.0 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! rollup-plugin-rebase v0.9.0 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
import path from 'path'; | ||
@@ -28,2 +28,3 @@ import denodeify from 'denodeify'; | ||
/* eslint-disable max-params */ | ||
function processStyle(code, id, dest) { | ||
@@ -59,3 +60,3 @@ var parser = styleParser[path.extname(id)]; | ||
exclude = _options$exclude === undefined ? defaultExclude : _options$exclude, | ||
entry = options.entry, | ||
input = options.input, | ||
outputFolder = options.outputFolder, | ||
@@ -89,6 +90,6 @@ verbose = options.verbose; | ||
var input = fs.createReadStream(id); | ||
var inputStream = fs.createReadStream(id); | ||
return new Promise(function (resolve, reject) { | ||
input.on("readable", function () { | ||
return new Promise(function (resolve) { | ||
inputStream.on("readable", function () { | ||
var fileSource = id; | ||
@@ -107,4 +108,4 @@ var fileContent = fs.readFileSync(fileSource); | ||
var entryFolder = path.dirname(path.resolve(entry)); | ||
var relativeToRoot = path.relative(path.dirname(fileSource), entryFolder).replace(/\\/g, "/"); | ||
var inputFolder = path.dirname(path.resolve(input)); | ||
var relativeToRoot = path.relative(path.dirname(fileSource), inputFolder).replace(/\\/g, "/"); | ||
@@ -111,0 +112,0 @@ // Adjust destId so that it points to the root folder - from any |
{ | ||
"name": "rollup-plugin-rebase", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"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.", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
}, | ||
"license": "MIT", | ||
"license": "Apache-2.0", | ||
"main": "lib/node.commonjs.js", | ||
@@ -49,3 +49,3 @@ "module": "lib/node.esmodule.js", | ||
"loader-utils": "^1.1.0", | ||
"postcss": "^6.0.9", | ||
"postcss": "^6.0.10", | ||
"postcss-import": "^10.0.0", | ||
@@ -59,10 +59,10 @@ "postcss-sass": "^0.2.0", | ||
"devDependencies": { | ||
"babel-core": "^6.25.0", | ||
"babel-core": "^6.26.0", | ||
"babel-preset-latest": "^6.24.1", | ||
"jest": "^20.0.4", | ||
"prepublish": "^1.2.7", | ||
"readable-code": "^3.4.11", | ||
"rollup": "^0.47.4", | ||
"prepublish": "^1.3.0", | ||
"readable-code": "^3.4.12", | ||
"rollup": "^0.49.0", | ||
"shortid": "^2.2.8" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
759946
2710
14035
Updatedpostcss@^6.0.10