@teambit/babel 1.0.108 → 1.0.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/preview/teambit_compilation_babel-preview.js +1 -0
- package/dist/{preview-1703647408454.js → preview-1703698405864.js} +2 -2
- package/package.json +8 -8
- package/babel.aspect.ts +0 -5
- package/babel.compiler.ts +0 -175
- package/babel.main.runtime.ts +0 -31
- package/compiler-options.ts +0 -22
- package/index.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.compilation/babel-preview"]=t():e["teambit.compilation/babel-preview"]=t()}(self,(()=>(()=>{"use strict";var e={17856:(e,t,o)=>{var n={id:"teambit.compilation/babel@1.0.109",homepage:"https://bit.cloud/teambit/compilation/babel",exported:!0};function r(){const e=i(o(87363));return r=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,r.__bit_component=n,i.__bit_component=n;const a=()=>r().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},r().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/babel.svg"}));a.__bit_component=n,t.Logo=a},76694:(e,t,o)=>{var n={id:"teambit.compilation/aspect-docs/babel@0.0.166",homepage:"https://bit.cloud/teambit/compilation/aspect-docs/babel",exported:!0};Object.defineProperty(t,"__esModule",{value:!0}),t.default=b,a(o(87363));var r=o(40040),i=["components"];function a(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},p.apply(this,arguments)}function l(e,t){if(null==e)return{};var o,n,r=s(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function s(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}a.__bit_component=n,p.__bit_component=n,l.__bit_component=n,s.__bit_component=n;var c={},m="wrapper";function b(e){var t=e.components,o=l(e,i);return(0,r.mdx)(m,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"This compiler utilizes the programmatic API of Babel to transpile files. See the compiler-options.ts for more data how to pass Babel options to the compiler."),(0,r.mdx)("p",null,"Note that to isolate the components from different Babel config files on the machine, the following two props are set to false (if they weren't passed in the options): ",(0,r.mdx)("inlineCode",{parentName:"p"},"configFile")," and ",(0,r.mdx)("inlineCode",{parentName:"p"},"babelrc"),"."),(0,r.mdx)("h2",null,"FAQ"),(0,r.mdx)("p",null,(0,r.mdx)("em",{parentName:"p"},"Q"),": I'm getting an error about missing plugins."),(0,r.mdx)("p",null,(0,r.mdx)("em",{parentName:"p"},"A"),": make sure that workspace.jsonc has the plugins and that you ran ",(0,r.mdx)("inlineCode",{parentName:"p"},"bit install"),".\nExample of the workspace.jsonc settings:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},'"my-babel-env": {\n "teambit.bit/aspect": {},\n "teambit.bit/dependency-resolver": {\n "policy": {\n "dependencies": {\n "@babel/core": "7.11.6",\n "@babel/preset-react": "7.22.15",\n "@babel/preset-env": "7.22.15",\n "@babel/preset-typescript": "7.22.15",\n "@babel/plugin-transform-class-properties": "7.22.5"\n }\n }\n }\n },\n')),(0,r.mdx)("ol",{start:2},(0,r.mdx)("li",{parentName:"ol"},"You're not using the plugin.\nThe reason for the error is that Babel searches for config files in different directories. To disable this, add the following to the config you pass to the compiler:")),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre"},'{\n ...\n "babelrc": false,\n "configFile": false,\n}\n')),(0,r.mdx)("p",null,"this takes care of both .babelrc and babel.config.json."))}b.__bit_component=n,b.isMDXComponent=!0},53802:(e,t,o)=>{Object.defineProperty(t,"C",{enumerable:!0,get:function(){return n.default}});var n=r(o(76694));function r(e){return e&&e.__esModule?e:{default:e}}r.__bit_component={id:"teambit.compilation/aspect-docs/babel@0.0.166",homepage:"https://bit.cloud/teambit/compilation/aspect-docs/babel",exported:!0}},40040:e=>{e.exports=MdxJsReact},87363:e=>{e.exports=React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{compositions:()=>b,compositions_metadata:()=>u,overview:()=>d});var e={};o.r(e),o.d(e,{default:()=>m});var t=o(17856),r=(o(87363),o(40040));const i=TeambitMdxUiMdxScopeContext;var a=o(53802),p=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},l.apply(this,arguments)}var s={},c="wrapper";function m(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(e,p);return(0,r.mdx)(c,l({},s,o,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)(i.MDXScopeProvider,{components:{Babel:a.C},mdxType:"MDXScopeProvider"},(0,r.mdx)(a.C,{mdxType:"Babel"})))}m.isMDXComponent=!0;const b=[t],d=[e],u={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),n})()));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.109/dist/babel.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.compilation_babel@1.0.109/dist/babel.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/babel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.109",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/compilation/babel",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.compilation",
|
|
8
8
|
"name": "babel",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.109"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/core": "7.19.6",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"multimatch": "5.0.0",
|
|
16
16
|
"p-map-series": "2.1.0",
|
|
17
17
|
"@teambit/harmony": "0.4.6",
|
|
18
|
-
"@teambit/builder": "1.0.
|
|
18
|
+
"@teambit/builder": "1.0.109",
|
|
19
19
|
"@teambit/compilation.modules.babel-compiler": "0.0.137",
|
|
20
|
-
"@teambit/compiler": "1.0.
|
|
21
|
-
"@teambit/isolator": "1.0.
|
|
22
|
-
"@teambit/logger": "0.0.
|
|
23
|
-
"@teambit/cli": "0.0.
|
|
20
|
+
"@teambit/compiler": "1.0.109",
|
|
21
|
+
"@teambit/isolator": "1.0.109",
|
|
22
|
+
"@teambit/logger": "0.0.934",
|
|
23
|
+
"@teambit/cli": "0.0.841"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/fs-extra": "9.0.7",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@types/mocha": "9.1.0",
|
|
29
29
|
"@types/jest": "^29.2.2",
|
|
30
30
|
"@types/testing-library__jest-dom": "^5.9.5",
|
|
31
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
31
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.14",
|
|
32
32
|
"@teambit/compilation.aspect-docs.babel": "0.0.166"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
package/babel.aspect.ts
DELETED
package/babel.compiler.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import * as babel from '@babel/core';
|
|
2
|
-
import multimatch from 'multimatch';
|
|
3
|
-
import { flatten } from 'lodash';
|
|
4
|
-
import mapSeries from 'p-map-series';
|
|
5
|
-
import fs from 'fs-extra';
|
|
6
|
-
import { BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';
|
|
7
|
-
import { Compiler, CompilerMain, TranspileFileParams, TranspileFileOutput } from '@teambit/compiler';
|
|
8
|
-
import { Capsule } from '@teambit/isolator';
|
|
9
|
-
import { Logger } from '@teambit/logger';
|
|
10
|
-
import path from 'path';
|
|
11
|
-
import {
|
|
12
|
-
isFileSupported,
|
|
13
|
-
transpileFileContent,
|
|
14
|
-
transpileFilePathAsync,
|
|
15
|
-
replaceFileExtToJs,
|
|
16
|
-
TranspileContext,
|
|
17
|
-
} from '@teambit/compilation.modules.babel-compiler';
|
|
18
|
-
import { BabelCompilerOptions } from './compiler-options';
|
|
19
|
-
|
|
20
|
-
export class BabelCompiler implements Compiler {
|
|
21
|
-
distDir: string;
|
|
22
|
-
distGlobPatterns: string[];
|
|
23
|
-
shouldCopyNonSupportedFiles: boolean;
|
|
24
|
-
artifactName: string;
|
|
25
|
-
supportedFilesGlobPatterns: string[] | null;
|
|
26
|
-
constructor(
|
|
27
|
-
readonly id: string,
|
|
28
|
-
private logger: Logger,
|
|
29
|
-
private compiler: CompilerMain,
|
|
30
|
-
private options: BabelCompilerOptions,
|
|
31
|
-
private babelModule = babel
|
|
32
|
-
) {
|
|
33
|
-
this.distDir = options.distDir || 'dist';
|
|
34
|
-
this.distGlobPatterns = options.distGlobPatterns || [`${this.distDir}/**`, `!${this.distDir}/tsconfig.tsbuildinfo`];
|
|
35
|
-
this.shouldCopyNonSupportedFiles =
|
|
36
|
-
typeof options.shouldCopyNonSupportedFiles === 'boolean' ? options.shouldCopyNonSupportedFiles : true;
|
|
37
|
-
this.artifactName = options.artifactName || 'dist';
|
|
38
|
-
this.supportedFilesGlobPatterns = options.supportedFilesGlobPatterns
|
|
39
|
-
? flatten(options.supportedFilesGlobPatterns)
|
|
40
|
-
: null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
displayName = 'Babel';
|
|
44
|
-
deleteDistDir = false;
|
|
45
|
-
|
|
46
|
-
version() {
|
|
47
|
-
return this.babelModule.version;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
getDistDir() {
|
|
51
|
-
return this.distDir;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* compile one file on the workspace
|
|
56
|
-
*/
|
|
57
|
-
transpileFile(fileContent: string, options: TranspileFileParams): TranspileFileOutput {
|
|
58
|
-
const supportedExtensions = ['.ts', '.tsx', '.js', '.jsx'];
|
|
59
|
-
const fileExtension = path.extname(options.filePath);
|
|
60
|
-
if (!supportedExtensions.includes(fileExtension) || options.filePath.endsWith('.d.ts')) {
|
|
61
|
-
return null; // file is not supported
|
|
62
|
-
}
|
|
63
|
-
const transformOptions = this.options.babelTransformOptions || {};
|
|
64
|
-
const context: TranspileContext = {
|
|
65
|
-
filePath: options.filePath,
|
|
66
|
-
rootDir: options.componentDir,
|
|
67
|
-
};
|
|
68
|
-
const outputFiles = transpileFileContent(fileContent, context, transformOptions, this.babelModule);
|
|
69
|
-
return outputFiles;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* compile multiple components on the capsules
|
|
74
|
-
*/
|
|
75
|
-
async build(context: BuildContext): Promise<BuiltTaskResult> {
|
|
76
|
-
const capsules = context.capsuleNetwork.seedersCapsules;
|
|
77
|
-
const componentsResults: ComponentResult[] = [];
|
|
78
|
-
const longProcessLogger = this.logger.createLongProcessLogger('compile babel components', capsules.length);
|
|
79
|
-
await mapSeries(capsules, async (capsule) => {
|
|
80
|
-
const currentComponentResult: ComponentResult = {
|
|
81
|
-
errors: [],
|
|
82
|
-
component: capsule.component,
|
|
83
|
-
};
|
|
84
|
-
longProcessLogger.logProgress(capsule.component.id.toString());
|
|
85
|
-
await this.buildOneCapsule(capsule, currentComponentResult);
|
|
86
|
-
componentsResults.push({ ...currentComponentResult });
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
artifacts: this.getArtifactDefinition(),
|
|
91
|
-
componentsResults,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
createTask(name = 'BabelCompiler') {
|
|
96
|
-
return this.compiler.createTask(name, this);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
private async buildOneCapsule(capsule: Capsule, componentResult: ComponentResult) {
|
|
100
|
-
componentResult.startTime = Date.now();
|
|
101
|
-
const sourceFiles = capsule.component.filesystem.files.map((file) => file.relative);
|
|
102
|
-
await fs.ensureDir(path.join(capsule.path, this.distDir));
|
|
103
|
-
await Promise.all(
|
|
104
|
-
sourceFiles.map(async (filePath) => {
|
|
105
|
-
if (this.isFileSupported(filePath)) {
|
|
106
|
-
const absoluteFilePath = path.join(capsule.path, filePath);
|
|
107
|
-
this.options.babelTransformOptions ||= {};
|
|
108
|
-
this.options.babelTransformOptions.sourceFileName = path.basename(filePath);
|
|
109
|
-
this.options.babelTransformOptions.filename = path.basename(filePath);
|
|
110
|
-
try {
|
|
111
|
-
const result = await transpileFilePathAsync(
|
|
112
|
-
absoluteFilePath,
|
|
113
|
-
this.options.babelTransformOptions || {},
|
|
114
|
-
this.babelModule
|
|
115
|
-
);
|
|
116
|
-
if (!result || !result.length) {
|
|
117
|
-
this.logger.debug(
|
|
118
|
-
`getting an empty response from Babel for the file ${filePath}. it might be configured to be ignored`
|
|
119
|
-
);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
// Make sure to get only the relative path of the dist because we want to add the dist dir.
|
|
123
|
-
// If we use the result outputPath we will get an absolute path here
|
|
124
|
-
const distPath = this.replaceFileExtToJs(filePath);
|
|
125
|
-
const distPathMap = `${distPath}.map`;
|
|
126
|
-
await fs.outputFile(path.join(capsule.path, this.distDir, distPath), result[0].outputText);
|
|
127
|
-
if (result.length > 1) {
|
|
128
|
-
await fs.outputFile(path.join(capsule.path, this.distDir, distPathMap), result[1].outputText);
|
|
129
|
-
}
|
|
130
|
-
} catch (err: any) {
|
|
131
|
-
componentResult.errors?.push(err);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
})
|
|
135
|
-
);
|
|
136
|
-
componentResult.endTime = Date.now();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
getArtifactDefinition() {
|
|
140
|
-
return [
|
|
141
|
-
{
|
|
142
|
-
generatedBy: this.id,
|
|
143
|
-
name: this.artifactName,
|
|
144
|
-
globPatterns: this.distGlobPatterns,
|
|
145
|
-
},
|
|
146
|
-
];
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* given a source file, return its parallel in the dists. e.g. index.ts => dist/index.js
|
|
151
|
-
*/
|
|
152
|
-
getDistPathBySrcPath(srcPath: string) {
|
|
153
|
-
const fileWithJSExtIfNeeded = this.replaceFileExtToJs(srcPath);
|
|
154
|
-
return path.join(this.distDir, fileWithJSExtIfNeeded);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* whether babel is able to compile the given path
|
|
159
|
-
*/
|
|
160
|
-
isFileSupported(filePath: string): boolean {
|
|
161
|
-
if (this.supportedFilesGlobPatterns) {
|
|
162
|
-
return isFileSupported(filePath) && !!multimatch(filePath, this.supportedFilesGlobPatterns).length;
|
|
163
|
-
}
|
|
164
|
-
return isFileSupported(filePath);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
displayConfig() {
|
|
168
|
-
return JSON.stringify(this.options.babelTransformOptions || {}, null, 2);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
private replaceFileExtToJs(filePath: string): string {
|
|
172
|
-
if (!this.isFileSupported(filePath)) return filePath;
|
|
173
|
-
return replaceFileExtToJs(filePath);
|
|
174
|
-
}
|
|
175
|
-
}
|
package/babel.main.runtime.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { MainRuntime } from '@teambit/cli';
|
|
2
|
-
import { CompilerAspect, CompilerMain } from '@teambit/compiler';
|
|
3
|
-
import { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';
|
|
4
|
-
import * as babel from '@babel/core';
|
|
5
|
-
import { BabelCompilerOptions } from './compiler-options';
|
|
6
|
-
import { BabelAspect } from './babel.aspect';
|
|
7
|
-
import { BabelCompiler } from './babel.compiler';
|
|
8
|
-
|
|
9
|
-
export class BabelMain {
|
|
10
|
-
constructor(private logger: Logger, private compiler: CompilerMain) {}
|
|
11
|
-
|
|
12
|
-
createCompiler(options: BabelCompilerOptions, babelModule = babel): BabelCompiler {
|
|
13
|
-
return new BabelCompiler(BabelAspect.id, this.logger, this.compiler, options, babelModule);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
getPackageJsonProps() {
|
|
17
|
-
return {
|
|
18
|
-
main: 'dist/{main}.js',
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
static runtime = MainRuntime;
|
|
23
|
-
static dependencies = [LoggerAspect, CompilerAspect];
|
|
24
|
-
|
|
25
|
-
static async provider([loggerExt, compiler]: [LoggerMain, CompilerMain]) {
|
|
26
|
-
const logger = loggerExt.createLogger(BabelAspect.id);
|
|
27
|
-
return new BabelMain(logger, compiler);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
BabelAspect.addRuntime(BabelMain);
|
package/compiler-options.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { TransformOptions } from '@babel/core';
|
|
2
|
-
import { CompilerOptions } from '@teambit/compiler';
|
|
3
|
-
|
|
4
|
-
export type BabelCompilerOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* TransformOptions of Babel. @see https://babeljs.io/docs/en/options
|
|
7
|
-
*
|
|
8
|
-
* `babel.config.json` and `.babelrc.json` use the same options, so you can require the json file
|
|
9
|
-
* and pass it as the option parameter. e.g.
|
|
10
|
-
* ```
|
|
11
|
-
* createCompiler({ babelTransformOptions: require('./babel.config.json') });
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
babelTransformOptions?: TransformOptions;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Determines which files should be compiled by the Babel compiler.
|
|
18
|
-
* It only works with the file types supported by Babel (.ts, .tsx, .js, .jsx, .d.ts).
|
|
19
|
-
* See https://github.com/mrmlnc/fast-glob for the supported glob patters syntax.
|
|
20
|
-
*/
|
|
21
|
-
supportedFilesGlobPatterns?: string[];
|
|
22
|
-
} & Partial<CompilerOptions>;
|
package/index.ts
DELETED