minify, set ui color state

This commit is contained in:
Brandon Thomas committed 2016-02-02 04:43:34 -05:00
1 parent 00c0930d0a
commit 44fe6d4cdf
2 files changed
+12

No files matched your search

+2
View File
@@ -12,6 +12,7 @@ var buildLibraries = function() {
// See https://gist.github.com/ktmud/9384509
return gulp.src(mainBowerFiles())
.pipe(filter('**/*.js')) // filter out CSS (bootstrap, etc.)
.pipe(uglify())
.pipe(concat('libraries.js'))
.pipe(gulp.dest('web/'));
}
@@ -28,6 +29,7 @@ var buildJs = function() {
'src/web/js/url.js',
'src/web/js/script.js',
])
.pipe(uglify())
.pipe(concat('script.js'))
.pipe(gulp.dest('web/'));
}
+10
View File
@@ -87,6 +87,16 @@
var uiDictionaryLoadCallback = function(dictionary) {
$('#wordcount').html(dictionary.words.length);
uiSetState();
}
var uiSetState = function() {
var rawSentence = $('input').val();
if (Dictionary.checkSentence(rawSentence)) {
setState('ok');
} else {
setState('error');
}
}
/** Init the UI, possibly from a state passed in from the URL. */