Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Chore: Update README.md #3

Merged
merged 1 commit into from
Jan 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 20 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
Escope ([escope](http://github.com/estools/escope)) is
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
scope analyzer extracted from [esmangle project](http://github.com/estools/esmangle).
# ESLint Scope

[![Build Status](https://travis-ci.org/estools/escope.png?branch=master)](https://travis-ci.org/estools/escope)
ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope).

### Example
## Usage

Install:

```
npm i eslint-scope --save
```

Example:

```js
var escope = require('escope');
var eslintScope = require('eslint-scope');
var esprima = require('esprima');
var estraverse = require('estraverse');

var ast = esprima.parse(code);
var scopeManager = escope.analyze(ast);
var scopeManager = eslintScope.analyze(ast);

var currentScope = scopeManager.acquire(ast); // global scope

Expand All @@ -34,46 +40,15 @@ estraverse.traverse(ast, {
});
```

### Document

Generated JSDoc is [here](http://estools.github.io/escope/).

### Demos and Tools

Demonstration is [here](http://mazurov.github.io/escope-demo/) by [Sasha Mazurov](https://github.com/mazurov) (twitter: [@mazurov](http://twitter.com/mazurov)). [issue](https://github.com/estools/escope/issues/14)

![Demo](https://f.cloud.github.com/assets/75759/462920/7aa6dd40-b4f5-11e2-9f07-9f4e8d0415f9.gif)


And there are tools constructed on Escope.

- [Esmangle](https://github.com/estools/esmangle) is a minifier / mangler / optimizer.
- [Eslevels](https://github.com/mazurov/eslevels) is a scope levels analyzer and [SublimeText plugin for scope context coloring](https://github.com/mazurov/sublime-levels) is constructed on it.
- [Esgoggles](https://github.com/keeyipchan/esgoggles) is JavaScript code browser.


### License
## Contributing

Copyright (C) 2012-2013 [Yusuke Suzuki](http://github.com/Constellation)
(twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues).

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
## Build Commands

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* `npm test` - run all linting and tests
* `npm run lint` - run all linting

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
## License

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ESLint Scope is licensed under a permissive BSD 2-clause license.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ gulp.task('browserify', [ 'build' ], function () {
.pipe(gulp.dest('build'))
});

gulp.task('test', [ 'build' ], function () {
gulp.task('test', [ 'lint', 'build' ], function () {
return gulp.src(TEST)
.pipe(mocha({
reporter: 'spec',
Expand Down