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
Copy file name to clipboardExpand all lines: README.md
+23-12Lines changed: 23 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -362,16 +362,21 @@ The amdclean `clean()` method accepts a string or an object. Below is an exampl
362
362
amdclean.clean({
363
363
// The source code you would like to be 'cleaned'
364
364
'code':'',
365
-
// The relative file path of the file to be cleaned. Use this option if you are not using the code option.
365
+
// The relative file path of the file to be cleaned. Use this option if you
366
+
// are not using the code option.
366
367
// Hint: Use the __dirname trick
367
368
'filePath':'',
368
369
// The modules that you would like to set as window properties
369
370
// An array of strings (module names)
370
371
'globalModules': [],
371
-
// Determines if all of your local modules are stored in a single global object (helps with scoping in certain cases)
372
+
// Determines if all of your local modules are stored in a single global
373
+
// object (helps with scoping in certain cases)
372
374
'globalObject':false,
373
-
// Determines the name of your global object that stores all of your global modules
374
-
// Note: If using a global object, try to override this name with a smaller name since it will be referenced throughout the code (don't worry about it if you are using a minifier)
375
+
// Determines the name of your global object that stores all of your global
376
+
// modules
377
+
// Note: If using a global object, try to override this name with a smaller
378
+
// name since it will be referenced throughout the code (don't worry
379
+
// about it if you are using a minifier)
375
380
'globalObjectName':'amdclean',
376
381
// All esprima API options are supported: http://esprima.org/doc/
377
382
'esprima': {
@@ -384,7 +389,8 @@ amdclean.clean({
384
389
'escodegen': {
385
390
'comment':true
386
391
},
387
-
// If there is a comment (that contains the following text) on the same line or one line above a specific module, the module will not be removed
392
+
// If there is a comment (that contains the following text) on the same line
393
+
// or one line above a specific module, the module will not be removed
388
394
'commentCleanName':'amdclean',
389
395
// The ids of all of the modules that you would not like to be 'cleaned'
390
396
'ignoreModules': [],
@@ -394,23 +400,28 @@ amdclean.clean({
394
400
'removeAllRequires':false,
395
401
// Determines if all of the 'use strict' statements will be removed
396
402
'removeUseStricts':true,
397
-
// Allows you to pass an expression that will override shimmed modules return values
398
-
// e.g. { 'backbone': 'window.Backbone' }
403
+
// Allows you to pass an expression that will override shimmed modules return
404
+
//values e.g. { 'backbone': 'window.Backbone' }
399
405
'shimOverrides': {},
400
-
// Prevents multiple global objects from being instantiated when using the onBuildWrite Require.js hook
406
+
// Prevents multiple global objects from being instantiated when using the
407
+
// onBuildWrite Require.js hook
401
408
// Set this to false if you are using AMDClean for more than one build AND
402
409
// are using the onModuleBundleComplete Require.js hook
403
410
'rememberGlobalObject':true,
404
-
// Determines how to prefix a module name with when a non-JavaScript compatible character is found
411
+
// Determines how to prefix a module name with when a non-JavaScript
0 commit comments