1
0
mirror of https://codeberg.org/nobody/LocalCDN.git synced 2025-02-14 19:00:58 +01:00
2020-11-17 06:11:12 +01:00

9 lines
5.5 KiB
JavaScript

/**
* Minified by jsDelivr using Terser v5.3.5.
* Original file: /npm/ember-source@3.23.0/lib/index.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
"use strict";const MergeTrees=require("broccoli-merge-trees"),Funnel=require("broccoli-funnel"),path=require("path"),resolve=require("resolve"),concatBundle=require("./concat-bundle"),buildDebugMacroPlugin=require("./build-debug-macro-plugin"),buildStripClassCallcheckPlugin=require("./build-strip-class-callcheck-plugin"),injectBabelHelpers=require("./transforms/inject-babel-helpers").injectBabelHelpers,debugTree=require("broccoli-debug").buildDebugCallback("ember-source:addon"),PRE_BUILT_TARGETS=["last 1 Chrome versions","last 1 Firefox versions","last 1 Safari versions"],paths={},absolutePaths={};function add(e,t,r){Object.defineProperty(e,t,{configurable:!1,get:function(){return r}})}add(paths,"prod","vendor/ember/ember.js"),add(paths,"debug","vendor/ember/ember.js"),add(paths,"testing","vendor/ember/ember-testing.js"),add(paths,"jquery","vendor/ember/jquery/jquery.js"),add(absolutePaths,"templateCompiler",path.join(__dirname,"..","dist","ember-template-compiler.js")),module.exports={init(){this._super.init&&this._super.init.apply(this,arguments),"ember"in this.project.bowerDependencies()&&this.ui.writeWarnLine("Ember.js is now provided by node_module `ember-source`, please remove it from bower"),this.root=path.join(__dirname,".."),this.treePaths.vendor="dist"},name:"ember-source",paths:paths,absolutePaths:absolutePaths,included(){this._super.included.apply(this,arguments);const{has:e}=require("@ember/edition-utils");if(e("octane")){let e=this.project.addons.find((e=>"@ember/optional-features"===e.name)),t=void 0===e,r=[];if(t&&r.push("* the @ember/optional-features addon is missing, run `ember install @ember/optional-features` to install it"),(t||"function"!=typeof e.isFeatureExplicitlySet)&&r.push("* Unable to detect if jquery-integration is explicitly set to a value, please update `@ember/optional-features` to the latest version"),(t||"function"==typeof e.isFeatureExplicitlySet&&!e.isFeatureExplicitlySet("jquery-integration"))&&r.push("* The jquery-integration optional feature should be explicitly set to a value under Octane, run `ember feature:disable jquery-integration` to disable it, or `ember feature:enable jquery-integration` to explicitly enable it"),(t||e.isFeatureEnabled("application-template-wrapper"))&&r.push("* The application-template-wrapper optional feature should be disabled under Octane, run `ember feature:disable application-template-wrapper` to disable it"),!t&&e.isFeatureEnabled("template-only-glimmer-components")||r.push("* The template-only-glimmer-components optional feature should be enabled under Octane, run `ember feature:enable template-only-glimmer-components` to enable it"),r.length>0){r.unshift("You have configured your application to indicate that it is using the 'octane' edition (via `setEdition('octane')`), but the appropriate Octane features were not enabled:\n");throw new(require("silent-error"))(r.join("\n\t"))}}},transpileTree(e,t,r){let i=this.addons.find((e=>"ember-cli-babel"===e.name)),n=this.parent&&this.parent.options,s=this.app&&this.app.options,a=(n||s||{}).babel,l="ember-source"===this.project.name(),o=injectBabelHelpers(l),u={"ember-cli-babel":{disableDebugTooling:!0,disableEmberModulesAPIPolyfill:!0},babel:Object.assign({},a,{loose:!0,plugins:[o,buildDebugMacroPlugin(!t),[require.resolve("@babel/plugin-transform-block-scoping"),{throwIfClosureRequired:!0}],[require.resolve("@babel/plugin-transform-object-assign")]]})};return void 0!==r&&(u["ember-cli-babel"].compileModules=r),t&&u.babel.plugins.push(buildStripClassCallcheckPlugin()),i.transpileTree(e,u)},buildEmberBundles(e,t){let r=this.transpileTree(new Funnel(e,{srcDir:"packages"}),t),i=this.transpileTree(new Funnel(e,{srcDir:"dependencies"}),t),n=this.transpileTree(new Funnel(e,{srcDir:"header"}),t,!1),s=new MergeTrees([new Funnel(r,{exclude:t?["ember-testing/**"]:[]}),i,n]),a=new MergeTrees([new Funnel(r,{include:["@ember/debug/lib/**","@ember/debug/index.js","ember-testing/index.js","ember-testing/lib/**"]}),n]);return new MergeTrees([concatBundle(s,{outputFile:"ember.js",footer:"require('ember');"}),concatBundle(a,{outputFile:"ember-testing.js",footer:"\n var testing = require('ember-testing');\n Ember.Test = testing.Test;\n Ember.Test.Adapter = testing.Adapter;\n Ember.Test.QUnitAdapter = testing.QUnitAdapter;\n Ember.setupForTesting = testing.setupForTesting;\n "})])},treeForVendor(e){let t;try{t=path.dirname(resolve.sync("jquery/package.json",{basedir:this.project.root}))}catch(e){t=path.dirname(require.resolve("jquery/package.json"))}let r,i=new Funnel(t+"/dist",{destDir:"ember/jquery",files:["jquery.js"]}),n=new Funnel(e,{destDir:"ember",include:["ember-template-compiler.js","ember-template-compiler.map"]}),s=this.project&&this.project.targets&&this.project.targets.browsers||[];const a="production"===process.env.EMBER_ENV;return r=!a&&PRE_BUILT_TARGETS.every((e=>s.includes(e)))&&s.length===PRE_BUILT_TARGETS.length?new Funnel(e,{destDir:"ember",include:["ember.debug.js","ember.debug.map","ember-testing.js","ember-testing.map"],getDestinationPath:e=>e.replace("ember.debug.","ember.")}):new Funnel(this.buildEmberBundles(e,a),{destDir:"ember"}),debugTree(new MergeTrees([r,n,i]),"vendor:final")}};
//# sourceMappingURL=/sm/5d7ab3afaedc1cd415fb8a5368b3bfd79a1012ddb58541afbed48f02ad7c0fb3.map