@teambit/empty-env 0.0.0-0024905ef002b7d49944e42ec2abfd4b486978ec
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/.npmignore +18 -0
- package/dist/empty-env.aspect.d.ts +3 -0
- package/dist/empty-env.aspect.js +19 -0
- package/dist/empty-env.aspect.js.map +1 -0
- package/dist/empty-env.docs.mdx +23 -0
- package/dist/empty-env.main.runtime.d.ts +26 -0
- package/dist/empty-env.main.runtime.js +70 -0
- package/dist/empty-env.main.runtime.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/preview-1786613135475.js +7 -0
- package/empty-env.docs.mdx +23 -0
- package/package.json +51 -0
- package/types/asset.d.ts +41 -0
- package/types/style.d.ts +46 -0
package/.npmignore
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
dist/tsconfig.tsbuildinfo
|
|
2
|
+
dist/tsconfig.json
|
|
3
|
+
/tsconfig.json
|
|
4
|
+
|
|
5
|
+
package-tar/
|
|
6
|
+
.bit-capsule-ready
|
|
7
|
+
/*.ts
|
|
8
|
+
artifacts/*
|
|
9
|
+
!artifacts/env-template
|
|
10
|
+
!artifacts/ui-bundle
|
|
11
|
+
!artifacts/preview-bundle
|
|
12
|
+
package-tar/
|
|
13
|
+
.bit-capsule-ready
|
|
14
|
+
/*.ts
|
|
15
|
+
artifacts/*
|
|
16
|
+
!artifacts/env-template
|
|
17
|
+
!artifacts/ui-bundle
|
|
18
|
+
!artifacts/preview-bundle
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.EmptyEnvAspect = void 0;
|
|
7
|
+
function _harmony() {
|
|
8
|
+
const data = require("@teambit/harmony");
|
|
9
|
+
_harmony = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
const EmptyEnvAspect = exports.EmptyEnvAspect = _harmony().Aspect.create({
|
|
15
|
+
id: 'teambit.harmony/empty-env'
|
|
16
|
+
});
|
|
17
|
+
var _default = exports.default = EmptyEnvAspect;
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=empty-env.aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_harmony","data","require","EmptyEnvAspect","exports","Aspect","create","id","_default","default"],"sources":["empty-env.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const EmptyEnvAspect = Aspect.create({\n id: 'teambit.harmony/empty-env',\n});\n\nexport default EmptyEnvAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EAC1CC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAEYN,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: An env that provides no development tooling, designed as the default for components with no configured env
|
|
3
|
+
labels: ['core aspect', 'env', 'environment', 'default']
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
The empty env intentionally provides nothing - no compiler, no tester, no preview and no
|
|
9
|
+
dependency policy - so components are used as-source and Bit works fully out of the box, without
|
|
10
|
+
fetching anything from a remote. It is designed to serve as the default env for components that
|
|
11
|
+
were not configured with any env.
|
|
12
|
+
|
|
13
|
+
It has no behavior on purpose: any behavior baked into a core env changes components' output when
|
|
14
|
+
Bit itself changes, without any env-version bump.
|
|
15
|
+
|
|
16
|
+
## Getting a development experience
|
|
17
|
+
|
|
18
|
+
To get a development experience (compile, test, lint, docs), configure a real env on the
|
|
19
|
+
component. For example:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
bit env set my-component teambit.harmony/node
|
|
23
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Environment, EnvsMain } from '@teambit/envs';
|
|
2
|
+
export declare const EmptyEnvType = "empty";
|
|
3
|
+
/**
|
|
4
|
+
* an env that intentionally provides nothing - no compiler, no tester, no preview, no
|
|
5
|
+
* dependencies policy - so components are used as-source and bit works fully offline out of the
|
|
6
|
+
* box. designed to serve as the default env for components that were not configured with any env.
|
|
7
|
+
*
|
|
8
|
+
* it has no behavior on purpose: any behavior baked into a core env changes components' output
|
|
9
|
+
* when bit itself changes, without any env-version bump. to get a development experience (compile,
|
|
10
|
+
* test, lint, docs), configure a real env, e.g. `bit env set my-component teambit.harmony/node`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class EmptyEnv implements Environment {
|
|
13
|
+
name: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
description: string;
|
|
16
|
+
__getDescriptor(): Promise<{
|
|
17
|
+
type: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare class EmptyEnvMain {
|
|
21
|
+
readonly emptyEnv: EmptyEnv;
|
|
22
|
+
constructor(emptyEnv: EmptyEnv);
|
|
23
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
24
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
25
|
+
static provider([envs]: [EnvsMain]): Promise<EmptyEnvMain>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EmptyEnvType = exports.EmptyEnvMain = exports.EmptyEnv = void 0;
|
|
7
|
+
function _cli() {
|
|
8
|
+
const data = require("@teambit/cli");
|
|
9
|
+
_cli = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _envs() {
|
|
15
|
+
const data = require("@teambit/envs");
|
|
16
|
+
_envs = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _emptyEnv() {
|
|
22
|
+
const data = require("./empty-env.aspect");
|
|
23
|
+
_emptyEnv = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
30
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
|
+
const EmptyEnvType = exports.EmptyEnvType = 'empty';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* an env that intentionally provides nothing - no compiler, no tester, no preview, no
|
|
35
|
+
* dependencies policy - so components are used as-source and bit works fully offline out of the
|
|
36
|
+
* box. designed to serve as the default env for components that were not configured with any env.
|
|
37
|
+
*
|
|
38
|
+
* it has no behavior on purpose: any behavior baked into a core env changes components' output
|
|
39
|
+
* when bit itself changes, without any env-version bump. to get a development experience (compile,
|
|
40
|
+
* test, lint, docs), configure a real env, e.g. `bit env set my-component teambit.harmony/node`.
|
|
41
|
+
*/
|
|
42
|
+
class EmptyEnv {
|
|
43
|
+
constructor() {
|
|
44
|
+
_defineProperty(this, "name", 'empty');
|
|
45
|
+
_defineProperty(this, "icon", 'https://static.bit.dev/extensions-icons/default.svg');
|
|
46
|
+
_defineProperty(this, "description", 'provides no development tooling. configure an env to get one');
|
|
47
|
+
}
|
|
48
|
+
async __getDescriptor() {
|
|
49
|
+
return {
|
|
50
|
+
type: EmptyEnvType
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.EmptyEnv = EmptyEnv;
|
|
55
|
+
class EmptyEnvMain {
|
|
56
|
+
constructor(emptyEnv) {
|
|
57
|
+
this.emptyEnv = emptyEnv;
|
|
58
|
+
}
|
|
59
|
+
static async provider([envs]) {
|
|
60
|
+
const emptyEnv = new EmptyEnv();
|
|
61
|
+
envs.registerEnv(emptyEnv);
|
|
62
|
+
return new EmptyEnvMain(emptyEnv);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.EmptyEnvMain = EmptyEnvMain;
|
|
66
|
+
_defineProperty(EmptyEnvMain, "runtime", _cli().MainRuntime);
|
|
67
|
+
_defineProperty(EmptyEnvMain, "dependencies", [_envs().EnvsAspect]);
|
|
68
|
+
_emptyEnv().EmptyEnvAspect.addRuntime(EmptyEnvMain);
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=empty-env.main.runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_envs","_emptyEnv","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","EmptyEnvType","exports","EmptyEnv","constructor","__getDescriptor","type","EmptyEnvMain","emptyEnv","provider","envs","registerEnv","MainRuntime","EnvsAspect","EmptyEnvAspect","addRuntime"],"sources":["empty-env.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport type { Environment, EnvsMain } from '@teambit/envs';\nimport { EnvsAspect } from '@teambit/envs';\nimport { EmptyEnvAspect } from './empty-env.aspect';\n\nexport const EmptyEnvType = 'empty';\n\n/**\n * an env that intentionally provides nothing - no compiler, no tester, no preview, no\n * dependencies policy - so components are used as-source and bit works fully offline out of the\n * box. designed to serve as the default env for components that were not configured with any env.\n *\n * it has no behavior on purpose: any behavior baked into a core env changes components' output\n * when bit itself changes, without any env-version bump. to get a development experience (compile,\n * test, lint, docs), configure a real env, e.g. `bit env set my-component teambit.harmony/node`.\n */\nexport class EmptyEnv implements Environment {\n name = 'empty';\n\n icon = 'https://static.bit.dev/extensions-icons/default.svg';\n\n description = 'provides no development tooling. configure an env to get one';\n\n async __getDescriptor() {\n return {\n type: EmptyEnvType,\n };\n }\n}\n\nexport class EmptyEnvMain {\n constructor(readonly emptyEnv: EmptyEnv) {}\n\n static runtime = MainRuntime;\n static dependencies = [EnvsAspect];\n\n static async provider([envs]: [EnvsMain]) {\n const emptyEnv = new EmptyEnv();\n envs.registerEnv(emptyEnv);\n return new EmptyEnvMain(emptyEnv);\n }\n}\n\nEmptyEnvAspect.addRuntime(EmptyEnvMain);\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoD,SAAAI,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAE7C,MAAMgB,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,OAAO;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,QAAQ,CAAwB;EAAAC,YAAA;IAAAtB,eAAA,eACpC,OAAO;IAAAA,eAAA,eAEP,qDAAqD;IAAAA,eAAA,sBAE9C,8DAA8D;EAAA;EAE5E,MAAMuB,eAAeA,CAAA,EAAG;IACtB,OAAO;MACLC,IAAI,EAAEL;IACR,CAAC;EACH;AACF;AAACC,OAAA,CAAAC,QAAA,GAAAA,QAAA;AAEM,MAAMI,YAAY,CAAC;EACxBH,WAAWA,CAAUI,QAAkB,EAAE;IAAA,KAApBA,QAAkB,GAAlBA,QAAkB;EAAG;EAK1C,aAAaC,QAAQA,CAAC,CAACC,IAAI,CAAa,EAAE;IACxC,MAAMF,QAAQ,GAAG,IAAIL,QAAQ,CAAC,CAAC;IAC/BO,IAAI,CAACC,WAAW,CAACH,QAAQ,CAAC;IAC1B,OAAO,IAAID,YAAY,CAACC,QAAQ,CAAC;EACnC;AACF;AAACN,OAAA,CAAAK,YAAA,GAAAA,YAAA;AAAAzB,eAAA,CAXYyB,YAAY,aAGNK,kBAAW;AAAA9B,eAAA,CAHjByB,YAAY,kBAID,CAACM,kBAAU,CAAC;AASpCC,0BAAc,CAACC,UAAU,CAACR,YAAY,CAAC","ignoreList":[]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "EmptyEnv", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _emptyEnvMain().EmptyEnv;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "EmptyEnvAspect", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _emptyEnv().EmptyEnvAspect;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "EmptyEnvType", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _emptyEnvMain().EmptyEnvType;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "default", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _emptyEnv().default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
function _emptyEnv() {
|
|
31
|
+
const data = _interopRequireWildcard(require("./empty-env.aspect"));
|
|
32
|
+
_emptyEnv = function () {
|
|
33
|
+
return data;
|
|
34
|
+
};
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
function _emptyEnvMain() {
|
|
38
|
+
const data = require("./empty-env.main.runtime");
|
|
39
|
+
_emptyEnvMain = function () {
|
|
40
|
+
return data;
|
|
41
|
+
};
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_emptyEnv","data","_interopRequireWildcard","require","_emptyEnvMain","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["index.ts"],"sourcesContent":["export { EmptyEnvAspect, default } from './empty-env.aspect';\nexport type { EmptyEnvMain } from './empty-env.main.runtime';\nexport { EmptyEnv, EmptyEnvType } from './empty-env.main.runtime';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAkE,SAAAC,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
;
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_empty-env@0024905ef002b7d49944e42ec2abfd4b486978ec/dist/empty-env.docs.mdx';
|
|
3
|
+
|
|
4
|
+
export const compositions = [];
|
|
5
|
+
export const overview = [overview_0];
|
|
6
|
+
|
|
7
|
+
export const compositions_metadata = {"compositions":[]};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: An env that provides no development tooling, designed as the default for components with no configured env
|
|
3
|
+
labels: ['core aspect', 'env', 'environment', 'default']
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
The empty env intentionally provides nothing - no compiler, no tester, no preview and no
|
|
9
|
+
dependency policy - so components are used as-source and Bit works fully out of the box, without
|
|
10
|
+
fetching anything from a remote. It is designed to serve as the default env for components that
|
|
11
|
+
were not configured with any env.
|
|
12
|
+
|
|
13
|
+
It has no behavior on purpose: any behavior baked into a core env changes components' output when
|
|
14
|
+
Bit itself changes, without any env-version bump.
|
|
15
|
+
|
|
16
|
+
## Getting a development experience
|
|
17
|
+
|
|
18
|
+
To get a development experience (compile, test, lint, docs), configure a real env on the
|
|
19
|
+
component. For example:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
bit env set my-component teambit.harmony/node
|
|
23
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/empty-env",
|
|
3
|
+
"version": "0.0.0-0024905ef002b7d49944e42ec2abfd4b486978ec",
|
|
4
|
+
"homepage": "https://bit.cloud/teambit/harmony/empty-env",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"componentId": {
|
|
7
|
+
"scope": "teambit.harmony",
|
|
8
|
+
"name": "empty-env",
|
|
9
|
+
"version": "0024905ef002b7d49944e42ec2abfd4b486978ec"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@teambit/harmony": "0.4.12",
|
|
13
|
+
"@teambit/cli": "0.0.0-4329f2c17fa29af6c5213c8a5e340892e65c3e86",
|
|
14
|
+
"@teambit/envs": "0.0.0-428d3de7b31557438e176261f96a917e6fa98866"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@teambit/harmony.envs.core-aspect-env": "2.0.6"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"optionalDependencies": {},
|
|
22
|
+
"peerDependenciesMeta": {},
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"node": {
|
|
27
|
+
"require": "./dist/index.js",
|
|
28
|
+
"import": "./dist/esm.mjs"
|
|
29
|
+
},
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./dist/*": "./dist/*",
|
|
33
|
+
"./artifacts/*": "./artifacts/*"
|
|
34
|
+
},
|
|
35
|
+
"private": false,
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=16.0.0"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/teambit/bit"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"bit",
|
|
45
|
+
"bit-aspect",
|
|
46
|
+
"bit-core-aspect",
|
|
47
|
+
"components",
|
|
48
|
+
"collaboration",
|
|
49
|
+
"web"
|
|
50
|
+
]
|
|
51
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
11
|
+
const src: string;
|
|
12
|
+
export default src;
|
|
13
|
+
}
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
|
30
|
+
declare module '*.otf' {
|
|
31
|
+
const value: any;
|
|
32
|
+
export = value;
|
|
33
|
+
}
|
|
34
|
+
declare module '*.woff' {
|
|
35
|
+
const value: any;
|
|
36
|
+
export = value;
|
|
37
|
+
}
|
|
38
|
+
declare module '*.woff2' {
|
|
39
|
+
const value: any;
|
|
40
|
+
export = value;
|
|
41
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// `reset-css` ships only `reset.css` (no `.d.ts`). TS6 refuses bare
|
|
45
|
+
// side-effect imports without declarations, so we declare the module here.
|
|
46
|
+
declare module 'reset-css';
|