You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improvements were made in requireBuild.wrapPath in #764 but we can take one more step to improve it further. Here's an (untested) change that uses the requirejs API for setting the wrap. This is better because it consolidates the wrap information and reuses the requirejs API instead of creating a different, more limited API.
Index: js/grunt/buildRunnable.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================--- js/grunt/buildRunnable.js (revision 7eb2ddb2b66bdc53676cc6bc586cbee2d7b67201)+++ js/grunt/buildRunnable.js (date 1562941432000)@@ -73,7 +73,10 @@
insertRequire: repo + '-main',
instrument: instrument,
brand: brand,
- wrapPath: 'phet.chipper.runRequireJS'+ wrap: {+ start: 'phet.chipper.runRequireJS = function(){',+ end: '};'+ }
} );
// Debug version is independent of passed in minifyOptions. PhET-iO brand is minified, but leaves assertions & logging.
Index: js/grunt/requireBuild.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================--- js/grunt/requireBuild.js (revision 7eb2ddb2b66bdc53676cc6bc586cbee2d7b67201)+++ js/grunt/requireBuild.js (date 1562941445000)@@ -26,10 +26,7 @@
module.exports = function( repo, mainConfigFile, options ) {
const {
- // {string|null} - If provided, the contents of the require.js build will be wrapped inside a function that is- // assigned to the given path (e.g. phet.chipper.runRequireJS).- wrapPath = null,-+ wrap = false, // same as requirejs api
insertRequire = false,
instrument = false,
brand = 'phet'
@@ -57,10 +54,7 @@
optimize: 'none',
- wrap: wrapPath ? {- start: `${wrapPath} = function() {`,- end: '};'- } : false,+ wrap: wrap,
// Avoid optimization names that are outside the baseUrl, see http://requirejs.org/docs/optimization.html#pitfalls
paths: {
The text was updated successfully, but these errors were encountered:
From #764
Improvements were made in requireBuild.wrapPath in #764 but we can take one more step to improve it further. Here's an (untested) change that uses the requirejs API for setting the
wrap
. This is better because it consolidates the wrap information and reuses the requirejs API instead of creating a different, more limited API.The text was updated successfully, but these errors were encountered: