Skip to content

Commit

Permalink
Various changes to fix vulnerabilities
Browse files Browse the repository at this point in the history
* Moved from `browserify` to `webpack`
* Moved from PhantomJS to ChromeHeadless for browser tests
* Removed `snyk` usage
* Upgraded various modules
  • Loading branch information
whitlockjc committed Apr 16, 2019
1 parent 7cb5266 commit e9ad6e8
Show file tree
Hide file tree
Showing 30 changed files with 70,759 additions and 126,374 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage
dist
node_modules
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
**/node_modules/
**/npm-debug.log

bower_components/
coverage/
typings/
.settings/
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Before contributing to sway, it makes sense to understand the development proces
no time will be spent talking about it. sway uses Gulp as its task runner, which is used to build, lint, test,
etc. all parts of sway. Below are the gulp tasks:

* `browserify`: Builds the browser binaries using [Browserify][browserify]
* `clean`: Removes all development artifacts *(`bower_components`, `coverage`, ...)*
* `clean`: Removes all development artifacts *(`coverage`, ...)*
* `docs`: Generates `docs/API.md` from the [jsdoc][jsdoc] in the necessary sources
* `lint`: Lint checks the necessary sources using [ESLint][eslint]
* `test-browser`: Runs the test suite for the browser
Expand Down Expand Up @@ -56,7 +55,6 @@ checks and failing tests but this is a safety net only)*
clear)*
4. Should include tests *(Bug fixes and features should have tests included with them at all times)*

[bower]: http://bower.io/
[browserify]: http://browserify.org/
[eslint]: http://eslint.org/
[gulp]: http://gulpjs.com/
Expand Down
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,24 @@ sway is available for both Node.js and the browser. Installation instructions f

### Browser

Installation for browser applications can be done via [Bower][bower] or by downloading a standalone binary.
sway binaries for the browser are available in the `dist/` directory:

#### Using Bower

```
bower install sway --save
```

#### Standalone Binaries

The standalone binaries come in two flavors:

* [sway-standalone.js](https://raw.github.com/apigee-127/sway/master/browser/sway-standalone.js): _8,548kb_, full source and source maps
* [sway-standalone-min.js](https://raw.github.com/apigee-127/sway/master/browser/sway-standalone-min.js): _1,016kb_, minified, compressed and no source map
* [sway-standalone.js](https://raw.github.com/apigee-127/sway/master/dist/sway.js): _9,160kb_, full source and source maps
* [sway-standalone-min.js](https://raw.github.com/apigee-127/sway/master/dist/sway-min.js): _864kb_, minified, compressed and no source map

**Note:** I realize these binaries are big and I'm working on making them smaller. Unfortunately, some of this is out
of my control without rewriting some of the core features provided by third-party libraries currently contributing to
the size issue.

Of course, these links are for the master builds so feel free to download from the release of your choice. Once you've
gotten them downloaded, to use the standalone binaries, your HTML include might look like this:

``` html
<!-- ... -->
<script src="sway.js"></script>
<!-- ... -->
```

### Node.js

Installation for Node.js applications can be done via [NPM][npm].
Expand All @@ -63,7 +62,6 @@ Of course, if you just want a quick link to the API documentation, that would be
This project uses [Gulp][gulp] for building so `npm install -g gulp` once you clone this project. Running `gulp` in the
project root will lint check the source code and run the unit tests.

[bower]: http://bower.io/
[gulp]: http://gulpjs.com/
[openapi]: https://www.openapis.org/
[npm]: https://www.npmjs.org/
36 changes: 0 additions & 36 deletions bower.json

This file was deleted.

1 change: 0 additions & 1 deletion browser/sway-min.js

This file was deleted.

1 change: 0 additions & 1 deletion browser/sway-standalone-min.js

This file was deleted.

Loading

0 comments on commit e9ad6e8

Please sign in to comment.