@ima/dev-utils

19.0.1 • Public • Published

@ima/dev-utils

Used to share common methods and utils used across other dev packages (@ima/cli, @ima/error-overlay, etc.).


Currently it mainly contains methods for compile and runtime error parsing which are used in multiple other packages.

There's intentionally no "main" export or index file and each utils file has to be imported with it's direct path. This is because some packages are used on client only while others may contain some nodejs specific syntax.

This means that you need to import each utility as:

import { extractSourceMappingUrl } from '@ima/dev-utils/sourceMapUtils';
import { FragmentLine } from '@ima/dev-utils/sourceFragment';
import { parseCompileError } from '@ima/dev-utils/compileErrorParser';
// ...

Contents

  • compileErrorParser - used to parse compile errors from currently used loaders.
  • cliUtils - utilities for CLI error formatting.
  • helpers - general regexps and other helpers.
  • sourceFragment - utility to create source fragment object containing X number of lines of code around highlighted line from provided source.
  • sourceMapUtils - utils to extract source map URL from file contents.

This package is part of the IMA.js application stack, see imajs.io for more info about the whole project.

Readme

Keywords

Package Sidebar

Install

npm i @ima/dev-utils

Weekly Downloads

31

Version

19.0.1

License

MIT

Unpacked Size

40.5 kB

Total Files

29

Last publish

Collaborators

  • corvidism
  • mjancarik
  • filipoliko
  • matej.marcisovsky
  • jsimck
  • hartja
  • zdenek.lastuvka
  • jan.kucera
  • ondrej.sliva