Socket
Socket
Sign inDemoInstall

redhead

Package Overview
Dependencies
73
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.2 to 0.3.3

2

oclif.manifest.json

@@ -1,1 +0,1 @@

{"version":"0.3.2","commands":{"build":{"id":"build","description":"Generate the platform specific files based on the configuration","pluginName":"redhead","pluginType":"core","aliases":[],"flags":{"output":{"name":"output","type":"option","char":"o","description":"Folder where the generated files should be saved.","default":"."}},"args":[]},"init":{"id":"init","description":"Initialize the required files\n\nGenerates files for handling your headers and/or redirects configuration.\n","pluginName":"redhead","pluginType":"core","aliases":[],"flags":{"no-headers":{"name":"no-headers","type":"boolean","char":"h","description":"Whether or not to handle headers with redhead","allowNo":false},"no-redirects":{"name":"no-redirects","type":"boolean","char":"r","description":"Whether or not to handle redirects with redhead","allowNo":false}},"args":[]}}}
{"version":"0.3.3","commands":{"build":{"id":"build","description":"Generate the platform specific files based on the configuration","pluginName":"redhead","pluginType":"core","aliases":[],"flags":{"output":{"name":"output","type":"option","char":"o","description":"Folder where the generated files should be saved.","default":"."}},"args":[]},"init":{"id":"init","description":"Initialize the required files\n\nGenerates files for handling your headers and/or redirects configuration.\n","pluginName":"redhead","pluginType":"core","aliases":[],"flags":{"no-headers":{"name":"no-headers","type":"boolean","char":"h","description":"Whether or not to handle headers with redhead","allowNo":false},"no-redirects":{"name":"no-redirects","type":"boolean","char":"r","description":"Whether or not to handle redirects with redhead","allowNo":false}},"args":[]}}}
{
"name": "redhead",
"description": "Dynamically setup headers and redirects for you static deployments",
"version": "0.3.2",
"version": "0.3.3",
"bin": {

@@ -27,4 +27,4 @@ "redhead": "./bin/run"

"eslint-plugin-react": "^7.11.0",
"globby": "^8",
"mocha": "^5",
"globby": "^9",
"mocha": "^6",
"nyc": "^13"

@@ -31,0 +31,0 @@ },

@@ -31,2 +31,18 @@ RedHead

## Motivation
When deploying our [website](https://www.streaver.com) we realized we wanted to have a very subtle difference in the redirects if the environment was `staging` or `production`, we could have gone for the ENV variable option, but the [netlify.toml](https://www.netlify.com/docs/netlify-toml-reference/) file does not allow environment variable interpolation, so you end up having to use a `sed` command (or multiple) to do the replacement, something like:
```sh-session
sed -i s/REDIRECT_1_PLACEHOLDER/${REDIRECT_1_VALUE}/g netlify.toml
sed -i s/REDIRECT_2_PLACEHOLDER/${REDIRECT_2_VALUE}/g netlify.toml
yarn build
```
After that, we noticed that many static deployment sites have similar limitations, that lead us to creating [RedHead](https://github.com/streaver/readhead), and now you can simply do:
```sh-session
redhead build && yarn build
```
## Table of content

@@ -61,3 +77,3 @@ * [Installation](#installation)

$ redhead (-v|--version|version)
redhead/0.3.2 darwin-x64 node-v10.15.1
redhead/0.3.3 darwin-x64 node-v10.15.1
$ redhead --help [COMMAND]

@@ -87,3 +103,3 @@ USAGE

_See code: [src/commands/build.js](https://github.com/streaver/redhead/blob/v0.3.2/src/commands/build.js)_
_See code: [src/commands/build.js](https://github.com/streaver/redhead/blob/v0.3.3/src/commands/build.js)_

@@ -105,3 +121,3 @@ ## `redhead help [COMMAND]`

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.4/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.6/src/commands/help.ts)_

@@ -124,3 +140,3 @@ ## `redhead init`

_See code: [src/commands/init.js](https://github.com/streaver/redhead/blob/v0.3.2/src/commands/init.js)_
_See code: [src/commands/init.js](https://github.com/streaver/redhead/blob/v0.3.3/src/commands/init.js)_
<!-- commandsstop -->

@@ -127,0 +143,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc