Skip to content

Commit

Permalink
Use requirejs method for versioning script files.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtoups committed Aug 22, 2021
1 parent 12efeb7 commit 7428f58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<!-- /ko -->
<a class="privacy-policy" data-bind="click: (data, event) => launchModal('privacyPolicy')">Privacy Policy</a>
</main>
<script async data-main="scripts/rConfig" src="scripts/vendor/require.js?v=4"></script>
<script async data-main="scripts/rConfig" src="scripts/vendor/require.js"></script>
<!-- Statcounter -->
<script type="text/javascript">
var sc_project=12576814;
Expand Down
4 changes: 3 additions & 1 deletion scripts/rConfig.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const version = 0;
requirejs.config({
baseUrl: 'scripts',
paths: {
Expand All @@ -9,7 +10,8 @@ requirejs.config({
'inputMode': 'utils/inputModeSwitcher',
'optionsPlaceholder': 'utils/optionsPlaceholder',
'transitionState': 'utils/transitionState'
}
},
urlArgs: "v=" + version
});

requirejs(['main']);
4 changes: 3 additions & 1 deletion scripts/viewPoem.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const version = 0;
requirejs.config({
baseUrl: '../scripts',
paths: {
'ko': 'vendor/knockout',
'text': 'vendor/text',
'api': 'utils/api',
'transitionState': 'utils/transitionState'
}
},
urlArgs: "v=" + version
});

requirejs(['main']);

0 comments on commit 7428f58

Please sign in to comment.