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

esbuild-plugin-filelastmodified

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-filelastmodified

A esbuild plugin to replace __fileLastModified__ with the actual time the file has been modified.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

esbuild-plugin-filelastmodified

A esbuild plugin to replace __fileLastModified__ with the actual time the file has been modified.

Why

Avoid having to manually change the the last time the file was modified everytime you make an edit.

Install

npm install esbuild-plugin-filelastmodified

Usage

import esbuild from 'esbuild'
import fileLastModified from 'esbuild-plugin-filelastmodified'

esbuild.build({
  ...,
  plugins: [
    fileLastModified()
  ]
})
Before
const fileLastModified = __fileLastModified__
After
const fileLastModified = 16165180636939285e-4 // unix date time

Options

The plugin accepts the following options as first argument

identifier

By default the identifier is __fileLastModified__. If you have different requirements you can always pass another identifier to be used instead.

ex: fileLastModified({ identifier: '__FILE_LAST_MODIFIED__' })

FAQs

Package last updated on 23 Mar 2021

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