@vnejs/plugins.core.platforms 0.1.1 → 0.1.2

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 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { regPlugin } from "@vnejs/shared";
2
+ import { CONSTANTS, PARAMS, PLUGIN_NAME } from "@vnejs/plugins.core.platforms.contract";
3
+ regPlugin(PLUGIN_NAME, { constants: CONSTANTS, params: PARAMS });
@@ -0,0 +1,6 @@
1
+ import type { VnePluginConstantsMapRegistry, VnePluginEventsMapRegistry, VnePluginParamsMapRegistry, VnePluginSettingsMapRegistry } from "@vnejs/shared";
2
+ import type { Constants, Params, PluginName } from "@vnejs/plugins.core.platforms.contract";
3
+ export type PlatformsPluginEvents = VnePluginEventsMapRegistry;
4
+ export type PlatformsPluginConstants = VnePluginConstantsMapRegistry & Record<PluginName, Constants>;
5
+ export type PlatformsPluginSettings = VnePluginSettingsMapRegistry;
6
+ export type PlatformsPluginParams = VnePluginParamsMapRegistry & Record<PluginName, Params>;
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,17 +1,41 @@
1
1
  {
2
2
  "name": "@vnejs/plugins.core.platforms",
3
- "version": "0.1.1",
4
- "main": "index.js",
3
+ "version": "0.1.2",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "src",
18
+ "tsconfig.json"
19
+ ],
5
20
  "scripts": {
6
21
  "test": "echo \"Error: no test specified\" && exit 1",
22
+ "build": "npx @vnejs/monorepo package",
7
23
  "publish:major:plugin": "npm run publish:major",
8
24
  "publish:minor:plugin": "npm run publish:minor",
9
25
  "publish:patch:plugin": "npm run publish:patch",
10
- "publish:major": "npm version major && npm publish --access public",
11
- "publish:minor": "npm version minor && npm publish --access public",
12
- "publish:patch": "npm version patch && npm publish --access public"
26
+ "publish:major": "npx @vnejs/monorepo publish major --access public",
27
+ "publish:minor": "npx @vnejs/monorepo publish minor --access public",
28
+ "publish:patch": "npx @vnejs/monorepo publish patch --access public"
13
29
  },
14
30
  "author": "",
15
31
  "license": "ISC",
16
- "description": ""
32
+ "dependencies": {
33
+ "@vnejs/plugins.core.platforms.contract": "*"
34
+ },
35
+ "peerDependencies": {
36
+ "@vnejs/shared": "~0.0.9"
37
+ },
38
+ "devDependencies": {
39
+ "@vnejs/configs.ts-common": "~0.0.1"
40
+ }
17
41
  }
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { regPlugin } from "@vnejs/shared";
2
+ import { CONSTANTS, PARAMS, PLUGIN_NAME } from "@vnejs/plugins.core.platforms.contract";
3
+
4
+ regPlugin(PLUGIN_NAME, { constants: CONSTANTS, params: PARAMS });
package/src/types.ts ADDED
@@ -0,0 +1,10 @@
1
+ import type { VnePluginConstantsMapRegistry, VnePluginEventsMapRegistry, VnePluginParamsMapRegistry, VnePluginSettingsMapRegistry } from "@vnejs/shared";
2
+ import type { Constants, Params, PluginName } from "@vnejs/plugins.core.platforms.contract";
3
+
4
+ export type PlatformsPluginEvents = VnePluginEventsMapRegistry;
5
+
6
+ export type PlatformsPluginConstants = VnePluginConstantsMapRegistry & Record<PluginName, Constants>;
7
+
8
+ export type PlatformsPluginSettings = VnePluginSettingsMapRegistry;
9
+
10
+ export type PlatformsPluginParams = VnePluginParamsMapRegistry & Record<PluginName, Params>;
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@vnejs/configs.ts-common/tsconfig.json",
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist"
6
+ },
7
+ "include": ["src/**/*.ts"],
8
+ "exclude": ["dist", "node_modules"]
9
+ }
package/const/const.js DELETED
@@ -1,8 +0,0 @@
1
- export const WEB = "web";
2
- export const MOBILE = "mobile";
3
- export const IOS = "ios";
4
- export const ANDROID = "android";
5
- export const ELECTRON = "electron";
6
- export const MACOS = "macos";
7
- export const LINUX = "linux";
8
- export const WINDOWS = "windows";
package/const/params.js DELETED
@@ -1 +0,0 @@
1
- export const CURRENT_PLATFORM = "web";
package/index.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import * as constants from "./const/const";
2
- import { SUBSCRIBE_EVENTS } from "./const/events";
3
- import { SETTINGS_KEYS } from "./const/settings";
4
-
5
- type SubscribeEventsType = typeof SUBSCRIBE_EVENTS;
6
- type SettingsKeysType = typeof SETTINGS_KEYS;
7
- type ConstantsType = typeof constants;
8
-
9
- const PLUGIN_NAME = "PLATFORMS";
10
-
11
- declare global {
12
- interface CONST {
13
- [PLUGIN_NAME]: ConstantsType;
14
- }
15
- }
package/index.js DELETED
@@ -1,6 +0,0 @@
1
- import { regPlugin } from "@vnejs/shared";
2
-
3
- import * as constants from "./const/const";
4
- import * as params from "./const/params";
5
-
6
- regPlugin("PLATFORMS", { constants, params });