Skip to content

Commit

Permalink
Added autoInitDataAPI build options to build options help
Browse files Browse the repository at this point in the history
  • Loading branch information
thednp committed Jan 21, 2019
1 parent 21a0e06 commit 71d8eaf
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 37 deletions.
4 changes: 4 additions & 0 deletions build-v4.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ var argv = require('yargs')
only: {
type: 'array',
describe: 'Only include the given module(s) in the bundle'
},
autoInitDataAPI: {
type: 'boolean',
describe: 'Include the auto-initialization utility in the bundle'
}
})
.help()
Expand Down
6 changes: 5 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ var argv = require('yargs')
only: {
type: 'array',
describe: 'Only include the given module(s) in the bundle'
}
},
autoInitDataAPI: {
type: 'boolean',
describe: 'Include the auto-initialization utility in the bundle'
}
})
.coerce(['ignore', 'only'], getModuleNames)
.help()
Expand Down
17 changes: 0 additions & 17 deletions dist/bootstrap-native-v4.js
Original file line number Diff line number Diff line change
Expand Up @@ -1871,23 +1871,6 @@
supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );



/* Native Javascript for Bootstrap 4 | Initialize Data API
--------------------------------------------------------*/
var initializeDataAPI = function( constructor, collection ){
for (var i=0, l=collection[length]; i<l; i++) {
new constructor(collection[i]);
}
},
initCallback = BSN.initCallback = function(lookUp){
lookUp = lookUp || DOC;
for (var i=0, l=supports[length]; i<l; i++) {
initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
}
};

// bulk initialize all components
DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );

return {
Alert: Alert,
Expand Down
2 changes: 1 addition & 1 deletion dist/bootstrap-native-v4.min.js

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions dist/bootstrap-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -1910,23 +1910,6 @@
supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );



/* Native Javascript for Bootstrap 3 | Initialize Data API
--------------------------------------------------------*/
var initializeDataAPI = function( constructor, collection ){
for (var i=0, l=collection[length]; i<l; i++) {
new constructor(collection[i]);
}
},
initCallback = BSN.initCallback = function(lookUp){
lookUp = lookUp || DOC;
for (var i=0, l=supports[length]; i<l; i++) {
initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
}
};

// bulk initialize all components
DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );

return {
Affix: Affix,
Expand Down
2 changes: 1 addition & 1 deletion dist/bootstrap-native.min.js

Large diffs are not rendered by default.

0 comments on commit 71d8eaf

Please sign in to comment.