Home Reference Source
import {RollupSendFile} from 'projext-plugin-rollup/src/jimpex/sendFile.js'
public class | source

RollupSendFile

This service overwrites the Jimpex default sendFile so it will use the frontendFs service to reads the file contents.

Constructor Summary

Public Constructor
public

Class constructor.

Member Summary

Public Members
public

A local reference for the frontendFs service.

Method Summary

Public Methods
public

sendFile(res: Reponse, filepath: string, next: function)

Send a file on the Jimpex response.

Public Constructors

public constructor(frontendFs: RollupFrontendFs) source

Class constructor.

Params:

NameTypeAttributeDescription
frontendFs RollupFrontendFs

To be able to read the file the Rollup output directory.

Public Members

public frontendFs: RollupFrontendFs source

A local reference for the frontendFs service.

Public Methods

public sendFile(res: Reponse, filepath: string, next: function) source

Send a file on the Jimpex response.

Params:

NameTypeAttributeDescription
res Reponse

The response object generated by Express.

filepath string

The path to the file that needs to be sent.

next function
  • optional

If anything goes wrong, this function will be called with the exception.