mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
minify, set ui color state
This commit is contained in:
1 parent
00c0930d0a
commit
44fe6d4cdf
2 files changed
+12
No files matched your search
@@ -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/'));
|
||||
}
|
||||
|
||||
@@ -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. */
|
||||
|
||||
Reference in new issue
Block a user