🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

ember-cli-netlify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-netlify

An Ember addon to configure Netlify headers and redirects

latest
Source
npmnpm
Version
0.4.1
Version published
Maintainers
1
Created
Source

ember-cli-netlify

Ship Shape

ember-cli-netlify is built and maintained by Ship Shape. Contact us for Ember.js consulting, development, and training for your project.

npm version Download count all time npm Ember Observer Score Build Status

This addon allows you to configure your Netlify headers and redirects.

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-cli-netlify

Usage

.netlifyheaders and/or .netlifyredirects

There are a few ways to use this addon. The first one is to define a .netlifyheaders and/or a .netlifyredirects file in the root of your project and this addon will copy the output to dist/_headers and dist/_redirects respectively.

ember-cli-build.js

The second way is to define an ember-cli-netlify hash in your ember-cli-build.js. You can combine these methods, and anything defined in the config hash will be appended to the existing files. Currently, only redirects are supported, not headers.

'ember-cli-netlify': {
  redirects: [
    'https://blog.shipshape.io/* https://shipshape.io/blog/:splat 301!',
    'https://blog.shipshape.io/* https://shipshape.io/blog/:splat 301!'
  ]
}

Using in an addon

The final option, for addon authors, is to declare redirects for ember-cli-netlify during compilation. To do so, you will want to:

  • Add "ember-cli-netlify-plugin" to your addon's package.json keywords array.
  • Define a netlifyRedirects() function in your addon's main file, that returns an array of redirects.
  • Advise your addon's users to install & configure ember-cli-netlify in the host application.

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

ember-addon

FAQs

Package last updated on 18 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts