build.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * IBM Confidential OCO Source Materials IBM Business Platform: BA Glass
  3. * (C) Copyright IBM Corp. 2018
  4. *
  5. * The source code for this program is not published or otherwise divested of
  6. * its trade secrets, irrespective of what has been deposited with the U.S.
  7. * Copyright Office
  8. */
  9. {
  10. appDir: '..',
  11. baseUrl: '.',
  12. mainConfigFile: './config.js',
  13. dir: '../tmp',
  14. fileExclusionRegExp: /^(rjs)$|^\.|^doc|^stylesheets|^tests|^images|^Gruntfile\.js$|^jsdoc|^jsDocs|^README\.md$|^version$|^package\.json$/,
  15. modules: [{
  16. name: 'glass-deps.min',
  17. include: [
  18. // Third party dependencies
  19. 'bootstrap',
  20. 'bluebird',
  21. 'ca-ui-toolkit-core',
  22. 'classnames',
  23. 'doT',
  24. 'hammerjs',
  25. 'i18n',
  26. 'jquery',
  27. 'jquery-bbq',
  28. 'jquery-ui',
  29. 'jquery.hammer',
  30. 'mobx',
  31. 'mobx-react',
  32. 'mobx-state-tree',
  33. 'polyglot',
  34. 'prop-types',
  35. 'react',
  36. 'react-dnd',
  37. 'react-dom',
  38. 'requirejs',
  39. 'text',
  40. 'toastr',
  41. 'touch-punch',
  42. 'underscore'
  43. ],
  44. create: true
  45. }, {
  46. name: 'glass.min',
  47. include: [
  48. // Glass client code
  49. 'baglass/api/all',
  50. 'baglass/app/AppController',
  51. 'baglass/app/ContentView',
  52. 'baglass/app/plugins/all',
  53. 'baglass/common/ui/all',
  54. 'baglass/common/views/all',
  55. 'baglass/services/LogService',
  56. 'baglass/nls/BAGlassResources',
  57. 'baglass/nls/root/BAGlassResources',
  58. 'baglass/utils/ThemeUtils',
  59. 'baglass/core-client/js/core-client/ui/dialogs/MessageBox',
  60. 'baglass/core-client/js/core-client/ui/dialogs/ConfirmationDialog',
  61. 'baglass/core-client/js/core-client/ui/content/dialog/ShareDialog',
  62. 'baglass/core-client/js/core-client/ui/content/dialog/EmbedDialog',
  63. 'core-client/utils/Promise'
  64. ],
  65. exclude: [
  66. 'glass-deps.min'
  67. ],
  68. create: true
  69. }],
  70. optimize: 'uglify2',
  71. optimizeCss: 'none',
  72. skipDirOptimize: true,
  73. generateSourceMaps: false,
  74. preserveLicenseComments: false, // Must be set to false for generateSourceMaps to work, see http://requirejs.org/docs/errors.html#sourcemapcomments
  75. removeCombined: false, // If true, optimizer will remove concatenated files from the output directory.
  76. skipPragmas: true,
  77. wrapShim: true
  78. }