Giter VIP home page Giter VIP logo

caseify's Introduction

Caseify

Browserify transform to ensure all dependencies exist in a case-sensitive environment. Checks that all require expressions with relative paths point to a file that can be found using a case preserving string match.

Useful for detecting issues in case sensitive module naming on case-insensitive dev machines (such as OS X and WinX) that end up causing issues on Linux based Continuous Integration machines.

Installation

  • npm install --save-dev caseify install as dev dependency
  • add 'caseify' as a browserify transform via
    {
      "browserify": {
        "transform": [ "caseify" ]
      }
    }

or if using Gulp or Grunt, simply add 'casefiy' to your list of transforms.

Options

To configure how caseify works, add setting in your project's package.json file under caseify.

  • relativePaths: Default false - show file paths as relative to the current working directory

  • throwOnError: Default fasle - throw a fatal error if an invalid module is found. This is instead of the default behaviour which emits an error on the browserify stream. Note: this will occur before browserify has processed the file and interrupt it immediately.

eg. package.json

 ...
 "devDependencies": {
     "caseify": "~0.1"
 },
 "caseify": {
    "relativePaths": true,
    "throwOnError": true
  },
  ...

Example

Within this directory structure:

moduleA.js
|-- deps/moduleB.js
|-- deps/moduleC.js

if moduleA.js contains:

var moduleB = require('./deps/moduleb');

running: browserify -t caseify module*.js > module.bundle.js

causes this output:

Caseify: /Users/jmoses/example/moduleA.js module ./deps/moduleb not found in case-sensitive environment

caseify's People

Contributors

jjgonecrypto avatar joews avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.