Coder Social home page Coder Social logo

jdberrocal1 / ember-cli-deploy-new-relic-sourcemap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adopted-ember-addons/ember-cli-deploy-new-relic-sourcemap

0.0 1.0 1.0 101 KB

Ember CLI Deploy plugin to deploy source maps to new relic

License: MIT License

JavaScript 100.00%

ember-cli-deploy-new-relic-sourcemap's Introduction

ember-cli-deploy-new-relic-sourcemap

Ember CLI Deploy plugin to upload source maps to New Relic.

What is an ember-cli-deploy plugin?

A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.

For more information on what plugins are and how they work, please refer to the Plugin Documentation.

Quick Start

To get up and running quickly, do the following:

$ ember install ember-cli-deploy-new-relic-sourcemap
  • Place the following configuration into config/deploy.js
ENV['new-relic-sourcemap'] = {
  // The URL or CDN your assets are served from.
  // Likely the same as the `prepend` in your fingerprint config
  prefix: 'https://your.awesome.site',

  // Application ID Provided by New Relic
  applicationId: '12345678',

  // Admin Key (not application-specific)
  nrAdminKey: 'a98b7a98notd7reallyasda9s8fkey7am',

  // flag to ignore fingerprint on files, false by default
  ignoreFingerprint: true,

  // flag to ignore fingerprint on files, default /^-[a-zA-Z0-9]+$/
  filterRegex: /^[-a-zA-Z0-9]+$/
};
  • Enable sourcemaps in your ember-cli-build.js file
const app = new EmberApp(defaults, {
  sourcemaps: {
    enabled: true
  }
});
  • Enable fingerprinting. (While New Relic supports non-fingerprinted assets, this is not supported by this plugin yet).
const app = new EmberApp(defaults, {
  fingerprint: {
    enabled: true
  }
});

Installation

Run the following command in your terminal:

ember install ember-cli-deploy-new-relic-sourcemap

For general information on how to setup New Relic Sourcemaps, please refer to their API documentation.

ember-cli-deploy Hooks Implemented

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

  • configure
  • upload

Configuration Options

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

prefix

This is the base URL where your normal javascript assets are served from. (This is likely the same value as what you configure in your fingerprint.prepend setting, if applicable). The fully qualified URL is the only way New Relic knows to map an stack frame to a source map.

Required

applicationId

The New Reclic provided ID for the application for which the source maps are being uploaded.

Required

nrAdminKey

The New Relic provided Admin Key (this is different than the key used to report errors to New Relic).

Required

sourceMapPattern

The minimatch expression to determine which source map files should be uploaded.

Default: '**/*.map'

distDir

The root directory that all files matching the filePattern will be uploaded from. By default, this option will use the distDir property of the deployment context.

Default: context.distDir

Prerequisites

The following properties are expected to be present on the deployment context object:

ember-cli-deploy-new-relic-sourcemap's People

Contributors

andrejoaquim avatar jdberrocal1 avatar spencer516 avatar

Watchers

 avatar

Forkers

jdziat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.