New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-rebase

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-rebase - npm Package Compare versions

Comparing version 0.12.2 to 1.0.0

18

lib/node.commonjs.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc