File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed
tools/benchmarks/browser-build Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ var build = require( '@stdlib/tools/benchmarks/browser-build' );
2525
2626Given a ` root ` directory from which to search for benchmarks and an output directory, build assets for running benchmarks in a web browser.
2727
28+ <!-- eslint-disable no-redeclare -->
29+
2830``` javascript
2931var cwd = require ( ' @stdlib/utils/cwd' );
3032
@@ -55,6 +57,8 @@ The function accepts the following `options`:
5557
5658To provide an alternative glob pattern, set the ` pattern ` option.
5759
60+ <!-- eslint-disable no-redeclare -->
61+
5862``` javascript
5963var cwd = require ( ' @stdlib/utils/cwd' );
6064
@@ -81,6 +85,8 @@ function clbk( error, bool ) {
8185
8286To mount a bundle on a URL path, set the ` mount ` option.
8387
88+ <!-- eslint-disable no-redeclare -->
89+
8490``` javascript
8591var cwd = require ( ' @stdlib/utils/cwd' );
8692
@@ -123,6 +129,8 @@ function clbk( error, bool ) {
123129
124130## Examples
125131
132+ <!-- eslint-disable no-redeclare -->
133+
126134``` javascript
127135var join = require ( ' path' ).join ;
128136var resolve = require ( ' path' ).resolve ;
Original file line number Diff line number Diff line change @@ -5,26 +5,26 @@ var resolve = require( 'path' ).resolve;
55var mkdirp = require ( 'mkdirp' ) . sync ;
66var build = require ( './../lib' ) ;
77
8- var root = join ( __dirname , 'fixtures' ) ;
8+ var root = join ( __dirname , 'fixtures' ) ; // eslint-disable-line no-redeclare
99var out = resolve ( __dirname , '../build' ) ;
1010
1111mkdirp ( out ) ;
1212
1313var opts = {
14- 'pattern' : 'index.js' ,
15- 'bundle' : 'benchmark_bundle.js' ,
16- 'html' : 'benchmarks.html'
14+ 'pattern' : 'index.js' ,
15+ 'bundle' : 'benchmark_bundle.js' ,
16+ 'html' : 'benchmarks.html'
1717} ;
1818
1919build ( root , out , opts , clbk ) ;
2020
2121function clbk ( error , bool ) {
22- if ( error ) {
23- throw error ;
24- }
25- if ( bool ) {
26- console . log ( 'Success!' ) ;
27- } else {
28- console . log ( 'No generated assets.' ) ;
29- }
22+ if ( error ) {
23+ throw error ;
24+ }
25+ if ( bool ) {
26+ console . log ( 'Success!' ) ;
27+ } else {
28+ console . log ( 'No generated assets.' ) ;
29+ }
3030}
You can’t perform that action at this time.
0 commit comments