rollup-plugin-rebase
Advanced tools
Comparing version 0.12.2 to 1.0.0
@@ -1,2 +0,2 @@ | ||
/*! rollup-plugin-rebase v0.12.2 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! rollup-plugin-rebase v1.0.0 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
'use strict'; | ||
@@ -68,2 +68,3 @@ | ||
outputFolder = options.outputFolder, | ||
outputBase = options.outputBase, | ||
verbose = options.verbose, | ||
@@ -102,3 +103,3 @@ prependName = options.prependName; | ||
return new Promise(function ($return, $error) { | ||
var fileSource, fileExt, fileName, destId, fileHash, destFilename, fileDest, inputFolder, relativeToRoot, importId, fileContent; | ||
var fileSource, fileExt, fileName, destId, fileHash, destFilename, fileDest, inputFolder, relativeToRoot, relativeOutputPath, importId, fileContent; | ||
@@ -120,9 +121,16 @@ fileSource = id; | ||
relativeToRoot = path.relative(path.dirname(fileSource), inputFolder).replace(/\\/g, "/"); | ||
relativeOutputPath = path.relative(outputBase || outputFolder, outputFolder); | ||
if (relativeOutputPath) { | ||
relativeOutputPath += '/'; | ||
} | ||
// Adjust destId so that it points to the root folder - from any | ||
// depth we detected inside the original project structure. | ||
if (relativeToRoot.charAt(0) === ".") { | ||
importId = relativeToRoot + "/" + destFilename; | ||
importId = relativeToRoot + "/" + relativeOutputPath + destFilename; | ||
} else if (relativeToRoot === "") { | ||
importId = "./" + destFilename; | ||
importId = "./" + relativeOutputPath + destFilename; | ||
} else { | ||
importId = "./" + relativeToRoot + "/" + destFilename; | ||
importId = "./" + relativeToRoot + "/" + relativeOutputPath + destFilename; | ||
} | ||
@@ -129,0 +137,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! rollup-plugin-rebase v0.12.2 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
/*! rollup-plugin-rebase v1.0.0 by Sebastian Werner <s.werner@sebastian-software.de> */ | ||
import nodentRuntime from 'nodent-runtime'; | ||
@@ -64,2 +64,3 @@ import path from 'path'; | ||
outputFolder = options.outputFolder, | ||
outputBase = options.outputBase, | ||
verbose = options.verbose, | ||
@@ -98,3 +99,3 @@ prependName = options.prependName; | ||
return new Promise(function ($return, $error) { | ||
var fileSource, fileExt, fileName, destId, fileHash, destFilename, fileDest, inputFolder, relativeToRoot, importId, fileContent; | ||
var fileSource, fileExt, fileName, destId, fileHash, destFilename, fileDest, inputFolder, relativeToRoot, relativeOutputPath, importId, fileContent; | ||
@@ -116,9 +117,16 @@ fileSource = id; | ||
relativeToRoot = path.relative(path.dirname(fileSource), inputFolder).replace(/\\/g, "/"); | ||
relativeOutputPath = path.relative(outputBase || outputFolder, outputFolder); | ||
if (relativeOutputPath) { | ||
relativeOutputPath += '/'; | ||
} | ||
// Adjust destId so that it points to the root folder - from any | ||
// depth we detected inside the original project structure. | ||
if (relativeToRoot.charAt(0) === ".") { | ||
importId = relativeToRoot + "/" + destFilename; | ||
importId = relativeToRoot + "/" + relativeOutputPath + destFilename; | ||
} else if (relativeToRoot === "") { | ||
importId = "./" + destFilename; | ||
importId = "./" + relativeOutputPath + destFilename; | ||
} else { | ||
importId = "./" + relativeToRoot + "/" + destFilename; | ||
importId = "./" + relativeToRoot + "/" + relativeOutputPath + destFilename; | ||
} | ||
@@ -125,0 +133,0 @@ |
{ | ||
"name": "rollup-plugin-rebase", | ||
"version": "0.12.2", | ||
"version": "1.0.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.", | ||
@@ -48,10 +48,10 @@ "keywords": [ | ||
"dependencies": { | ||
"asset-hash": "^0.1.1", | ||
"asset-hash": "^1.0.3", | ||
"denodeify": "^1.2.1", | ||
"fs-extra": "^4.0.2", | ||
"nodent-runtime": "^3.0.4", | ||
"postcss": "^6.0.14", | ||
"fs-extra": "^5.0.0", | ||
"nodent-runtime": "^3.2.0", | ||
"postcss": "^6.0.16", | ||
"postcss-import": "^11.0.0", | ||
"postcss-sass": "^0.2.0", | ||
"postcss-scss": "^1.0.2", | ||
"postcss-sass": "^0.3.0", | ||
"postcss-scss": "^1.0.3", | ||
"postcss-smart-asset": "^0.5.1", | ||
@@ -62,9 +62,10 @@ "rollup-pluginutils": "^2.0.1", | ||
"devDependencies": { | ||
"babel-preset-edge": "^1.4.0", | ||
"eslint-config-readable": "^0.1.2", | ||
"jest": "^21.2.1", | ||
"babel-preset-edge": "^1.4.1", | ||
"eslint-config-readable": "^1.4.1", | ||
"jest": "^22.1.4", | ||
"prepublish": "^1.5.4", | ||
"release-it": "^6.1.1", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.52.0" | ||
"rollup": "^0.55.1" | ||
} | ||
} |
@@ -77,2 +77,3 @@ # 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] | ||
* outputFolder (required): The location that assets will be written to | ||
* outputBase: The main rollup output folder. Defaults to outputFolder if not set. | ||
* prependName: If true, generated filenames will be ORIGINALFILENAME_HASH instead of just HASH | ||
@@ -86,4 +87,4 @@ * verbose: If true, increases log level | ||
<img src="assets/sebastiansoftware.png" alt="Sebastian Software GmbH Logo" width="250" height="200"/> | ||
<img src="https://github.com/sebastian-software/sebastian-software-brand/blob/master/sebastiansoftware-en.svg" alt="Sebastian Software GmbH Logo" width="250" height="200"/> | ||
Copyright 2016-2017<br/>[Sebastian Software GmbH](http://www.sebastian-software.de) | ||
Copyright 2016-2018<br/>[Sebastian Software GmbH](http://www.sebastian-software.de) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
48205
284
1
89
7
+ Addedfs-extra@5.0.0(transitive)
+ Addedpicocolors@0.2.1(transitive)
+ Addedpostcss@7.0.39(transitive)
+ Addedpostcss-sass@0.3.5(transitive)
- Removedasset-hash@0.1.1(transitive)
- Removedfs-extra@4.0.3(transitive)
- Removedpostcss-sass@0.2.0(transitive)
Updatedasset-hash@^1.0.3
Updatedfs-extra@^5.0.0
Updatednodent-runtime@^3.2.0
Updatedpostcss@^6.0.16
Updatedpostcss-sass@^0.3.0
Updatedpostcss-scss@^1.0.3