Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

todo-webpack-plugin

mikeerickson121MIT1.10.1

Webpack plugin for generating report of TODO, FIXME, etc

webpack, plugin, todo, fixme, changeme, leasot

readme

todo-webpack-plugin

Brought to you by codedungeon

npm link https://www.npmjs.com/package/todo-webpack-plugin

Overview

Webpack Plugin to generate TODO report (markdown, json, xml or text format) and optionally to stdout (console)

Getting Started

  1. Install plugin

    $ npm i -D todo-webpack-plugin

  2. Import plugin into webpack.config.js

    var TodoWebpackPlugin = require('todo-webpack-plugin');

    or ES6

    import TodoWebpackPlugin from 'todo-webpack-plugin'

  3. Add plugin to plugin section of webpack.config.js

    
     // configure plugin to send output to console in addition to default file
     plugins: [
       new TodoWebpackPlugin({
         console:  true,
       })
     ]
    
     // configure plugin to create output file
     plugins: [
       new TodoWebpackPlugin({
         console:  true,
         // tags:               ['error','info'], // default will be TODO, FIXME
         // reporter:           'json',           // default `markdown`
         // filename:           'todo.json',      // default `TODO.md`
         // skipUnsupported:    true,             // skip unsupported files
         // suppressFileOutput: false,            // suppress file output to disk
         // relativeFilePath:   true ,            // display relative file paths
         // withInlineFiles:    false ,           // support inline js (ie Vue)
    
       })
     ]

Plugin Options

variable        type          default          description
===========================================================================================
tags               array      todo, fixme      list of optional objects to watch
reporter           string     markdown         markdown | xml      | json      | text
filename           string     TODO.md          TODO.md  | todo.xml | todo.json | todo.txt
console            boolean    true             output report to console ( true | false )
skipUnsupported    boolean    true             skip unsupported files ( true | false )
suppressFileOutput boolean    false            suppress output file to disk
relativeFilePaths  boolean    true             display relative file paths ( true | false )

Things To Know

These are some things I figured you should know (this will be expanded)

  • Plugin ignores node_modules globally (ala ESLint)

  • Plugin uses leasot internally

  • Project inspired by gulp-todo

  • you can run tests (note: tests incomplete at the moment, just placeholder) $ npm test

  • you can run linting $ npm run lint

Credits

todo-webpack-plugin written by Mike Erickson

E-Mail: codedungeon@gmail.com

Twitter: @codedungeon

Website: codedungeon.io

changelog

todo-webpack-plugin

Overview

See README.md for complete details of this project

Just the changes

  • 1.10.1

  • Cleaned up documentation, adding missing colons

  • 1.9.7 :: 1.9.1

    • Added additionally conditional support for Webpack 4, remove warning of Tapable access using new Webpack 4 API.
    • Fix condition when undefined files reference passed to reporter which conditonally occurs based on method of execution
  • 1.9.0

    • Fixed compatiblity with Webpack 4
    • Migrated to new .hooks interface with Webpack 4 plugin
  • 1.8.0:

    • Added withInlineFiles support (Vue support)
    • Added support for Vue files
    • Updated to leasot 4.3.1 (support Vue files)
  • 1.7.0:
    • Added relativeFilePath option to output relative file path instead of full path
    • Applied relativeFilePath as default. If you wish for full path, set this option to false
  • 1.6.0:
    • Internal Release
  • 1.5.0:
    • Added suppressFileOutput option to suppress file output to disk
  • 1.4.0:
    • Exclude bower_components as we are handling node_modules
    • Exclude vendor as we are handling node_modules
  • 1.3.0: Now removes node_modules but default
  • 1.2.0: Removed lodash.merge dependency, now using ES6 Object.assign
  • 1.1.0: Added options
  • 1.0.4: Internal adjustments
  • 1.0.3: Removed unused dependencies
  • 1.0.2: Internal Release
  • 1.0.1: Configuration Fixes
  • 1.0.0: Initial Release