Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Hristov <[email protected]>
  • Loading branch information
NikolaRHristov committed Jun 12, 2024
1 parent f054302 commit 62e4353
Show file tree
Hide file tree
Showing 70 changed files with 602 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Source/Interface/CSS/lightningcss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
*
*/
export default interface Interface
extends Omit<TransformOptions<CustomAtRules>, "filename" | "code"> {
extends Omit<
TransformOptions<CustomAtRules>,
"filename" | "code" | "unusedSymbols"
> {
/**
* Whether to enable minification
*
* @default Compress true
* @default lightningcss false
*/
minify?: boolean;
/**
* Whether to remove unused selectors or keywords.
*
* @default Compress false
* @default lightningcss undefined
*/
unusedSymbols?: string[] | boolean;
}

import type { CustomAtRules, TransformOptions } from "lightningcss";
1 change: 1 addition & 0 deletions Source/Variable/CSS/lightningcss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
export default {
minify: true,
sourceMap: false,
unusedSymbols: false,
} satisfies Interface as Interface;

import type Interface from "../../Interface/CSS/lightningcss.js";
7 changes: 7 additions & 0 deletions Target/Function/Directory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @module Directory
*
*/
declare const _default: Interface;
export default _default;
import type Interface from "../Interface/Directory.js";
1 change: 1 addition & 0 deletions Target/Function/Directory.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Target/Function/Image/Writesharp.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* @module Image
*
*/
declare const _default: Interface;
export default _default;
import type Interface from "../../Interface/Image/Writesharp.js";
export declare const _Map: import("../../Interface/Map.js").default;
1 change: 1 addition & 0 deletions Target/Function/Image/Writesharp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

104 changes: 104 additions & 0 deletions Target/Function/Integration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/**
* @module Integration
*
*/
export declare let System: string;
declare const _default: Interface;
export default _default;
import type Interface from "../Interface/Integration.js";
import type Action from "@playform/pipe/Target/Interface/Action.js";
export declare const Default: {
Path: string;
Cache: {
Search: string;
Folder: string;
};
Logger: 2;
Action: {
Failed: ({ Input }: import("@playform/pipe/Target/Interface/File.js").default) => Promise<string>;
Passed: ({ Before, Buffer }: import("@playform/pipe/Target/Interface/File.js").default) => Promise<boolean>;
Accomplished: ({ Input, Before, After }: import("@playform/pipe/Target/Interface/File.js").default) => Promise<string>;
Changed: (Plan: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise<any>;
Read: ({ Input }: import("@playform/pipe/Target/Interface/File.js").default) => Promise<string>;
Wrote: ({ Buffer }: import("@playform/pipe/Target/Interface/File.js").default) => Promise<import("@playform/pipe/Target/Type/Buffer.js").Type>;
Fulfilled: ({ File }: import("@playform/pipe/Target/Interface/Plan.js").default) => Promise<string | false>;
};
File: string;
Exclude: false;
CSS: {
csso: import("../Interface/CSS/csso.js").default;
lightningcss: import("../Interface/CSS/lightningcss.js").default;
};
HTML: {
"html-minifier-terser": {
caseSensitive: true;
collapseInlineTagWhitespace: false;
collapseWhitespace: true;
continueOnParseError: true;
html5: true;
ignoreCustomComments: RegExp[];
includeAutoGeneratedTags: true;
keepClosingSlash: true;
minifyCSS: true;
minifyJS: true;
minifyURLs: false;
noNewlinesBeforeTagClose: true;
preventAttributesEscaping: false;
processConditionalComments: false;
processScripts: string[];
quoteCharacter: string;
removeAttributeQuotes: true;
removeComments: true;
removeScriptTypeAttributes: true;
removeStyleLinkTypeAttributes: true;
removeTagWhitespace: false;
sortAttributes: true;
sortClassName: true;
trimCustomFragments: true;
useShortDoctype: false;
};
};
Image: {
sharp: import("../Interface/Image/sharp.js").default;
};
JavaScript: {
terser: {
ecma: 5;
enclose: false;
keep_classnames: false;
keep_fnames: false;
ie8: false;
module: false;
safari10: false;
toplevel: false;
format: {
comments: false;
};
};
};
SVG: {
svgo: {
multipass: true;
js2svg: {
indent: number;
pretty: false;
};
plugins: "preset-default"[];
};
};
Map: import("../Interface/Map.js").default;
Parser: import("../Interface/Parser.js").default;
};
export declare const Search: string;
export declare const Merge: <Ts extends readonly unknown[]>(...objects: Ts) => import("deepmerge-ts").DeepMergeHKT<Ts, Readonly<{
DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
DeepMergeArraysURI: "DeepMergeArraysDefaultURI";
DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
DeepMergeOthersURI: "DeepMergeLeafURI";
DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI";
}>, Readonly<{
key: PropertyKey;
parents: readonly Readonly<Record<PropertyKey, unknown>>[];
}>>;
export declare let _Action: Action;
2 changes: 2 additions & 0 deletions Target/Function/Integration.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Target/Function/Merge.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @module Merge
*
*/
declare const _default: <Ts extends readonly unknown[]>(...objects: Ts) => import("deepmerge-ts").DeepMergeHKT<Ts, Readonly<{
DeepMergeRecordsURI: "DeepMergeRecordsDefaultURI";
DeepMergeArraysURI: "DeepMergeArraysDefaultURI";
DeepMergeSetsURI: "DeepMergeSetsDefaultURI";
DeepMergeMapsURI: "DeepMergeMapsDefaultURI";
DeepMergeOthersURI: "DeepMergeLeafURI";
DeepMergeFilterValuesURI: "DeepMergeFilterValuesDefaultURI";
}>, Readonly<{
key: PropertyKey;
parents: readonly Readonly<Record<PropertyKey, unknown>>[];
}>>;
export default _default;
1 change: 1 addition & 0 deletions Target/Function/Merge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var e=(await import("deepmerge-ts")).deepmergeCustom({mergeArrays:!1});export{e as default};
32 changes: 32 additions & 0 deletions Target/Interface/CSS/csso.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* @module CSS
*
*/
export default interface Interface extends MinifyOptions, CompressOptions {
/**
* Specify what comments to leave:
* - 'exclamation' or true – leave all exclamation comments
* - 'first-exclamation' – remove every comment except first one
* - false – remove all comments
*
* @default Compress false
* @default csso true
*/
comments?: boolean;
/**
* Enables merging of @media rules with the same media query by splitted by other rules.
* The optimisation is unsafe in general, but should work fine in most cases. Use it on your own risk.
*
* @default Compress true
* @default csso false
*/
forceMediaMerge?: boolean;
/**
* Disable or enable a structure optimisations.
*
* @default CompressAstro false
* @default csso true
*/
restructure?: boolean;
}
import type { CompressOptions, MinifyOptions } from "csso";
Empty file added Target/Interface/CSS/csso.js
Empty file.
14 changes: 14 additions & 0 deletions Target/Interface/CSS/lightningcss.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* @module CSS
*
*/
export default interface Interface extends Omit<TransformOptions<CustomAtRules>, "filename" | "code" | "unusedSymbols"> {
/**
* Whether to enable minification
*
* @default Compress true
* @default lightningcss false
*/
minify?: boolean;
}
import type { CustomAtRules, TransformOptions } from "lightningcss";
Empty file.
9 changes: 9 additions & 0 deletions Target/Interface/Directory.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="node" />
/**
* @module Directory
*
*/
export default interface Interface {
(Path: string): Promise<ParsedPath["dir"]>;
}
import type { ParsedPath } from "path";
Empty file added Target/Interface/Directory.js
Empty file.
11 changes: 11 additions & 0 deletions Target/Interface/Image/Onsharp.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* @module Image
*
*/
export default interface Interface extends Omit<File, "Buffer"> {
Buffer: {
[key: string]: any;
} & Sharp;
}
import type File from "@playform/pipe/Target/Interface/File.js";
import type { Sharp } from "sharp";
Empty file.
9 changes: 9 additions & 0 deletions Target/Interface/Image/Writesharp.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @module Image
*
*/
export default interface Interface {
(Option: Option, On: On): Promise<any>;
}
import type On from "../../Interface/Image/Onsharp.js";
import type Option from "../../Interface/Image/sharp.js";
Empty file.
16 changes: 16 additions & 0 deletions Target/Interface/Image/sharp.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @module Image
*
*/
export default interface Interface {
[key: string]: AvifOptions | GifOptions | HeifOptions | JpegOptions | PngOptions | SharpOptions | TiffOptions | WebpOptions | boolean | undefined;
avif?: boolean | AvifOptions;
gif?: boolean | GifOptions;
heif?: boolean | HeifOptions;
jpeg?: boolean | JpegOptions;
png?: boolean | PngOptions;
tiff?: boolean | TiffOptions;
webp?: boolean | WebpOptions;
sharp?: boolean | SharpOptions;
}
import type { AvifOptions, GifOptions, HeifOptions, JpegOptions, PngOptions, SharpOptions, TiffOptions, WebpOptions } from "sharp";
Empty file added Target/Interface/Image/sharp.js
Empty file.
9 changes: 9 additions & 0 deletions Target/Interface/Integration.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @module Integration
*
*/
export default interface Interface {
(Option?: Option): AstroIntegration;
}
import type { AstroIntegration } from "astro";
import type Option from "../Interface/Option.js";
Empty file added Target/Interface/Integration.js
Empty file.
7 changes: 7 additions & 0 deletions Target/Interface/Map.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @module Map
*
*/
export default interface Interface {
[key: string]: string;
}
Empty file added Target/Interface/Map.js
Empty file.
61 changes: 61 additions & 0 deletions Target/Interface/Option.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* @module Option
*
*/
export default interface Interface extends Option {
/**
* csso, lightningcss option properties
*
*/
CSS?: boolean | {
csso?: csso;
lightningcss?: lightningcss;
};
/**
* html-minifier-terser option properties
*
*/
HTML?: boolean | {
"html-minifier-terser"?: html_minifier_terser;
};
/**
* sharp option properties
*
*/
Image?: boolean | {
sharp?: sharp;
};
/**
* terser option properties
*
*/
JavaScript?: boolean | {
terser?: terser;
};
/**
* svgo option properties
*
*/
SVG?: boolean | {
svgo?: svgo;
};
/**
* Map to different file paths
*
*/
Map?: boolean | _Map;
/**
* Parsers for different file types
*
*/
Parser?: Parser;
}
import type csso from "../Interface/CSS/csso.js";
import type lightningcss from "../Interface/CSS/lightningcss.js";
import type sharp from "../Interface/Image/sharp.js";
import type html_minifier_terser from "../Type/HTML/html-minifier-terser.js";
import type terser from "../Type/JavaScript/terser.js";
import type svgo from "../Type/SVG/svgo.js";
import type _Map from "../Interface/Map.js";
import type Parser from "../Interface/Parser.js";
import type Option from "@playform/pipe/Target/Interface/Option.js";
Empty file added Target/Interface/Option.js
Empty file.
17 changes: 17 additions & 0 deletions Target/Interface/Parser.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @module Parser
*
*/
export default interface Interface {
[key: string]: any;
CSS?: CSS | CSS[];
HTML?: HTML | HTML[];
Image?: Image | Image[];
JavaScript?: JavaScript | JavaScript[];
SVG?: SVG | SVG[];
}
import type CSS from "../Type/Parser/CSS.js";
import type HTML from "../Type/Parser/HTML.js";
import type Image from "../Type/Parser/Image.js";
import type JavaScript from "../Type/Parser/JavaScript.js";
import type SVG from "../Type/Parser/SVG.js";
Empty file added Target/Interface/Parser.js
Empty file.
7 changes: 7 additions & 0 deletions Target/Type/HTML/html-minifier-terser.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @module HTML
*
*/
export type Type = Options;
export type { Type as default };
import type { Options } from "html-minifier-terser";
Empty file.
7 changes: 7 additions & 0 deletions Target/Type/Image/Filesharp.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* @module File
*
*/
export type Type = keyof typeof _Map;
export type { Type as default };
export declare const _Map: import("../../Interface/Map").default;
1 change: 1 addition & 0 deletions Target/Type/Image/Filesharp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const{default:e}=await import("../../Variable/Image/Mapsharp.js");export{e as _Map};
Loading

0 comments on commit 62e4353

Please sign in to comment.