Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shakyshane/no-abs
Don't allow absolute paths in require calls
https://github.com/shakyshane/no-abs
Last synced: about 2 months ago
JSON representation
Don't allow absolute paths in require calls
- Host: GitHub
- URL: https://github.com/shakyshane/no-abs
- Owner: shakyShane
- Created: 2014-12-11T13:25:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-11T15:10:43.000Z (about 10 years ago)
- Last Synced: 2024-10-29T14:19:27.610Z (3 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#no-abs [![Build Status](https://secure.travis-ci.org/shakyShane/no-abs.svg?branch=master)](http://travis-ci.org/shakyShane/no-abs)
> Don't allow absolute paths in require calls
It's just a simple regex that looks for ` require("/` in files - don't use it if you need anything
more robust that than.It was created to stop myself pushing code that was using absolute paths on my machine - it's not
designed to be any kind of comprehensive check/test, so use with caution.## Install
```sh
$ npm install --save no-abs
```## Usage
```js
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var noAbs = require('no-abs');gulp.task('no-abs', function() {
return gulp.src("test/fixtures/*.js")
.pipe(noAbs())
.pipe(jshint());
});
```## License
MIT © [Shane Osbourne]()