Skip to content

Commit 3006d4f

Browse files
committed
Fix invalid slash in popper.js
Template didn't fix slashes for freeform path
1 parent 9d9c674 commit 3006d4f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

_new/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,18 @@ module.exports = class extends Generator {
112112
path
113113
.normalize(answers.pkg.browser || answers.pkg.main)
114114
.replace(/\\/g, '/'),
115-
filter: libraryPath => libraryPath.replace(/\\/g, '/'),
115+
filter: relativePath => relativePath.replace(/\\/g, '/'),
116116
},
117117
{
118118
type: 'input',
119119
name: 'relativePath',
120120
message: 'What is the main JavaScript file?',
121121
when: answers => answers.relativePath === 'Other',
122+
default: answers =>
123+
path
124+
.normalize(answers.pkg.browser || answers.pkg.main)
125+
.replace(/\\/g, '/'),
126+
filter: relativePath => relativePath.replace(/\\/g, '/'),
122127
},
123128
{
124129
type: 'list',

popper.js/popper.js.dnn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<fileName>popper.min.js</fileName>
2323
<preferredScriptLocation>BodyBottom</preferredScriptLocation>
2424
<objectName>Popper</objectName>
25-
<cdnUrl>https://cdn.jsdelivr.net/npm/popper.js@<~=version~>/dist\popper.min.js</cdnUrl>
25+
<cdnUrl>https://cdn.jsdelivr.net/npm/popper.js@<~=version~>/dist/popper.min.js</cdnUrl>
2626
</javaScriptLibrary>
2727
</component>
2828
<component type="JavaScriptFile">

0 commit comments

Comments
 (0)