How to use the ember-cli/lib/broccoli/ember-app.env function in ember-cli

To help you get started, we’ve selected a few ember-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nickschot / ember-lux-starter-app / client / ember-cli-build.js View on Github external
module.exports = function(defaults) {
  var app = new EmberApp(defaults, {
    // Add options here
    sourcemaps: {
      enabled: EmberApp.env() !== 'production',
      extensions: ['js']
    },
    lessOptions: {
      paths: [
        'bower_components/semantic-ui'
      ]
    },

    //TODO: these are broken in semantic-ui 2.0.1, change values in config/environment too
    SemanticUI: {
      // These flags allow you do turn on or off auto imports for Semantic UI
      import: {
        css: false,
        javascript: true,
        images: false,
        fonts: true
github NullVoxPopuli / ember-three-boxes-demo / ember-cli-build.js View on Github external
module.exports = function(defaults) {
  let environment = EmberApp.env();
  let isProduction = environment === 'production';

  let app = new EmberApp(defaults, {
    // Add options here

    'ember-cli-babel': {
      includePolyfill: false,
      disablePresetEnv: true,
      disableDebugTooling: isProduction,
      includeExternalHelpers: true,
      // Will not build if uncommented:
      // disableEmberModulesAPIPolyfill: true
      // compileModules: false,
    },
  });
github salsify / ember-css-modules / packages / ember-css-modules / lib / plugin / registry.js View on Github external
computeOptions(includerOptions) {
    let env = EmberApp.env();
    let baseOptions = merge({}, includerOptions);
    baseOptions.plugins = normalizePostcssPlugins(baseOptions.plugins);

    let pluginOptions = this._computePluginOptions(env, baseOptions);
    return merge(pluginOptions, baseOptions);
  }
github sanctuarycomputer / studio / PROFIT_SHARE_CALCULATOR / ember-cli-build.js View on Github external
module.exports = function(defaults) {
  var env = EmberApp.env() || 'development';
  var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;

  var fingerprintOptions = {
    enabled: true,
    extensions: ['js', 'css', 'png', 'jpg', 'gif', 'svg']
  };

  var origin;
  switch (env) {
    case 'production':
      origin = 'http://profit.sanctuary.computer/';
      fingerprintOptions.prepend = origin;
    break;
  }

  let app = new EmberApp(defaults, {
github ember-graphql / ember-apollo-client / lib / webpack-dependency-plugin.js View on Github external
return new Promise((resolve, reject) => {
      webpack(
        {
          entry: this._entryPath(),
          plugins: [
            new webpack.DefinePlugin({
              'process.env.NODE_ENV': JSON.stringify(EmberApp.env()),
            }),
          ],
          output: {
            library: `-${this.options.outputName}-bundle`,
            libraryTarget: 'amd',
            path: this.outputPath,
            filename: `-${this.options.outputName}-bundle.js`,
          },
        },
        error => {
          if (error) {
            reject(error);
          } else {
            resolve();
          }
        }
github ghedamat / ember-deploy-demo / edd-cli / ember-cli-build.js View on Github external
module.exports = function(defaults) {
  var env = EmberApp.env()|| 'development';
  var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;

  var fingerprintOptions = {
    enabled: true,
    extensions: ['js', 'css', 'png', 'jpg', 'gif']
  };

  switch (env) {
    case 'development':
      fingerprintOptions.prepend = 'http://localhost:4200/';
    break;
    case 'staging':
      fingerprintOptions.prepend = 'TODO';
    break;
    case 'production':
      fingerprintOptions.prepend = 'https://d34ffs4dj251fe.cloudfront.net/';
github ember-cli / ember-twiddle / ember-cli-build.js View on Github external
module.exports = function() {
  var EmberApp = require('ember-cli/lib/broccoli/ember-app');
  var funnel = require('broccoli-funnel');
  var concat = require('broccoli-concat');
  var mergeTrees = require('broccoli-merge-trees');
  var pickFiles = require('broccoli-static-compiler');
  var babelTranspiler = require('broccoli-babel-transpiler');
  var env = EmberApp.env();
  var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;
  var prepend = null;

  if(isProductionLikeBuild) {
    prepend = env==='production' ? '//assets.ember-twiddle.com/' : '//canary-assets.ember-twiddle.com/';
  }

  var blueprintsCode = getEmberCLIBlueprints();

  var app = new EmberApp({
    SRI: {
      runsIn: "production"
    },
    fingerprint: {
      enabled: isProductionLikeBuild,
      prepend: prepend,
github ilios / frontend / ember-cli-build.js View on Github external
module.exports = function(defaults) {
  const env = EmberApp.env() || 'development';
  const isProductionLikeBuild = ['production', 'staging', 'preview'].indexOf(env) > -1;
  const isTestBuild = env === 'test';

  const app = new EmberApp(defaults, {
    fingerprint: {
      extensions: broccoliAssetRevDefaults.extensions.concat(['webmanifest', 'svg']),
      enabled: isProductionLikeBuild,
    },
    sourcemaps: {
      enabled: true,
    },
    minifyCSS: { enabled: isProductionLikeBuild },
    minifyJS: { enabled: isProductionLikeBuild },

    tests: env.EMBER_CLI_TEST_COMMAND || !isProductionLikeBuild,
    hinting: isTestBuild,
github mirego / ember-boilerplate / ember-cli-build.js View on Github external
'use strict';

const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const browsers = require('./config/supported-browsers');

const IS_TEST_ENVIRONMENT = EmberApp.env() === 'test';

const buildFingerPrintPrepend = ({
  ASSETS_CDN_HOST,
  ASSETS_CDN_PROTOCOL,
  ASSETS_CDN_PATH
}) => {
  if (!ASSETS_CDN_HOST || !ASSETS_CDN_PROTOCOL) return '';
  return `${ASSETS_CDN_PROTOCOL}://${ASSETS_CDN_HOST}/${ASSETS_CDN_PATH}`;
};

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    'hinting': false,
    'storeConfigInMeta': false,
    'tests': IS_TEST_ENVIRONMENT,
github salsify / milestones / packages / ember / index.js View on Github external
_shouldStripMilestones() {
    let options = this._milestonesOptions();
    if ('stripMilestones' in options) {
      return options.stripMilestones;
    } else {
      return EmberApp.env() === 'production';
    }
  },
};