@dcloudio/uni-cli-shared 3.0.0-alpha-3040420220402005 → 3.0.0-alpha-3040420220402006

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 declare function isMiniProgramAssetFile(filename: string): boolean;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.isMiniProgramAssetFile = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const EXTNAMES = [
9
+ '.png',
10
+ '.jpg',
11
+ '.jpeg',
12
+ '.gif',
13
+ '.svg',
14
+ '.json',
15
+ '.cer',
16
+ '.mp3',
17
+ '.aac',
18
+ '.m4a',
19
+ '.mp4',
20
+ '.wav',
21
+ '.ogg',
22
+ '.silk',
23
+ '.wasm',
24
+ '.br',
25
+ '.cert',
26
+ ];
27
+ function isMiniProgramAssetFile(filename) {
28
+ if (!path_1.default.isAbsolute(filename)) {
29
+ return false;
30
+ }
31
+ return EXTNAMES.includes(path_1.default.extname(filename));
32
+ }
33
+ exports.isMiniProgramAssetFile = isMiniProgramAssetFile;
@@ -3,6 +3,7 @@ export * from './wxs';
3
3
  export * from './nvue';
4
4
  export * from './event';
5
5
  export * from './style';
6
+ export * from './assets';
6
7
  export * from './template';
7
8
  export * from './constants';
8
9
  export { HTML_TO_MINI_PROGRAM_TAGS } from './tags';
package/dist/mp/index.js CHANGED
@@ -20,6 +20,7 @@ __exportStar(require("./wxs"), exports);
20
20
  __exportStar(require("./nvue"), exports);
21
21
  __exportStar(require("./event"), exports);
22
22
  __exportStar(require("./style"), exports);
23
+ __exportStar(require("./assets"), exports);
23
24
  __exportStar(require("./template"), exports);
24
25
  __exportStar(require("./constants"), exports);
25
26
  var tags_1 = require("./tags");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-3040420220402005",
3
+ "version": "3.0.0-alpha-3040420220402006",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "@babel/core": "^7.17.8",
22
22
  "@babel/parser": "^7.16.4",
23
23
  "@babel/types": "^7.16.8",
24
- "@dcloudio/uni-i18n": "3.0.0-alpha-3040420220402005",
25
- "@dcloudio/uni-shared": "3.0.0-alpha-3040420220402005",
24
+ "@dcloudio/uni-i18n": "3.0.0-alpha-3040420220402006",
25
+ "@dcloudio/uni-shared": "3.0.0-alpha-3040420220402006",
26
26
  "@rollup/pluginutils": "^4.2.0",
27
27
  "@vue/compiler-core": "3.2.31",
28
28
  "@vue/compiler-dom": "3.2.31",