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

rollup-plugin-serve

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-serve - npm Package Compare versions

Comparing version 0.6.1 to 1.0.0

12

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [1.0.0] - 2019-01-11
### Fixed
- Update `ongenerate` to `generateBundle`
### Removed
- Remove built-in `favicon.ico` #20
## [0.6.1] - 2018-12-23

@@ -54,3 +61,6 @@ ### Added

[Unreleased]: https://github.com/thgh/rollup-plugin-serve/compare/v0.1.0...HEAD
[Unreleased]: https://github.com/thgh/rollup-plugin-serve/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/thgh/rollup-plugin-serve/compare/v0.6.1...v1.0.0
[0.6.1]: https://github.com/thgh/rollup-plugin-serve/compare/v0.5.0...v0.6.1
[0.5.0]: https://github.com/thgh/rollup-plugin-serve/compare/v0.4.2...v0.5.0
[0.4.2]: https://github.com/thgh/rollup-plugin-serve/compare/v0.4.1...v0.4.2

@@ -57,0 +67,0 @@ [0.4.1]: https://github.com/thgh/rollup-plugin-serve/compare/v0.4.0...v0.4.1

19

dist/index.cjs.js

@@ -44,18 +44,7 @@ 'use strict';

'\n\n' + filePath +
'\n\n' + Object.keys(error).map(function (k) {
return error[k]
}).join('\n') +
'\n\n' + Object.values(error).join('\n') +
'\n\n(rollup-plugin-serve)', 'utf-8');
return
}
if (request.url === '/favicon.ico') {
filePath = path.resolve(__dirname, '../dist/favicon.ico');
fs.readFile(filePath, function (error, content) {
if (error) {
notFound(response, filePath);
} else {
found(response, filePath, content);
}
});
} else if (options.historyApiFallback) {
if (options.historyApiFallback) {
var fallbackPath = typeof options.historyApiFallback === 'string' ? options.historyApiFallback : '/index.html';

@@ -93,3 +82,3 @@ readFileFromContentBase(options.contentBase, fallbackPath, function (error, content, filePath) {

name: 'serve',
ongenerate: function ongenerate () {
generateBundle: function generateBundle () {
if (!running) {

@@ -140,3 +129,3 @@ running = true;

function found (response, filePath, content) {
response.writeHead(200, { 'Content-Type': mime.lookup(filePath) });
response.writeHead(200, { 'Content-Type': mime.getType(filePath) });
response.end(content, 'utf-8');

@@ -143,0 +132,0 @@ }

@@ -40,18 +40,7 @@ import { readFile } from 'fs';

'\n\n' + filePath +
'\n\n' + Object.keys(error).map(function (k) {
return error[k]
}).join('\n') +
'\n\n' + Object.values(error).join('\n') +
'\n\n(rollup-plugin-serve)', 'utf-8');
return
}
if (request.url === '/favicon.ico') {
filePath = resolve(__dirname, '../dist/favicon.ico');
readFile(filePath, function (error, content) {
if (error) {
notFound(response, filePath);
} else {
found(response, filePath, content);
}
});
} else if (options.historyApiFallback) {
if (options.historyApiFallback) {
var fallbackPath = typeof options.historyApiFallback === 'string' ? options.historyApiFallback : '/index.html';

@@ -89,3 +78,3 @@ readFileFromContentBase(options.contentBase, fallbackPath, function (error, content, filePath) {

name: 'serve',
ongenerate: function ongenerate () {
generateBundle: function generateBundle () {
if (!running) {

@@ -136,3 +125,3 @@ running = true;

function found (response, filePath, content) {
response.writeHead(200, { 'Content-Type': mime.lookup(filePath) });
response.writeHead(200, { 'Content-Type': mime.getType(filePath) });
response.end(content, 'utf-8');

@@ -139,0 +128,0 @@ }

{
"name": "rollup-plugin-serve",
"version": "0.6.1",
"version": "1.0.0",
"description": "Serve your rolled up bundle",

@@ -9,6 +9,7 @@ "main": "dist/index.cjs.js",

"scripts": {
"build": "rollup -c -f cjs -o dist/index.cjs.js && rollup -c -f es -o dist/index.es.js",
"dev": "rollup -cw -f cjs -o dist/index.cjs.js",
"lint": "standard rollup.config.js src/**",
"prepare": "npm run build"
"build": "rollup -c",
"dev": "rollup -cw",
"lint": "standard --fix rollup.config.js src/**",
"prepare": "yarn lint && yarn build",
"test": "cd test && rollup -c || cd .."
},

@@ -36,9 +37,10 @@ "keywords": [

"dependencies": {
"mime": "^1.3.6",
"opener": "^1.4.3"
"mime": "2",
"opener": "1"
},
"devDependencies": {
"rollup": "^0.48.2",
"rollup-plugin-buble": "^0.15.0"
"rollup": "1",
"rollup-plugin-buble": "^0.15.0",
"standard": "12"
}
}

@@ -21,3 +21,7 @@ # Rollup plugin to serve the bundle

```
# Rollup v0.60+ and v1+
npm install --save-dev rollup-plugin-serve
# Rollup v0.59 and below
npm install --save-dev rollup-plugin-serve@0
```

@@ -31,3 +35,3 @@

export default {
input: 'entry.js',
input: 'src/main.js',
output: {

@@ -34,0 +38,0 @@ file: 'dist/bundle.js',

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