#source-map #build #chains #original #web #farm #magic-string

enhanced-magic-string

Rust based magic-string implementation with sourcemap chains support

15 releases

0.0.14 Apr 21, 2024
0.0.13 Apr 11, 2024
0.0.12 Nov 30, 2023
0.0.0 Oct 31, 2023

#373 in Web programming

Download history 297/week @ 2024-01-20 298/week @ 2024-01-27 293/week @ 2024-02-03 164/week @ 2024-02-10 248/week @ 2024-02-17 113/week @ 2024-02-24 221/week @ 2024-03-02 298/week @ 2024-03-09 539/week @ 2024-03-16 658/week @ 2024-03-23 503/week @ 2024-03-30 713/week @ 2024-04-06 544/week @ 2024-04-13 830/week @ 2024-04-20 590/week @ 2024-04-27 515/week @ 2024-05-04

2,607 downloads per month
Used in 20 crates (via farmfe_core)

MIT license

38KB
1K SLoC

enhanced-magic-string

Rust implementation of https://www.npmjs.com/package/magic-string with original sourcemap chain support. license.

This project is built for the Farm project, which is a extremely fast vite-compatible web build tool written in Rust.

RoadMap

Implement all APIs of magic-string. Bundle will be implemented first.

Bundle

  • addSource
  • generateMap
  • append
  • generateDecodedMap
  • getIndentString
  • indent
  • prepend
  • toString
  • isEmpty
  • length
  • trimLines
  • trim
  • trimStart
  • trimEnd

MagicString

  • addSourcemapLocation
  • append
  • appendLeft
  • appendRight
  • clone
  • generateDecodedMap
  • generateMap
  • getIndentString
  • indent
  • move
  • overwrite
  • update
  • prepend
  • prependLeft
  • prependRight
  • remove
  • lastChar
  • lastLine
  • slice
  • toString
  • isEmpty
  • length
  • trimLines
  • trim
  • trimEndAborted
  • trimEnd
  • trimStartAborted
  • trimStart
  • hasChanged
  • replace
  • replaceAll

Dependencies

~11–21MB
~308K SLoC