@teambit/community 1.0.106 → 1.0.108

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.
@@ -0,0 +1,5 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+
3
+ export const CommunityAspect = Aspect.create({
4
+ id: 'teambit.community/community',
5
+ });
@@ -0,0 +1,49 @@
1
+ import { MainRuntime } from '@teambit/cli';
2
+ import { BASE_COMMUNITY_DOMAIN, BASE_DOCS_DOMAIN } from '@teambit/legacy/dist/constants';
3
+ // import { HelloWorldStarter } from '@teambit/community.starters.hello-world';
4
+ // import { } from '@teambit/community.starters.hello-world-angular';
5
+ // import {} from '@learnbit-vue/hello-world.starters.hello-world';
6
+ // import {} from '@teambit/community.starters.wiki';
7
+ // import {} from '@teambit/community.starters.data-fetching';
8
+ // import {} from '@teambit/community.starters.analytics';
9
+ import { GeneratorAspect, GeneratorMain } from '@teambit/generator';
10
+
11
+ import { CommunityAspect } from './community.aspect';
12
+
13
+ export interface CommunityWorkspaceConfig {
14
+ communityDomain: string;
15
+ docsDomain: string;
16
+ }
17
+
18
+ export class CommunityMain {
19
+ constructor(
20
+ private config: CommunityWorkspaceConfig // private generator: GeneratorMain
21
+ ) {}
22
+
23
+ getBaseDomain(): string {
24
+ return this.config.communityDomain;
25
+ }
26
+
27
+ getDocsDomain(): string {
28
+ return this.config.docsDomain;
29
+ }
30
+
31
+ static slots = [];
32
+ static dependencies = [GeneratorAspect];
33
+ static runtime = MainRuntime;
34
+ static defaultConfig: CommunityWorkspaceConfig = {
35
+ communityDomain: BASE_COMMUNITY_DOMAIN,
36
+ docsDomain: BASE_DOCS_DOMAIN,
37
+ };
38
+
39
+ static async provider(_deps: [GeneratorMain], config: CommunityWorkspaceConfig) {
40
+ // const [generator] = _deps;
41
+ const community = new CommunityMain(config);
42
+
43
+ // if (generator) generator.registerWorkspaceTemplate([HelloWorldStarter]);
44
+
45
+ return community;
46
+ }
47
+ }
48
+
49
+ CommunityAspect.addRuntime(CommunityMain);
@@ -8,7 +8,7 @@ export declare class CommunityMain {
8
8
  constructor(config: CommunityWorkspaceConfig);
9
9
  getBaseDomain(): string;
10
10
  getDocsDomain(): string;
11
- static slots: never[];
11
+ static slots: any[];
12
12
  static dependencies: import("@teambit/harmony").Aspect[];
13
13
  static runtime: import("@teambit/harmony").RuntimeDefinition;
14
14
  static defaultConfig: CommunityWorkspaceConfig;
package/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { CommunityAspect } from './community.aspect';
2
+
3
+ export type { CommunityMain } from './community.main.runtime';
4
+ export default CommunityAspect;
5
+ export { CommunityAspect };
package/package.json CHANGED
@@ -1,32 +1,26 @@
1
1
  {
2
2
  "name": "@teambit/community",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "homepage": "https://bit.cloud/teambit/community/community",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.community",
8
8
  "name": "community",
9
- "version": "1.0.106"
9
+ "version": "1.0.108"
10
10
  },
11
11
  "dependencies": {
12
- "core-js": "^3.0.0",
13
- "@babel/runtime": "7.20.0",
14
12
  "@teambit/harmony": "0.4.6",
15
- "@teambit/cli": "0.0.839",
16
- "@teambit/generator": "1.0.107"
13
+ "@teambit/cli": "0.0.840",
14
+ "@teambit/generator": "1.0.109"
17
15
  },
18
16
  "devDependencies": {
19
17
  "@types/mocha": "9.1.0",
20
- "@types/node": "12.20.4",
21
- "@types/react": "^17.0.8",
22
- "@types/react-dom": "^17.0.5",
23
- "@types/jest": "^26.0.0",
24
- "@types/testing-library__jest-dom": "5.9.5"
18
+ "@types/jest": "^29.2.2",
19
+ "@types/testing-library__jest-dom": "^5.9.5",
20
+ "@teambit/harmony.envs.core-aspect-env": "0.0.13"
25
21
  },
26
22
  "peerDependencies": {
27
- "@teambit/legacy": "1.0.624",
28
- "react": "^16.8.0 || ^17.0.0",
29
- "react-dom": "^16.8.0 || ^17.0.0"
23
+ "@teambit/legacy": "1.0.624"
30
24
  },
31
25
  "license": "Apache-2.0",
32
26
  "optionalDependencies": {},
@@ -40,7 +34,7 @@
40
34
  },
41
35
  "private": false,
42
36
  "engines": {
43
- "node": ">=12.22.0"
37
+ "node": ">=16.0.0"
44
38
  },
45
39
  "repository": {
46
40
  "type": "git",
@@ -49,12 +43,9 @@
49
43
  "keywords": [
50
44
  "bit",
51
45
  "bit-aspect",
46
+ "bit-core-aspect",
52
47
  "components",
53
48
  "collaboration",
54
- "web",
55
- "react",
56
- "react-components",
57
- "angular",
58
- "angular-components"
49
+ "web"
59
50
  ]
60
51
  }
package/tsconfig.json CHANGED
@@ -1,38 +1,33 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "lib": [
4
- "es2019",
5
- "DOM",
6
- "ES6",
7
- "DOM.Iterable",
8
- "ScriptHost"
4
+ "esnext",
5
+ "dom",
6
+ "dom.Iterable"
9
7
  ],
10
- "target": "es2015",
11
- "module": "CommonJS",
12
- "jsx": "react",
13
- "allowJs": true,
14
- "composite": true,
8
+ "target": "es2020",
9
+ "module": "es2020",
10
+ "jsx": "react-jsx",
15
11
  "declaration": true,
16
12
  "sourceMap": true,
17
- "skipLibCheck": true,
18
13
  "experimentalDecorators": true,
19
- "outDir": "dist",
14
+ "skipLibCheck": true,
20
15
  "moduleResolution": "node",
21
16
  "esModuleInterop": true,
22
- "rootDir": ".",
23
17
  "resolveJsonModule": true,
24
- "emitDeclarationOnly": true,
25
- "emitDecoratorMetadata": true,
26
- "allowSyntheticDefaultImports": true,
27
- "strictPropertyInitialization": false,
28
- "strict": true,
29
- "noImplicitAny": false,
30
- "preserveConstEnums": true
18
+ "allowJs": true,
19
+ "outDir": "dist",
20
+ "emitDeclarationOnly": true
31
21
  },
32
22
  "exclude": [
23
+ "artifacts",
24
+ "public",
33
25
  "dist",
26
+ "node_modules",
27
+ "package.json",
34
28
  "esm.mjs",
35
- "package.json"
29
+ "**/*.cjs",
30
+ "./dist"
36
31
  ],
37
32
  "include": [
38
33
  "**/*",
package/types/asset.d.ts CHANGED
@@ -5,12 +5,12 @@ declare module '*.png' {
5
5
  declare module '*.svg' {
6
6
  import type { FunctionComponent, SVGProps } from 'react';
7
7
 
8
- export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
9
11
  const src: string;
10
12
  export default src;
11
13
  }
12
-
13
- // @TODO Gilad
14
14
  declare module '*.jpg' {
15
15
  const value: any;
16
16
  export = value;
@@ -27,3 +27,15 @@ declare module '*.bmp' {
27
27
  const value: any;
28
28
  export = value;
29
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
+ }