Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-angular-inline

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-angular-inline

Angular templateUrl and styleUrls inline for Rollup.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
decreased by-56.25%
Maintainers
1
Weekly downloads
 
Created
Source

Warning

This approach will likely produce innaccurate sourcemaps.

A better approach is to inline templates/styles directly in the TypeScript sources, which guarantees sourcemaps will be correctly produced by TypeScript.

Such a build step can be found at https://github.com/filipesilva/angular-quickstart-lib.

rollup-plugin-angular-inline

Build Status

Angular templateUrl and styleUrls inliner for Rollup, based on the angular/material2 inlining script. Also removes module.id since it isn't needed afterwards.

Operates over transpiled JavaScript files so you need to provide include globs to ensure replacement is only happening on Angular Components.

Used after ngc, to inline templates/styles for UMD bundles but still have es2015 files for tree shaking.

Installation

npm install --save-dev rollup-plugin-angular-inline

Example

// package.json
"scripts": {
  "build": "ngc && rollup -c rollup-config.js",
}
// rollup-config.js
import angularInline from 'rollup-plugin-angular-inline';

export default {
  entry: './src/index.js',
  dest: './bundles/my-lib.umd.js',
  format: 'umd',
  moduleName: 'ng.my-lib',
  globals: {
    '@angular/core': 'ng.core'
  },
  plugins: [
    angularInline({ include: './src/**/*.component.js' })
  ]
}

Keywords

FAQs

Package last updated on 06 Jul 2017

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

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