esprima-pretty-print-loader

0.1.2 • Public • Published

esprima-pretty-print-loader

Print or write out your code's AST in a pretty manner

Installing

npm install

How to Use

Add it as a loader in your webpack config.

Support flags are write and print. Their defaults are false and true, respectively.

module: {
  loaders: [
    {
      test: /\.jsx?$/,
      exclude: /(node_modules)/,
      loaders: ['babel', 'esprima-pretty-print?write']
    }
  ]
},
 

The above example will print out your code's AST as well as writing it to a file.

To turn off printing and only write to a file, set the loader as esprima-pretty-print?+write,-print.

Note: this loader does not modify your source code. It only console.logs it and / or writes it to a file.

Supported Syntax

ES5, ES6, and JSX

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i esprima-pretty-print-loader

    Weekly Downloads

    1

    Version

    0.1.2

    License

    MIT

    Last publish

    Collaborators

    • mrblueblue