mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
style
This commit is contained in:
parent
a746f0e29b
commit
8b13c1b403
6
.jscsrc
6
.jscsrc
@ -28,9 +28,9 @@
|
||||
"beforeAlternate": true
|
||||
},
|
||||
|
||||
"requireSpacesInsideParentheses": "allButNested",
|
||||
"requireSpacesInsideObjectBrackets": "allButNested",
|
||||
"requireSpacesInsideArrayBrackets": "allButNested",
|
||||
"requireSpacesInsideParentheses": "all",
|
||||
"requireSpacesInsideObjectBrackets": "all",
|
||||
"requireSpacesInsideArrayBrackets": "all",
|
||||
|
||||
"requireParenthesesAroundIIFE": true,
|
||||
|
||||
|
@ -9,6 +9,6 @@
|
||||
"noarg": true,
|
||||
"undef": true,
|
||||
"unused": "vars",
|
||||
"strict": true,
|
||||
"strict": false,
|
||||
"browser": true
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -74,7 +74,11 @@
|
||||
|
||||
Gui.ready = function( fnc ) {
|
||||
|
||||
ready ? fnc() : readyHandlers.push( fnc );
|
||||
if ( ready ) {
|
||||
fnc();
|
||||
} else {
|
||||
readyHandlers.push( fnc );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
@ -30,8 +30,8 @@ Polymer( 'controller-base', {
|
||||
|
||||
valueChanged: function() {
|
||||
|
||||
this.update();
|
||||
this.fire( 'change', this.value );
|
||||
this.update();
|
||||
|
||||
},
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* globals Polymer, Object, Array */
|
||||
'use strict';
|
||||
|
||||
|
||||
Polymer( 'controller-option', {
|
||||
|
||||
|
@ -47,8 +47,7 @@ Polymer( 'gui-panel', {
|
||||
var value = Path.get( path ).getValueFrom( object );
|
||||
|
||||
if ( value === null || value === undefined ) {
|
||||
return Gui.error( object +
|
||||
' doesn\'t have a value for path "' + path + '".' );
|
||||
return Gui.error( object + ' doesn\'t have a value for path "' + path + '".' );
|
||||
}
|
||||
|
||||
var args = Array.prototype.slice.call( arguments, 2 );
|
||||
@ -135,8 +134,7 @@ Polymer( 'gui-panel', {
|
||||
|
||||
listenAll: function() {
|
||||
|
||||
Gui.warn( 'controller.listenAll() is deprecated. ' +
|
||||
'All controllers are listened for free.' );
|
||||
Gui.warn( 'controller.listenAll() is deprecated. All controllers are listened for free.' );
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* globals Polymer */
|
||||
|
||||
'use strict';
|
||||
|
||||
Polymer( 'gui-row', {
|
||||
|
||||
|
35
gulpfile.js
35
gulpfile.js
@ -1,27 +1,35 @@
|
||||
'use strict';
|
||||
|
||||
var gulp = require( 'gulp' ),
|
||||
$ = require( 'gulp-load-plugins' )(),
|
||||
nib = require( 'nib' ),
|
||||
fs = require( 'fs' ),
|
||||
marked = require( 'marked' ),
|
||||
karma = require( 'karma' ),
|
||||
browserSync = require( 'browser-sync' ),
|
||||
reload = browserSync.reload;
|
||||
reload = browserSync.reload,
|
||||
$ = require( 'gulp-load-plugins' )();
|
||||
|
||||
gulp.task( 'default', ['docs', 'build'] )
|
||||
|
||||
var paths = {
|
||||
build: [ 'elements/**/*.styl', 'elements/**/*.html', 'elements/**/*.js' , 'gui.html' ],
|
||||
lint: [ 'gulpfile.js', 'elements/**/*.js' ],
|
||||
test: [ 'build/gui.js', 'tests/*.js' ],
|
||||
clean: [ 'build/*', '**/*.css' ],
|
||||
docs: [ 'README.md', 'docs/*' ]
|
||||
};
|
||||
|
||||
gulp.task( 'default', [ 'docs', 'lint', 'build' ] );
|
||||
|
||||
gulp.task( 'watch', [ 'default' ], function() {
|
||||
|
||||
karma.server.start( {
|
||||
frameworks: [ 'jasmine' ],
|
||||
files: [
|
||||
'build/gui.js',
|
||||
'tests/*.js'
|
||||
]
|
||||
files: paths.test
|
||||
} );
|
||||
|
||||
gulp.watch( ['elements/**/*.styl', 'elements/**/*.html', 'elements/**/*.js', 'gui.html'], ['build'] );
|
||||
|
||||
gulp.watch( ['README.md', 'docs/*'], ['docs'] );
|
||||
gulp.watch( paths.docs, [ 'docs' ] );
|
||||
gulp.watch( paths.lint, [ 'lint' ] );
|
||||
gulp.watch( paths.build, [ 'build' ] );
|
||||
|
||||
} );
|
||||
|
||||
@ -44,7 +52,6 @@ gulp.task( 'vulcanize', ['css'], function() {
|
||||
dest: 'build',
|
||||
inline: true,
|
||||
strip: true
|
||||
|
||||
} ) );
|
||||
|
||||
} );
|
||||
@ -53,14 +60,14 @@ gulp.task( 'lint', ['jscs', 'jshint'] );
|
||||
|
||||
gulp.task( 'jscs', function() {
|
||||
|
||||
return gulp.src( 'elements/**/*.js', '*.json', '*.js' )
|
||||
return gulp.src( paths.lint )
|
||||
.pipe( $.jscs() );
|
||||
|
||||
} );
|
||||
|
||||
gulp.task( 'jshint', function() {
|
||||
|
||||
return gulp.src( 'elements/**/*.js', '*.json', '*.js' )
|
||||
return gulp.src( paths.lint )
|
||||
.pipe( reload( { stream: true, once: true } ) )
|
||||
.pipe( $.jshint( '.jshintrc' ) )
|
||||
.pipe( $.jshint.reporter( 'jshint-stylish' ) )
|
||||
@ -92,7 +99,7 @@ gulp.task( 'docs', function() {
|
||||
|
||||
gulp.task( 'clean', function() {
|
||||
|
||||
return gulp.src( ['build/*', '**/*.css'] )
|
||||
return gulp.src( paths.clean )
|
||||
.pipe( $.rimraf() );
|
||||
|
||||
} );
|
||||
|
Loading…
Reference in New Issue
Block a user