File tree Expand file tree Collapse file tree 12 files changed +90
-12
lines changed Expand file tree Collapse file tree 12 files changed +90
-12
lines changed Original file line number Diff line number Diff line change 1
- node_modules /
1
+ # Logs
2
+ logs
3
+ * .log
4
+
5
+ # Runtime data
6
+ pids
7
+ * .pid
8
+ * .seed
9
+
10
+ # Directory for instrumented libs generated by jscoverage/JSCover
11
+ lib-cov
12
+
13
+ # Coverage directory used by tools like istanbul
14
+ coverage
15
+
16
+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17
+ .grunt
18
+
19
+ # node-waf configuration
20
+ .lock-wscript
21
+
22
+ # Compiled binary addons (http://nodejs.org/api/addons.html)
23
+ build /Release
24
+
25
+ # Dependency directory
26
+ # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27
+ node_modules
28
+
29
+ # distribution
30
+ dist
Original file line number Diff line number Diff line change
1
+ instrumentation :
2
+ excludes : ['**/__tests__/**']
Original file line number Diff line number Diff line change 1
1
{
2
2
"node" : true ,
3
3
"browser" : true ,
4
- "esnext" : true ,
5
- "laxcomma" : true
4
+ "esnext" : true
6
5
}
Original file line number Diff line number Diff line change
1
+ src
Original file line number Diff line number Diff line change
1
+ require ( 'babel/register' ) ( {
2
+ experimental : true ,
3
+ loose : 'all'
4
+ } ) ;
Original file line number Diff line number Diff line change 2
2
"name" : " lazy-input" ,
3
3
"version" : " 1.0.8" ,
4
4
"description" : " A lazy React.js input field that only updates when it is told to re-render (fixes issues with Flux backed field data)" ,
5
- "main" : " index .js" ,
5
+ "main" : " dist/LazyInput .js" ,
6
6
"scripts" : {
7
- "test" : " echo \" Error: no test specified\" && exit 1"
7
+ "build" : " ./scripts/build" ,
8
+ "test" : " ./scripts/test" ,
9
+ "test-cov" : " ./scripts/test-cov" ,
10
+ "prepublish" : " npm run build"
8
11
},
9
12
"repository" : {
10
13
"type" : " git" ,
26
29
"url" : " https://github.com/HurricaneJames/lazy-input/issues"
27
30
},
28
31
"homepage" : " https://github.com/HurricaneJames/lazy-input" ,
29
- "dependencies" : {
30
- "clone" : " ^1.0.0" ,
32
+ "devDependencies" : {
33
+ "babel" : " ^4.6.6" ,
34
+ "expect.js" : " ^0.3.1" ,
35
+ "istanbul" : " ~0.3.7" ,
36
+ "jsdom" : " ^3.1.0" ,
37
+ "mocha" : " ^2.0.1" ,
31
38
"react" : " ^0.12.2"
32
39
}
33
40
}
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ ./node_modules/.bin/babel ./src --out-dir dist --loose all --experimental
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ ./node_modules/.bin/mocha --require ./babel.js --compilers jsx:babel/register --recursive ./src/__tests__
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --require ./babel ./src/__tests__
Original file line number Diff line number Diff line change 1
- var React = require ( 'react' )
2
- , clone = require ( 'clone' ) ;
1
+ var React = require ( 'react' ) ;
3
2
4
3
var LazyInput = React . createClass ( {
5
4
displayName : "LazyInput" ,
@@ -48,10 +47,9 @@ var LazyInput = React.createClass({
48
47
this . props . onChange . apply ( null , arguments ) ;
49
48
} ,
50
49
getProps : function ( ) {
51
- // for the most part, we are just going to pass through whatever comes in
52
- var props = clone ( this . props ) ;
50
+ var props = { } ;
51
+ for ( var key in this . props ) { if ( key !== 'lazyLevel' ) { props [ key ] = this . props [ key ] ; } }
53
52
props . value = this . state . value ;
54
- delete props . lazyLevel ;
55
53
if ( props . onChange ) { props . onChange = this . onChange ; }
56
54
return props ;
57
55
} ,
You can’t perform that action at this time.
0 commit comments