@teambit/config 0.0.406 → 0.0.410
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/exceptions/config-dir-not-defined.ts +7 -0
- package/exceptions/extension-already-configured.ts +7 -0
- package/exceptions/index.ts +1 -0
- package/exceptions/invalid-config-file.ts +11 -0
- package/package-tar/teambit-config-0.0.410.tgz +0 -0
- package/package.json +6 -21
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
- package/workspace-template.jsonc +70 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExtensionAlreadyConfigured } from './extension-already-configured';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BitError } from '@teambit/bit-error';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
|
|
4
|
+
export default class InvalidConfigFile extends BitError {
|
|
5
|
+
showDoctorMessage: boolean;
|
|
6
|
+
constructor(readonly path: string) {
|
|
7
|
+
super(`error: invalid workspace.jsonc: ${chalk.bold(path)} is not a valid JSON file.
|
|
8
|
+
consider running ${chalk.bold('bit init --reset')} to recreate the file`);
|
|
9
|
+
this.showDoctorMessage = true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.410",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/harmony/config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "config",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.410"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@teambit/harmony": "0.2.11",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"lodash": "4.17.21",
|
|
17
17
|
"@babel/runtime": "7.12.18",
|
|
18
18
|
"core-js": "^3.0.0",
|
|
19
|
-
"@teambit/cli": "0.0.
|
|
20
|
-
"@teambit/bit-error": "0.0.
|
|
19
|
+
"@teambit/cli": "0.0.398",
|
|
20
|
+
"@teambit/bit-error": "0.0.384"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/fs-extra": "9.0.7",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@types/node": "12.20.4"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@teambit/legacy": "1.0.
|
|
33
|
+
"@teambit/legacy": "1.0.184",
|
|
34
34
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
35
35
|
"react": "^16.8.0 || ^17.0.0"
|
|
36
36
|
},
|
|
@@ -58,27 +58,12 @@
|
|
|
58
58
|
"react": "-"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@teambit/legacy": "1.0.
|
|
61
|
+
"@teambit/legacy": "1.0.184",
|
|
62
62
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
63
63
|
"react": "^16.8.0 || ^17.0.0"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"files": [
|
|
68
|
-
"dist",
|
|
69
|
-
"!dist/tsconfig.tsbuildinfo",
|
|
70
|
-
"**/*.md",
|
|
71
|
-
"**/*.mdx",
|
|
72
|
-
"**/*.js",
|
|
73
|
-
"**/*.json",
|
|
74
|
-
"**/*.sass",
|
|
75
|
-
"**/*.scss",
|
|
76
|
-
"**/*.less",
|
|
77
|
-
"**/*.css",
|
|
78
|
-
"**/*.css",
|
|
79
|
-
"**/*.jpeg",
|
|
80
|
-
"**/*.gif"
|
|
81
|
-
],
|
|
82
67
|
"private": false,
|
|
83
68
|
"engines": {
|
|
84
69
|
"node": ">=12.22.0"
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
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
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* this is the main configuration file of your bit workspace.
|
|
3
|
+
* for full documentation, please see: https://harmony-docs.bit.dev/workspace/configurations
|
|
4
|
+
**/
|
|
5
|
+
{
|
|
6
|
+
"$schema": "https://static.bit.dev/teambit/schemas/schema.json",
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* main configuration of the Bit workspace.
|
|
10
|
+
**/
|
|
11
|
+
"teambit.workspace/workspace": {
|
|
12
|
+
/**
|
|
13
|
+
* the name of the component workspace. used for development purposes.
|
|
14
|
+
**/
|
|
15
|
+
"name": "my-workspace-name",
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* set the icon to be shown on the Bit server.
|
|
19
|
+
**/
|
|
20
|
+
"icon": "https://static.bit.dev/bit-logo.svg",
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* default directory to place a component during `bit import` and `bit create`.
|
|
24
|
+
* the following placeholders are available:
|
|
25
|
+
* name - component name includes namespace, e.g. 'ui/button'.
|
|
26
|
+
* scopeId - full scope-id includes the owner, e.g. 'teambit.compilation'.
|
|
27
|
+
* scope - scope name only, e.g. 'compilation'.
|
|
28
|
+
* owner - owner name in bit.dev, e.g. 'teambit'.
|
|
29
|
+
**/
|
|
30
|
+
"defaultDirectory": "{scope}/{name}",
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* default scope for all components in workspace.
|
|
34
|
+
**/
|
|
35
|
+
"defaultScope": "my-scope"
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* main configuration for component dependency resolution.
|
|
40
|
+
**/
|
|
41
|
+
"teambit.dependencies/dependency-resolver": {
|
|
42
|
+
/**
|
|
43
|
+
* choose the package manager for Bit to use. you can choose between 'yarn', 'pnpm'
|
|
44
|
+
*/
|
|
45
|
+
"packageManager": "teambit.dependencies/pnpm",
|
|
46
|
+
"policy": {
|
|
47
|
+
"dependencies": {},
|
|
48
|
+
"peerDependencies": {}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* workspace variants allow to set different subsets of configuration for components in your
|
|
54
|
+
* workspace. this is extremely useful for upgrading, aligning and building components with a new
|
|
55
|
+
* set of dependencies. a rule can be a directory or a component-id/namespace, in which case,
|
|
56
|
+
* wrap the rule with curly brackets (e.g. `"{ui/*}": {}`)
|
|
57
|
+
* see https://harmony-docs.bit.dev/aspects/variants for more info.
|
|
58
|
+
**/
|
|
59
|
+
"teambit.workspace/variants": {
|
|
60
|
+
/**
|
|
61
|
+
* "*" is a special rule which applied on all components in the workspace.
|
|
62
|
+
**/
|
|
63
|
+
"*": {
|
|
64
|
+
/**
|
|
65
|
+
* uncomment to apply the chosen environment on all components.
|
|
66
|
+
**/
|
|
67
|
+
// "teambit.react/react": { }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|