github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/ember-cli-build.js (about)

     1  /* eslint-env node */
     2  const EmberApp = require('ember-cli/lib/broccoli/ember-app');
     3  
     4  const environment = EmberApp.env();
     5  const isProd = environment === 'production';
     6  const isTest = environment === 'test';
     7  
     8  module.exports = function (defaults) {
     9    let app = new EmberApp(defaults, {
    10      svg: {
    11        paths: [
    12          'node_modules/@hashicorp/structure-icons/dist',
    13          'public/images/icons',
    14        ],
    15        optimize: {
    16          plugins: [{ removeViewBox: false }],
    17        },
    18      },
    19      codemirror: {
    20        modes: ['javascript', 'ruby'],
    21      },
    22      babel: {
    23        include: ['proposal-optional-chaining'],
    24        plugins: [
    25          '@babel/plugin-proposal-object-rest-spread',
    26          require.resolve('ember-auto-import/babel-plugin'),
    27        ],
    28      },
    29      'ember-cli-babel': {
    30        includePolyfill: isProd,
    31      },
    32      hinting: isTest,
    33      tests: isTest,
    34    });
    35  
    36    // Use `app.import` to add additional libraries to the generated
    37    // output files.
    38    //
    39    // If you need to use different assets in different
    40    // environments, specify an object as the first parameter. That
    41    // object's keys should be the environment name and the values
    42    // should be the asset to use in that environment.
    43    //
    44    // If the library that you are including contains AMD or ES6
    45    // modules that you would like to import into your application
    46    // please specify an object with the list of modules as keys
    47    // along with the exports of each module as its value.
    48  
    49    app.import('node_modules/xterm/css/xterm.css');
    50    app.import('node_modules/jsonlint/lib/jsonlint.js');
    51    app.import('node_modules/codemirror/addon/lint/lint.css');
    52    app.import('node_modules/codemirror/lib/codemirror.css');
    53  
    54    return app.toTree();
    55  };