Skip to content

Commit 2ce6d01

Browse files
author
Cameron Cundiff
committed
Bundle client javascript with browserify.
- Remove unit tests until exploring how to stub the page
1 parent 04b3bac commit 2ce6d01

File tree

7 files changed

+27
-35
lines changed

7 files changed

+27
-35
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
dist/*

auditor.coffee

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
axs = require("accessibility-developer-tools/dist/js/axs_testing").axs
2+
13
class Auditor
2-
call: (dom) ->
3-
if dom
4-
@.log([ { error: "message" } ])
4+
perform: ->
5+
if @._errors()
6+
console.log @._errors()
7+
8+
_errors: ->
9+
result for result in @._results() when result.result is "FAIL"
10+
11+
_results: ->
12+
@results ?= axs.Audit.run()
513

6-
log: ->
714

815
module.exports = Auditor

gulpfile.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

index.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Auditor = require "./auditor.coffee"
2+
3+
auditor = new Auditor
4+
auditor.perform()

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
"url": "https://github.com/accesslint/monitor/issues"
1919
},
2020
"devDependencies": {
21-
"gulp": "~3.9.0",
22-
"gulp-mocha": "~2.1.3",
23-
"chai": "~3.2.0",
24-
"sinon": "~1.15.4",
25-
"sinon-chai": "~2.8.0"
21+
"accessibility-developer-tools": "~2.7.1-rc.1",
22+
"browserify": "~11.0.1",
23+
"coffeeify": "~1.1.0"
2624
},
2725
"dependencies": {
2826
"coffee-script": "~1.9.3"

test/access-lint-monitor-test.coffee

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<html>
2+
<head>
3+
<script src="../dist/accesslint-monitor.js"></script>
4+
</head>
5+
<body>
6+
<img src="image.jpg" />
7+
</body>
8+
</html>

0 commit comments

Comments
 (0)