Skip to content
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

Open
wants to merge 5 commits into
base: next
Choose a base branch
from
Open

feat: eleventy plugin #46

wants to merge 5 commits into from

Conversation

arashagp
Copy link
Contributor

@arashagp arashagp commented Jan 23, 2025

Description

Tasks

Code & Documentation:

  • 📝 Self-Review: Thoroughly review your code changes.
  • 📚 Code Documentation: Update/create all necessary in-code documentation.
  • 📖 User Guides (If Applicable): Add necessary guides to README or other help files.
  • 🎨 Formatting: Ensure code is properly formatted.

Project Management & Tracking:

  • 📅 Daily Report (If Applicable): Record changes in the company's daily report.
  • ⬆️ GitHub Management: Ensure PR is assigned, added to the correct project, and has appropriate labels. Confirm it adheres to the single purpose principle.
  • 🏷️ Set Label: Select and apply the appropriate label(s) for this pull request (e.g., bug, feature, enhancement, documentation). This helps categorize and track the changes.
  • 🎯 Single Purpose PR: Confirm this PR addresses a single, well-defined change.

Deployment & Testing (If Applicable):

  • 🔄 Rebase: Ensure your branch is rebased and updated.
  • Local Deployment Testing: Deploy and test locally if changes affect functionality.

@arashagp arashagp self-assigned this Jan 23, 2025
@arashagp arashagp requested a review from njfamirm as a code owner January 23, 2025 05:21
@arashagp arashagp force-pushed the feat/eleventy-plugin branch from c7a6d12 to c26a3c8 Compare January 23, 2025 06:11
@arashagp arashagp force-pushed the feat/eleventy-plugin branch from c26a3c8 to 012915f Compare January 23, 2025 06:15
@arashagp arashagp force-pushed the feat/eleventy-plugin branch from a096fa4 to a39858b Compare January 23, 2025 06:25
@arashagp arashagp added the new-feature New features or options. label Jan 23, 2025
Copy link
Member

@njfamirm njfamirm left a 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> {
Copy link
Member

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 });
Copy link
Member

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 = {
Copy link
Member

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
Copy link
Member

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);
}

Copy link
Member

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',
Copy link
Member

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,
Copy link
Member

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:{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

این فایل خیلی مهمه
هر کار خاصی رو انجام میده باید بکشیم بیرون
اپشن هم خالیه

خواستی بری سراغش بپرس

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New features or options.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants