🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@bsj/angular-inline-resources

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

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

1.0.2
latest
Source
npm
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
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

Angular

FAQs

Package last updated on 11 Dec 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