@normed/bundle 2.0.6 → 2.1.0

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/bundles/log.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare type LogFunction = (...message: any[]) => void;
2
- declare type LogLevel = 'debug' | 'verbose' | 'info' | 'warn' | 'error' | 'critical';
2
+ declare type LogLevel = "debug" | "verbose" | "info" | "warn" | "error" | "critical";
3
3
  export declare function setMinLogLevel(level: number | LogLevel): void;
4
4
  declare const logFunctions: {
5
5
  [level in LogLevel]: LogFunction;
@@ -1,9 +1,9 @@
1
1
  import { Chalk } from "chalk";
2
- export declare type Platform = 'web' | 'server';
2
+ export declare type Platform = "web" | "server" | "library";
3
3
  export declare type Builder = {
4
4
  inExt: (string | RegExp)[];
5
5
  outExt: string | null;
6
- build(entrypoints: Entrypoint[], extra: BuildConfig['extra']): Promise<void>;
6
+ build(entrypoints: Entrypoint[], extra: BuildConfig["extra"]): Promise<void>;
7
7
  name: string;
8
8
  color: Chalk;
9
9
  };
@@ -38,6 +38,8 @@ export declare type APIOptions_Bundle = {
38
38
  platform?: Platform;
39
39
  analyse?: boolean;
40
40
  tscDeclarations?: boolean;
41
+ tscExternal?: string[];
42
+ entrypoints?: string[];
41
43
  };
42
44
  export declare type APIOptions_Clean = {
43
45
  analyse?: boolean;
@@ -1,9 +1,9 @@
1
- import '@normed/json-types';
2
- import { RefinementFunctionType } from '@normed/refinements';
3
- import { Platform, BuildConfig } from './types';
1
+ import "@normed/json-types";
2
+ import { RefinementFunctionType } from "@normed/refinements";
3
+ import { Platform, BuildConfig } from "./types";
4
4
  export declare function groupBy<O>(objs: O[], keys: (keyof O)[]): O[][];
5
5
  export declare function readPackageJson(buildConfig: BuildConfig): Promise<PackageJson>;
6
- export declare function getPlatformPart(file: string): null | 'static' | 'browser' | 'node' | 'web' | 'server';
6
+ export declare function getPlatformPart(file: string): null | "static" | "browser" | "node" | "web" | "server";
7
7
  export declare function getPlatform(file: string, basePlatform: Platform): Platform;
8
8
  export declare function divide<A, B>(list: (A | B)[], divider: (v: A | B) => v is A): [A[], B[]];
9
9
  export declare function join(...parts: (string | undefined)[]): string;
@@ -11,11 +11,16 @@ export declare const refinePackageJson: import("@normed/refinements").Refinement
11
11
  bundle: {
12
12
  entrypoints: string[] | undefined;
13
13
  analyse: boolean | undefined;
14
+ indir: string | undefined;
15
+ outdir: string | undefined;
14
16
  typescript: {
15
- external: string[] | undefined;
17
+ external: string[] | "*" | undefined;
16
18
  declarations: boolean | undefined;
17
19
  } | undefined;
18
20
  } | undefined;
21
+ dependencies: {
22
+ [x: string]: string;
23
+ } | undefined;
19
24
  }>;
20
25
  export declare type PackageJson = RefinementFunctionType<typeof refinePackageJson>;
21
26
  export declare const canRefinePackageJson: {
@@ -24,11 +29,16 @@ export declare const canRefinePackageJson: {
24
29
  bundle: {
25
30
  entrypoints: string[] | undefined;
26
31
  analyse: boolean | undefined;
32
+ indir: string | undefined;
33
+ outdir: string | undefined;
27
34
  typescript: {
28
- external: string[] | undefined;
35
+ external: string[] | "*" | undefined;
29
36
  declarations: boolean | undefined;
30
37
  } | undefined;
31
38
  } | undefined;
39
+ dependencies: {
40
+ [x: string]: string;
41
+ } | undefined;
32
42
  });
33
43
  /**
34
44
  * Get the extension of the file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@normed/bundle",
3
3
  "author": "Normal Gaussian <normed.bundle@normal-gaussian.com>",
4
- "version": "2.0.6",
4
+ "version": "2.1.0",
5
5
  "bin": "bundles/bin/cli.js",
6
6
  "main": "bundles/index.js",
7
7
  "types": "dist",