-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: eleventy plugin #46
base: next
Are you sure you want to change the base?
Conversation
c7a6d12
to
c26a3c8
Compare
c26a3c8
to
012915f
Compare
a096fa4
to
a39858b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
مطمئنی تست کردی؟
@@ -30,11 +30,12 @@ if (!platformInfo.development) { | |||
|
|||
const postCss = /* @__PURE__ */ postcss(postCssPlugins); | |||
|
|||
export async function postcssBuild(): Promise<void> { | |||
logger.logMethod?.('postcssBuild'); | |||
export async function postcssBuild(options: {inputDir: string, outputDir: string}): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use defined type
comepelte docs for all functions
export async function postcssBuild(): Promise<void> { | ||
logger.logMethod?.('postcssBuild'); | ||
export async function postcssBuild(options: {inputDir: string, outputDir: string}): Promise<void> { | ||
postCssPlugins[0] = /* @__PURE__ */ postcssImport({ root: options.inputDir }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
این چیه؟
/** | ||
* Options for the eleventyMinifyHtmlPlugin. | ||
*/ | ||
type EleventyPostCssPluginOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
تایپ ها باید بالای فایل تعریف بشن
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export function eleventyPostCssBuildPlugin(eleventyConfig: any, options: EleventyPostCssPluginOptions): void { | ||
// TODO: better event handling to just copy for the first time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
؟
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access | ||
eleventyConfig.addTransform('minifyHtml', minifyingHtml); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
اینو کلا نفهمیدم چطوری اینطوری شده
/** | ||
* The mode for the service worker. | ||
*/ | ||
mode: 'production' | 'development', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
لازم نیست مود رو از خودش بپرسی
خودت مستقیم بگیر
همچنین مود development ما کلا حذف شده
هدف چی بوده؟
export async function generateServiceWorker(options:{ | ||
outputDir: string, | ||
deploymentServiceWorkerContent: string, | ||
nameOfServiceWorker: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
service worker path for both outdir and name
const serviceWorkerDest = 'dist/service-worker.js'; | ||
|
||
export async function generateServiceWorker(): Promise<BuildResult | null> { | ||
export async function generateServiceWorker(options:{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
این فایل خیلی مهمه
هر کار خاصی رو انجام میده باید بکشیم بیرون
اپشن هم خالیه
خواستی بری سراغش بپرس
Description
Tasks
Code & Documentation:
Project Management & Tracking:
Deployment & Testing (If Applicable):