Socket
Socket
Sign inDemoInstall

@bsj/angular-inline-resources

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @bsj/angular-inline-resources

Used to inline css and html resources in Angular Components


Version published
Maintainers
1
Created

Readme

Source

Angular Inline Resources

This package is used to inline CSS and HTML in Angular components so they can be used as NPM package in Angular applications.

How to use

Install Angular Inline Resources

npm i @bsj/angular-inline-resources

Install Gulp

To use the inline resource you will need Gulp.

npm i gulp

Gulp file

The Gulp file should call the inline-resource script passing the folders where the files are. In this example, the files are stored inside /src folder.

var gulp = require('gulp');
var inlineResources = require('@bsj/angular-inline-resources');

/** Inlines resources (html, css) into the JS output (for either ESM or CJS output). */
gulp.task('js:inline-resources', () => inlineResources('./src/*'));

Inlining resource

To inline the resources you must call the inline-resources with Gulp:

gulp js:inline-resources

Output

The inline resource will create the inlined files and place it inside a folder called inline-src/.

Keywords

FAQs

Last updated on 11 Dec 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc