ember-cli-build.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. /* global require, module */
  19. var Funnel = require("broccoli-funnel");
  20. var EmberApp = require('ember-cli/lib/broccoli/ember-app');
  21. module.exports = function(defaults) {
  22. var isProd = EmberApp.env() === 'production';
  23. var app = new EmberApp(defaults, {
  24. storeConfigInMeta: false,
  25. minifyCSS: {
  26. enabled: isProd
  27. },
  28. minifyJS: {
  29. // Will be minified by wro4j-maven-plugin for performance
  30. enabled: false,
  31. },
  32. fingerprint: {
  33. enabled: false
  34. },
  35. sourcemaps: {
  36. enabled: !isProd
  37. }
  38. });
  39. app.import("bower_components/datatables/media/css/jquery.dataTables.min.css");
  40. app.import("bower_components/datatables/media/js/jquery.dataTables.min.js");
  41. app.import("bower_components/momentjs/min/moment.min.js");
  42. app.import("bower_components/select2/dist/css/select2.min.css");
  43. app.import("bower_components/select2/dist/js/select2.min.js");
  44. app.import('bower_components/jquery-ui/jquery-ui.js');
  45. app.import('bower_components/more-js/dist/more.js');
  46. app.import('bower_components/bootstrap/dist/css/bootstrap.css');
  47. app.import('bower_components/bootstrap/dist/css/bootstrap-theme.css');
  48. app.import('bower_components/bootstrap/dist/js/bootstrap.min.js');
  49. // Use `app.import` to add additional libraries to the generated
  50. // output files.
  51. //
  52. // If you need to use different assets in different
  53. // environments, specify an object as the first parameter. That
  54. // object's keys should be the environment name and the values
  55. // should be the asset to use in that environment.
  56. //
  57. // If the library that you are including contains AMD or ES6
  58. // modules that you would like to import into your application
  59. // please specify an object with the list of modules as keys
  60. // along with the exports of each module as its value.
  61. var extraAssets = new Funnel('config', {
  62. srcDir: '/',
  63. include: ['*.env'],
  64. destDir: '/config'
  65. });
  66. return app.toTree(extraAssets);
  67. };