Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
* Added trim polyfill #173
* Replaced Regex with `slice(-1)` and other code improvements #173
* The library now can be used in `<head>` without additional initialization scripting required, also exposes `BSN:{version,supports,initCallback}` object to the global object
* Updated V4 Popover to latest Bootstrap beta.
* code cleanup and other improvements
  • Loading branch information
thednp committed Nov 23, 2017
1 parent f032cef commit c04d3c8
Show file tree
Hide file tree
Showing 31 changed files with 380 additions and 288 deletions.
7 changes: 5 additions & 2 deletions build-v4.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ Promise.all(promises)
.catch(error);

function wrap(main) {
var utils = fs.readFileSync(`${libPath}/V4/utils.js`, 'utf8').split('\n').join('\n '); // Indentation
main = main.split('\n').join('\n '); // Indentation
var utils = fs.readFileSync(`${libPath}/V4/utils.js`, 'utf8').split('\n').join('\n ');
var init = fs.readFileSync(`${libPath}/V4/utils-init.js`, 'utf8').split('\n').join('\n ');
main = main.split('\n').join('\n ');
// Initialize arrays:
// Arrays will be used in the template literal below
var rootAttachments = [];
Expand All @@ -135,7 +136,9 @@ function wrap(main) {
}
}(this, function () {
${utils}
BSN.version = '${pack.version}';
${main}
${init}
return {
${returns.join(',\n ')/* add indentation and comma */}
};
Expand Down
7 changes: 5 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ Promise.all(promises)
.catch(error);

function wrap(main) {
var utils = fs.readFileSync(`${libPath}/V3/utils.js`, 'utf8').split('\n').join('\n '); // Indentation
main = main.split('\n').join('\n '); // Indentation
var utils = fs.readFileSync(`${libPath}/V3/utils.js`, 'utf8').split('\n').join('\n ');
var init = fs.readFileSync(`${libPath}/V3/utils-init.js`, 'utf8').split('\n').join('\n ');
main = main.split('\n').join('\n ');
// Initialize arrays:
// Arrays will be used in the template literal below
var rootAttachments = [];
Expand All @@ -135,7 +136,9 @@ function wrap(main) {
}
}(this, function () {
${utils}
BSN.version = '${pack.version}';
${main}
${init}
return {
${returns.join(',\n ')/* add indentation and comma */}
};
Expand Down

0 comments on commit c04d3c8

Please sign in to comment.