@tarojs/runner-utils 3.7.0-alpha.13 → 3.7.0-alpha.15

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/index.js CHANGED
@@ -1,14 +1,20 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MultiPlatformPlugin = exports.getViteMiniCompiler = exports.getViteH5Compiler = exports.getSassLoaderOption = exports.getBundleResult = exports.getBundleContent = exports.DEFAULT_Components = void 0;
4
- const constant_1 = require("./constant");
5
- Object.defineProperty(exports, "DEFAULT_Components", { enumerable: true, get: function () { return constant_1.DEFAULT_Components; } });
6
- const MultiPlatformPlugin_1 = require("./resolve/MultiPlatformPlugin");
7
- Object.defineProperty(exports, "MultiPlatformPlugin", { enumerable: true, get: function () { return MultiPlatformPlugin_1.MultiPlatformPlugin; } });
8
- const scss_1 = require("./scss");
9
- Object.defineProperty(exports, "getBundleContent", { enumerable: true, get: function () { return scss_1.getBundleContent; } });
10
- Object.defineProperty(exports, "getBundleResult", { enumerable: true, get: function () { return scss_1.getBundleResult; } });
11
- Object.defineProperty(exports, "getSassLoaderOption", { enumerable: true, get: function () { return scss_1.getSassLoaderOption; } });
12
- const vite_1 = require("./vite");
13
- Object.defineProperty(exports, "getViteH5Compiler", { enumerable: true, get: function () { return vite_1.getViteH5Compiler; } });
14
- Object.defineProperty(exports, "getViteMiniCompiler", { enumerable: true, get: function () { return vite_1.getViteMiniCompiler; } });
17
+ __exportStar(require("./constant"), exports);
18
+ __exportStar(require("./resolve/MultiPlatformPlugin"), exports);
19
+ __exportStar(require("./scss"), exports);
20
+ __exportStar(require("./vite"), exports);
package/dist/vite.js CHANGED
@@ -9,23 +9,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getViteMiniCompiler = exports.getViteH5Compiler = void 0;
12
+ exports.getViteMiniCompilerContext = exports.getViteH5CompilerContext = void 0;
13
13
  const constant_1 = require("./constant");
14
- function getViteH5Compiler(rollupPluginContext) {
14
+ function getViteH5CompilerContext(rollupPluginContext) {
15
15
  return __awaiter(this, void 0, void 0, function* () {
16
16
  const info = process.env.NODE_ENV === 'production'
17
17
  ?
18
18
  rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL)
19
19
  :
20
20
  yield rollupPluginContext.load({ id: constant_1.VITE_COMPILER_LABEL });
21
- const compiler = info === null || info === void 0 ? void 0 : info.meta.compiler;
21
+ const compiler = info === null || info === void 0 ? void 0 : info.meta.viteCompilerContext;
22
22
  return compiler;
23
23
  });
24
24
  }
25
- exports.getViteH5Compiler = getViteH5Compiler;
26
- function getViteMiniCompiler(rollupPluginContext) {
25
+ exports.getViteH5CompilerContext = getViteH5CompilerContext;
26
+ function getViteMiniCompilerContext(rollupPluginContext) {
27
27
  const info = rollupPluginContext.getModuleInfo(constant_1.VITE_COMPILER_LABEL);
28
- const compiler = info === null || info === void 0 ? void 0 : info.meta.compiler;
28
+ const compiler = info === null || info === void 0 ? void 0 : info.meta.viteCompilerContext;
29
29
  return compiler;
30
30
  }
31
- exports.getViteMiniCompiler = getViteMiniCompiler;
31
+ exports.getViteMiniCompilerContext = getViteMiniCompilerContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/runner-utils",
3
- "version": "3.7.0-alpha.13",
3
+ "version": "3.7.0-alpha.15",
4
4
  "description": "Taro runner utilities.",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
@@ -19,7 +19,13 @@
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
21
  "scss-bundle": "^3.0.2",
22
- "@tarojs/helper": "3.7.0-alpha.13"
22
+ "@tarojs/helper": "3.7.0-alpha.15",
23
+ "@tarojs/taro": "3.7.0-alpha.15"
24
+ },
25
+ "peerDependenciesMeta": {
26
+ "rollup": {
27
+ "optional": true
28
+ }
23
29
  },
24
30
  "scripts": {
25
31
  "build": "tsc",
package/types/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { DEFAULT_Components } from './constant';
2
- import { MultiPlatformPlugin } from './resolve/MultiPlatformPlugin';
3
- import { getBundleContent, getBundleResult, getSassLoaderOption } from './scss';
4
- import { getViteH5Compiler, getViteMiniCompiler } from './vite';
5
- export { DEFAULT_Components, getBundleContent, getBundleResult, getSassLoaderOption, getViteH5Compiler, getViteMiniCompiler, MultiPlatformPlugin };
1
+ export * from './constant';
2
+ export * from './resolve/MultiPlatformPlugin';
3
+ export * from './scss';
4
+ export * from './vite';
package/types/vite.d.ts CHANGED
@@ -1,2 +1,4 @@
1
- export declare function getViteH5Compiler(rollupPluginContext: any): Promise<any>;
2
- export declare function getViteMiniCompiler(rollupPluginContext: any): any;
1
+ import type { ViteH5CompilerContext, ViteMiniCompilerContext } from '@tarojs/taro/types/compile/viteCompilerContext';
2
+ import type { PluginContext } from 'rollup';
3
+ export declare function getViteH5CompilerContext(rollupPluginContext: PluginContext): Promise<ViteH5CompilerContext | undefined>;
4
+ export declare function getViteMiniCompilerContext(rollupPluginContext: PluginContext): ViteMiniCompilerContext | undefined;