This repository was archived by the owner on Apr 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +30
-6
lines changed
Expand file tree Collapse file tree 6 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 145145 radioValue1 : 0 ,
146146 radioValue2 : 1 ,
147147 radioChecked1 : true ,
148- radioChecked2 : false ,
148+ radioChecked2 : false
149149 }
150150 }
151151 }
152- for ( var i = 0 ; i < 1000 ; i ++ ) {
152+ for ( var i = 0 ; i < 100 ; i ++ ) {
153153 data . list . push ( {
154154 id : i
155155 } )
Original file line number Diff line number Diff line change @@ -805,10 +805,12 @@ define(
805805*/
806806define (
807807 'brix/bisheng/ast' , [
808+ 'underscore' ,
808809 'handlebars' ,
809810 './locator'
810811 ] ,
811812 function (
813+ _ ,
812814 Handlebars ,
813815 Locator
814816 ) {
@@ -873,7 +875,7 @@ define(
873875
874876 var prop = [ ]
875877 if ( node . isHelper ) {
876- node . params . forEach ( function ( param ) {
878+ _ . each ( node . params , function ( param , index ) {
877879 if ( param . type === 'ID' ) {
878880 prop . push ( param . string )
879881 }
@@ -1160,7 +1162,13 @@ define(
11601162
11611163 // 扫描子节点
11621164 function scanChildNode ( node ) {
1163- _ . each ( [ ] . slice . call ( node . childNodes ) , function ( childNode /*, index*/ ) {
1165+ // “Array.prototype.slice: 'this' is not a JavaScript object” error in IE8
1166+ // [].slice.call(node.childNodes)
1167+ var tmp = [ ]
1168+ for ( var i = 0 , childNodes = node . childNodes , len = childNodes . length ; i < len ; i ++ ) {
1169+ tmp . push ( childNodes [ i ] )
1170+ }
1171+ _ . each ( tmp , function ( childNode /*, index*/ ) {
11641172 scanNode ( childNode )
11651173 } )
11661174 }
Original file line number Diff line number Diff line change 22/* global console */
33
44var gulp = require ( 'gulp' )
5+ var connect = require ( 'gulp-connect' )
56var jshint = require ( 'gulp-jshint' )
67var mochaPhantomJS = require ( 'gulp-mocha-phantomjs' )
78var rjs = require ( 'gulp-requirejs' )
@@ -22,6 +23,13 @@ ______ _ ______ _ _____ _
2223 } ) . toString ( ) . split ( '\n' ) . slice ( 2 , - 2 ) . join ( '\n' ) + '\n' )
2324} )
2425
26+ // https://github.com/AveVlad/gulp-connect
27+ gulp . task ( 'connect' , function ( ) {
28+ connect . server ( {
29+ port : 4246
30+ } )
31+ } )
32+
2533// https://github.com/spenceralger/gulp-jshint
2634gulp . task ( 'jshint' , function ( ) {
2735 var globs = [
Original file line number Diff line number Diff line change 1616*/
1717define (
1818 [
19+ 'underscore' ,
1920 'handlebars' ,
2021 './locator'
2122 ] ,
2223 function (
24+ _ ,
2325 Handlebars ,
2426 Locator
2527 ) {
@@ -84,7 +86,7 @@ define(
8486
8587 var prop = [ ]
8688 if ( node . isHelper ) {
87- node . params . forEach ( function ( param ) {
89+ _ . each ( node . params , function ( param , index ) {
8890 if ( param . type === 'ID' ) {
8991 prop . push ( param . string )
9092 }
Original file line number Diff line number Diff line change @@ -179,7 +179,13 @@ define(
179179
180180 // 扫描子节点
181181 function scanChildNode ( node ) {
182- _ . each ( [ ] . slice . call ( node . childNodes ) , function ( childNode /*, index*/ ) {
182+ // “Array.prototype.slice: 'this' is not a JavaScript object” error in IE8
183+ // [].slice.call(node.childNodes)
184+ var tmp = [ ]
185+ for ( var i = 0 , childNodes = node . childNodes , len = childNodes . length ; i < len ; i ++ ) {
186+ tmp . push ( childNodes [ i ] )
187+ }
188+ _ . each ( tmp , function ( childNode /*, index*/ ) {
183189 scanNode ( childNode )
184190 } )
185191 }
You can’t perform that action at this time.
0 commit comments