@modern-js/core 1.9.1 → 1.9.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.
- package/dist/config/index.js +5 -1
- package/dist/config/schema/index.js +2 -3
- package/dist/index.js +5 -1
- package/dist/js/modern/cli.js +29 -0
- package/dist/js/modern/config/defaults.js +103 -0
- package/dist/js/modern/config/index.js +115 -0
- package/dist/js/modern/config/mergeConfig.js +22 -0
- package/dist/js/modern/config/schema/deploy.js +17 -0
- package/dist/js/modern/config/schema/index.js +107 -0
- package/dist/js/modern/config/schema/output.js +147 -0
- package/dist/js/modern/config/schema/server.js +170 -0
- package/dist/js/modern/config/schema/source.js +59 -0
- package/dist/js/modern/config/schema/tools.js +36 -0
- package/dist/js/modern/config/types/electron.js +1 -0
- package/dist/js/modern/config/types/index.js +1 -0
- package/dist/js/modern/config/types/less.js +0 -0
- package/dist/js/modern/config/types/sass.js +0 -0
- package/dist/js/modern/config/types/ssg.js +0 -0
- package/dist/js/modern/config/types/test.js +0 -0
- package/dist/js/modern/config/types/unbundle.js +0 -0
- package/dist/js/modern/context.js +63 -0
- package/dist/js/modern/index.js +169 -0
- package/dist/js/modern/initWatcher.js +62 -0
- package/dist/js/modern/loadEnv.js +14 -0
- package/dist/js/modern/loadPlugins.js +122 -0
- package/dist/js/modern/manager.js +28 -0
- package/dist/js/modern/pluginAPI.js +11 -0
- package/dist/js/modern/utils/commander.js +19 -0
- package/dist/js/modern/utils/repeatKeyWarning.js +18 -0
- package/dist/js/node/cli.js +35 -0
- package/dist/js/node/config/defaults.js +110 -0
- package/dist/js/node/config/index.js +182 -0
- package/dist/js/node/config/mergeConfig.js +32 -0
- package/dist/js/node/config/schema/deploy.js +26 -0
- package/dist/js/node/config/schema/index.js +127 -0
- package/dist/js/node/config/schema/output.js +156 -0
- package/dist/js/node/config/schema/server.js +179 -0
- package/dist/js/node/config/schema/source.js +68 -0
- package/dist/js/node/config/schema/tools.js +43 -0
- package/dist/js/node/config/types/electron.js +5 -0
- package/dist/js/node/config/types/index.js +5 -0
- package/dist/js/node/config/types/less.js +0 -0
- package/dist/js/node/config/types/sass.js +0 -0
- package/dist/js/node/config/types/ssg.js +0 -0
- package/dist/js/node/config/types/test.js +0 -0
- package/dist/js/node/config/types/unbundle.js +0 -0
- package/dist/js/node/context.js +93 -0
- package/dist/js/node/index.js +329 -0
- package/dist/js/node/initWatcher.js +82 -0
- package/dist/js/node/loadEnv.js +30 -0
- package/dist/js/node/loadPlugins.js +134 -0
- package/dist/js/node/manager.js +45 -0
- package/dist/js/node/pluginAPI.js +54 -0
- package/dist/js/node/utils/commander.js +32 -0
- package/dist/js/node/utils/repeatKeyWarning.js +31 -0
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/config/defaults.d.ts +28 -0
- package/dist/types/config/index.d.ts +12 -0
- package/dist/types/config/mergeConfig.d.ts +31 -0
- package/dist/types/config/schema/deploy.d.ts +16 -0
- package/dist/types/config/schema/index.d.ts +466 -0
- package/dist/types/config/schema/output.d.ts +146 -0
- package/dist/types/config/schema/server.d.ts +182 -0
- package/dist/types/config/schema/source.d.ts +58 -0
- package/dist/types/config/schema/tools.d.ts +36 -0
- package/dist/types/config/types/electron.d.ts +13 -0
- package/dist/types/config/types/index.d.ts +252 -0
- package/dist/types/config/types/less.d.ts +10 -0
- package/dist/types/config/types/sass.d.ts +8 -0
- package/dist/types/config/types/ssg.d.ts +13 -0
- package/dist/types/config/types/test.d.ts +15 -0
- package/dist/types/config/types/unbundle.d.ts +28 -0
- package/dist/types/context.d.ts +47 -0
- package/dist/types/index.d.ts +64 -0
- package/dist/types/initWatcher.d.ts +3 -0
- package/dist/types/loadEnv.d.ts +1 -0
- package/dist/types/loadPlugins.d.ts +44 -0
- package/dist/types/manager.d.ts +75 -0
- package/dist/types/pluginAPI.d.ts +13 -0
- package/dist/types/utils/commander.d.ts +4 -0
- package/dist/types/utils/repeatKeyWarning.d.ts +3 -0
- package/package.json +4 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare type SSGRouteOptions = string | {
|
|
2
|
+
url: string;
|
|
3
|
+
output?: string;
|
|
4
|
+
params?: Record<string, any>[];
|
|
5
|
+
headers?: Record<string, any>;
|
|
6
|
+
};
|
|
7
|
+
export declare type SSGSingleEntryOptions = boolean | {
|
|
8
|
+
preventDefault?: string[];
|
|
9
|
+
headers?: Record<string, any>;
|
|
10
|
+
routes?: SSGRouteOptions[];
|
|
11
|
+
};
|
|
12
|
+
export declare type SSGMultiEntryOptions = Record<string, SSGSingleEntryOptions>;
|
|
13
|
+
export declare type SSGConfig = boolean | SSGSingleEntryOptions | SSGMultiEntryOptions | ((entryName: string) => SSGSingleEntryOptions);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Config as JestConfigTypes } from '@jest/types';
|
|
2
|
+
export declare type JestConfig = JestConfigTypes.InitialOptions;
|
|
3
|
+
export interface TestConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Decide which transformer will be used to compile file
|
|
6
|
+
* Default: babel-jest
|
|
7
|
+
*/
|
|
8
|
+
transformer?: 'babel-jest' | 'ts-jest';
|
|
9
|
+
/**
|
|
10
|
+
* Original jest config
|
|
11
|
+
* Doc: https://jestjs.io/docs/configuration
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare type UnbundleConfig = {
|
|
2
|
+
/**
|
|
3
|
+
* Some package A may require another package B that is intended for Node.js
|
|
4
|
+
* use only. In such a case, if package B cannot be converted to ESM, it will
|
|
5
|
+
* cause package A to fail during unbundle development, even though package B
|
|
6
|
+
* is not really required. Package B can thus be safely ignored via this option
|
|
7
|
+
* to ensure transpilation of package A to ESM
|
|
8
|
+
*/
|
|
9
|
+
ignore?: string | string[];
|
|
10
|
+
/**
|
|
11
|
+
* ignores cached esm modules and recompiles dependencies not available
|
|
12
|
+
* from PDN host on dev start.
|
|
13
|
+
* default: false
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
ignoreModuleCache?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* clears cache of downloaded esm modules (from PDN) on dev start.
|
|
19
|
+
* default: false
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
clearPdnCache?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* modifies host to attempt to download esm modules from
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
pdnHost?: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IAppContext } from '@modern-js/types';
|
|
2
|
+
import { UserConfig } from './config';
|
|
3
|
+
import { NormalizedConfig } from './config/mergeConfig';
|
|
4
|
+
import type { LoadedPlugin } from './loadPlugins';
|
|
5
|
+
export type { IAppContext };
|
|
6
|
+
export declare const AppContext: import("@modern-js/plugin").Context<IAppContext>;
|
|
7
|
+
export declare const ConfigContext: import("@modern-js/plugin").Context<UserConfig>;
|
|
8
|
+
export declare const ResolvedConfigContext: import("@modern-js/plugin").Context<NormalizedConfig>;
|
|
9
|
+
/**
|
|
10
|
+
* Set app context.
|
|
11
|
+
* @param value new app context. It will override previous app context.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
export declare const setAppContext: (value: IAppContext) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Get app context, including directories, plugins and some static infos.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export declare const useAppContext: () => IAppContext;
|
|
20
|
+
/**
|
|
21
|
+
* Get original content of user config.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
export declare const useConfigContext: () => UserConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Get normalized content of user config.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export declare const useResolvedConfigContext: () => NormalizedConfig;
|
|
30
|
+
export declare const initAppContext: ({
|
|
31
|
+
appDirectory,
|
|
32
|
+
plugins,
|
|
33
|
+
configFile,
|
|
34
|
+
options,
|
|
35
|
+
serverConfigFile
|
|
36
|
+
}: {
|
|
37
|
+
appDirectory: string;
|
|
38
|
+
plugins: LoadedPlugin[];
|
|
39
|
+
configFile: string | false;
|
|
40
|
+
options?: {
|
|
41
|
+
metaName?: string | undefined;
|
|
42
|
+
srcDir?: string | undefined;
|
|
43
|
+
distDir?: string | undefined;
|
|
44
|
+
sharedDir?: string | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
serverConfigFile: string;
|
|
47
|
+
}) => IAppContext;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { INTERNAL_PLUGINS } from '@modern-js/utils';
|
|
2
|
+
import type { Hooks } from '@modern-js/types';
|
|
3
|
+
import { ErrorObject } from 'ajv';
|
|
4
|
+
import { TransformPlugin } from './loadPlugins';
|
|
5
|
+
import { IAppContext, initAppContext } from './context';
|
|
6
|
+
import type { NormalizedConfig } from './config/mergeConfig';
|
|
7
|
+
export type { Hooks };
|
|
8
|
+
export * from './config';
|
|
9
|
+
export * from '@modern-js/plugin';
|
|
10
|
+
export * from '@modern-js/plugin/node';
|
|
11
|
+
export { manager, mountHook, usePlugins, createPlugin, registerHook } from './manager';
|
|
12
|
+
export type { CliHooks, CliPlugin, CliHookCallbacks } from './manager';
|
|
13
|
+
export { AppContext, ConfigContext, ResolvedConfigContext, useAppContext, useConfigContext, useResolvedConfigContext } from './pluginAPI';
|
|
14
|
+
export type { PluginAPI } from './pluginAPI';
|
|
15
|
+
export type { NormalizedConfig, IAppContext };
|
|
16
|
+
declare const initAppDir: (cwd?: string | undefined) => Promise<string>;
|
|
17
|
+
export interface CoreOptions {
|
|
18
|
+
configFile?: string;
|
|
19
|
+
serverConfigFile?: string;
|
|
20
|
+
packageJsonConfig?: string;
|
|
21
|
+
plugins?: typeof INTERNAL_PLUGINS;
|
|
22
|
+
transformPlugin?: TransformPlugin;
|
|
23
|
+
onSchemaError?: (error: ErrorObject) => void;
|
|
24
|
+
options?: {
|
|
25
|
+
metaName?: string;
|
|
26
|
+
srcDir?: string;
|
|
27
|
+
distDir?: string;
|
|
28
|
+
sharedDir?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export declare const mergeOptions: (options?: CoreOptions | undefined) => {
|
|
32
|
+
configFile?: string | undefined;
|
|
33
|
+
serverConfigFile: string;
|
|
34
|
+
packageJsonConfig?: string | undefined;
|
|
35
|
+
plugins?: {
|
|
36
|
+
[name: string]: {
|
|
37
|
+
cli?: string | undefined;
|
|
38
|
+
server?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
} | undefined;
|
|
41
|
+
transformPlugin?: TransformPlugin | undefined;
|
|
42
|
+
onSchemaError?: ((error: ErrorObject) => void) | undefined;
|
|
43
|
+
options?: {
|
|
44
|
+
metaName?: string | undefined;
|
|
45
|
+
srcDir?: string | undefined;
|
|
46
|
+
distDir?: string | undefined;
|
|
47
|
+
sharedDir?: string | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
};
|
|
50
|
+
export declare const cli: {
|
|
51
|
+
init: (argv?: string[], options?: CoreOptions | undefined) => Promise<{
|
|
52
|
+
loadedConfig: import("./config").LoadedConfig;
|
|
53
|
+
appContext: IAppContext;
|
|
54
|
+
resolved: NormalizedConfig;
|
|
55
|
+
}>;
|
|
56
|
+
run: (argv: string[], options?: CoreOptions | undefined) => Promise<void>;
|
|
57
|
+
restart: () => Promise<void>;
|
|
58
|
+
};
|
|
59
|
+
export { initAppDir, initAppContext };
|
|
60
|
+
declare module '@modern-js/utils/compiled/commander' {
|
|
61
|
+
interface Command {
|
|
62
|
+
commandsMap: Map<string, Command>;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LoadedConfig } from './config';
|
|
2
|
+
import { HooksRunner } from './manager';
|
|
3
|
+
export declare const initWatcher: (loaded: LoadedConfig, appDirectory: string, configDir: string | undefined, hooksRunner: HooksRunner, argv: string[]) => Promise<import("@modern-js/utils").FSWatcher | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const loadEnv: (appDirectory: string, mode?: string) => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { INTERNAL_PLUGINS } from '@modern-js/utils';
|
|
2
|
+
import type { UserConfig } from './config';
|
|
3
|
+
import { CliPlugin } from './manager';
|
|
4
|
+
declare type PluginItem = string | [string, any];
|
|
5
|
+
export declare type LoadedPlugin = {
|
|
6
|
+
cli?: CliPlugin;
|
|
7
|
+
server?: string;
|
|
8
|
+
serverPkg?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type TransformPlugin = (plugin: PluginConfig, resolvedConfig: UserConfig, pluginOptions?: any) => PluginConfig;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
* Using NewPluginConfig insteand.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
declare type OldPluginConfig = Array<PluginItem | {
|
|
17
|
+
cli?: PluginItem;
|
|
18
|
+
server?: PluginItem;
|
|
19
|
+
}>;
|
|
20
|
+
declare type NewPluginConfig = CliPlugin[] | {
|
|
21
|
+
cli?: CliPlugin[];
|
|
22
|
+
/** Custom server plugin is not supported yet. */
|
|
23
|
+
|
|
24
|
+
server?: never;
|
|
25
|
+
};
|
|
26
|
+
export declare type PluginConfig = OldPluginConfig | NewPluginConfig;
|
|
27
|
+
export declare function getAppPlugins(appDirectory: string, oldPluginConfig: OldPluginConfig, internalPlugins?: typeof INTERNAL_PLUGINS): (PluginItem | {
|
|
28
|
+
cli?: PluginItem | undefined;
|
|
29
|
+
server?: PluginItem | undefined;
|
|
30
|
+
})[];
|
|
31
|
+
/**
|
|
32
|
+
* Load internal plugins which in @modern-js scope and user's custom plugins.
|
|
33
|
+
* @param appDirectory - Application root directory.
|
|
34
|
+
* @param userConfig - Resolved user config.
|
|
35
|
+
* @param options.internalPlugins - Internal plugins.
|
|
36
|
+
* @param options.transformPlugin - transform plugin before using it. Used for compatible with legacy jupiter plugins.
|
|
37
|
+
* @returns Plugin Objects has been required.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
export declare const loadPlugins: (appDirectory: string, userConfig: UserConfig, options?: {
|
|
41
|
+
internalPlugins?: typeof INTERNAL_PLUGINS;
|
|
42
|
+
transformPlugin?: TransformPlugin;
|
|
43
|
+
}) => LoadedPlugin[];
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ToThreads, ToRunners, AsyncSetup, PluginOptions, AsyncWorkflow, AsyncWaterfall, ParallelWorkflow } from '@modern-js/plugin';
|
|
2
|
+
import type { Hooks } from '@modern-js/types';
|
|
3
|
+
import type { Command } from './utils/commander';
|
|
4
|
+
import type { NormalizedConfig } from './config/mergeConfig';
|
|
5
|
+
import type { UserConfig } from './config';
|
|
6
|
+
import { pluginAPI } from './pluginAPI';
|
|
7
|
+
export declare type HooksRunner = ToRunners<{
|
|
8
|
+
config: ParallelWorkflow<void, UserConfig>;
|
|
9
|
+
resolvedConfig: AsyncWaterfall<{
|
|
10
|
+
resolved: NormalizedConfig;
|
|
11
|
+
}>;
|
|
12
|
+
validateSchema: ParallelWorkflow<void>;
|
|
13
|
+
prepare: AsyncWorkflow<void, void>;
|
|
14
|
+
commands: AsyncWorkflow<{
|
|
15
|
+
program: Command;
|
|
16
|
+
}, void>;
|
|
17
|
+
watchFiles: ParallelWorkflow<void>;
|
|
18
|
+
fileChange: AsyncWorkflow<{
|
|
19
|
+
filename: string;
|
|
20
|
+
eventType: 'add' | 'change' | 'unlink';
|
|
21
|
+
}, void>;
|
|
22
|
+
beforeExit: AsyncWorkflow<void, void>;
|
|
23
|
+
beforeRestart: AsyncWorkflow<void, void>;
|
|
24
|
+
}>;
|
|
25
|
+
declare const baseHooks: {
|
|
26
|
+
config: ParallelWorkflow<void, UserConfig>;
|
|
27
|
+
resolvedConfig: AsyncWaterfall<{
|
|
28
|
+
resolved: NormalizedConfig;
|
|
29
|
+
}>;
|
|
30
|
+
validateSchema: ParallelWorkflow<void, unknown>;
|
|
31
|
+
prepare: AsyncWorkflow<void, void>;
|
|
32
|
+
commands: AsyncWorkflow<{
|
|
33
|
+
program: Command;
|
|
34
|
+
}, void>;
|
|
35
|
+
watchFiles: ParallelWorkflow<void, unknown>;
|
|
36
|
+
fileChange: AsyncWorkflow<{
|
|
37
|
+
filename: string;
|
|
38
|
+
eventType: 'add' | 'change' | 'unlink';
|
|
39
|
+
}, void>;
|
|
40
|
+
beforeExit: AsyncWorkflow<void, void>;
|
|
41
|
+
beforeRestart: AsyncWorkflow<void, void>;
|
|
42
|
+
};
|
|
43
|
+
/** All hooks of cli plugin. */
|
|
44
|
+
|
|
45
|
+
export declare type CliHooks = typeof baseHooks & Hooks;
|
|
46
|
+
/** All hook callbacks of cli plugin. */
|
|
47
|
+
|
|
48
|
+
export declare type CliHookCallbacks = ToThreads<CliHooks>;
|
|
49
|
+
export declare const manager: import("@modern-js/plugin").AsyncManager<CliHooks, {
|
|
50
|
+
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
51
|
+
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
52
|
+
useConfigContext: () => UserConfig;
|
|
53
|
+
useResolvedConfigContext: () => NormalizedConfig;
|
|
54
|
+
}>;
|
|
55
|
+
/** Plugin options of a cli plugin. */
|
|
56
|
+
|
|
57
|
+
export declare type CliPlugin = PluginOptions<CliHooks, AsyncSetup<CliHooks, typeof pluginAPI>>;
|
|
58
|
+
export declare const createPlugin: (setup?: AsyncSetup<CliHooks, {
|
|
59
|
+
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
60
|
+
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
61
|
+
useConfigContext: () => UserConfig;
|
|
62
|
+
useResolvedConfigContext: () => NormalizedConfig;
|
|
63
|
+
}> | undefined, options?: PluginOptions<CliHooks, AsyncSetup<CliHooks, {
|
|
64
|
+
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
65
|
+
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
66
|
+
useConfigContext: () => UserConfig;
|
|
67
|
+
useResolvedConfigContext: () => NormalizedConfig;
|
|
68
|
+
}>> | undefined) => import("@modern-js/plugin").AsyncPlugin<CliHooks, {
|
|
69
|
+
setAppContext: (value: import("@modern-js/types").IAppContext) => void;
|
|
70
|
+
useAppContext: () => import("@modern-js/types").IAppContext;
|
|
71
|
+
useConfigContext: () => UserConfig;
|
|
72
|
+
useResolvedConfigContext: () => NormalizedConfig;
|
|
73
|
+
}>, registerHook: (newHooks: Partial<CliHooks>) => void, mountHook: () => ToRunners<CliHooks>;
|
|
74
|
+
export declare const usePlugins: (plugins: string[]) => void;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommonAPI } from '@modern-js/plugin';
|
|
2
|
+
import type { CliHooks } from './manager';
|
|
3
|
+
import { AppContext, ConfigContext, useAppContext, useConfigContext, ResolvedConfigContext, useResolvedConfigContext } from './context';
|
|
4
|
+
export declare const pluginAPI: {
|
|
5
|
+
setAppContext: (value: import("@modern-js/types/cli").IAppContext) => void;
|
|
6
|
+
useAppContext: () => import("@modern-js/types/cli").IAppContext;
|
|
7
|
+
useConfigContext: () => import("./config").UserConfig;
|
|
8
|
+
useResolvedConfigContext: () => import(".").NormalizedConfig;
|
|
9
|
+
};
|
|
10
|
+
/** all apis for cli plugin */
|
|
11
|
+
|
|
12
|
+
export declare type PluginAPI = typeof pluginAPI & CommonAPI<CliHooks>;
|
|
13
|
+
export { AppContext, ConfigContext, ResolvedConfigContext, useAppContext, useConfigContext, useResolvedConfigContext };
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.9.
|
|
14
|
+
"version": "1.9.2",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"main": "./dist/index.js",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
"sideEffects": false,
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"registry": "https://registry.npmjs.org/",
|
|
72
|
-
"access": "public"
|
|
72
|
+
"access": "public",
|
|
73
|
+
"types": "./dist/index.d.ts"
|
|
73
74
|
},
|
|
74
75
|
"scripts": {
|
|
75
76
|
"new": "modern new",
|
|
76
77
|
"build": "tsc",
|
|
77
78
|
"dev": "tsc --watch",
|
|
78
79
|
"test": "jest"
|
|
79
|
-
}
|
|
80
|
-
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
80
|
+
}
|
|
81
81
|
}
|