GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - unassert-js/webpack-unassert-loader: A webpack loader for unassert: Encourages programming with assertions by providing tools to compile them away.

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
test
test
 
 
.gitignore
.gitignore
 
 
.jshintrc
.jshintrc
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
gulpfile.js
gulpfile.js
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

Build Status NPM package Dependency Status License

webpack-unassert-loader

A webpack loader for unassert: Encourages programming with assertions by providing tools to compile them away.

Description

webpack-unassert-loader is a webpack loader module to remove assertions on build. webpack-unassert-loader applies unassert to target sources through webpack loader chain.

See unassert project for more documentation.

Installation

Install webpack-unassert-loader via npm:

$ npm install --save-dev webpack-unassert-loader

Usage

Configure webpack.config.js to apply webpack-unassert-loader through webpack loader transformation chain.

{
    module: {
        loaders: [
            { test: /\.js$/, loader: "webpack-unassert-loader" }
        ]
    }
}

You can pass unassert options by including to webpack configuration object (e.g. webpack.config.js). If not passed, default options (Same as unassert.defaultOptions()) will be used.

{
    assertionPatterns: [
        'assert(value, [message])',
        'assert.ok(value, [message])',
        'assert.equal(actual, expected, [message])',
        'assert.notEqual(actual, expected, [message])',
        'assert.strictEqual(actual, expected, [message])',
        'assert.notStrictEqual(actual, expected, [message])',
        'assert.deepEqual(actual, expected, [message])',
        'assert.notDeepEqual(actual, expected, [message])',
        'assert.deepStrictEqual(actual, expected, [message])',
        'assert.notDeepStrictEqual(actual, expected, [message])',
        'assert.fail(actual, expected, message, operator)',
        'assert.throws(block, [error], [message])',
        'assert.doesNotThrow(block, [message])',
        'assert.ifError(value)',
        'console.assert(value, [message])'
    ],
    requirePatterns: [
        'assert = require("assert")',
        'assert = require("power-assert")'
    ],
    importPatterns: [
        'import assert from "assert"',
        'import * as assert from "assert"',
        'import assert from "power-assert"',
        'import * as assert from "power-assert"'
    ]
}

Changelog

See CHANGELOG.md.

License

Licensed under the MIT license. See LICENSE.

About

A webpack loader for unassert: Encourages programming with assertions by providing tools to compile them away.

Resources

Readme
MIT license
Activity
Custom properties

Stars

28 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.