New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coralite

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coralite - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

docs/basic-templating.md

3

bin/coralite.js

@@ -13,3 +13,4 @@ #!/usr/bin/env node

const pkg = JSON.parse(readFileSync(`./package.json`, 'utf-8'))
const pkgPath = new URL('../package.json', import.meta.url)
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'))
const program = new Command()

@@ -16,0 +17,0 @@

{
"name": "coralite",
"version": "0.4.1",
"version": "0.4.2",
"description": "HTML modules static site generator",

@@ -28,3 +28,3 @@ "main": "./lib/coralite.js",

"commitmsg": "commitlint -e",
"format": "eslint --cache --fix .",
"lint-format": "eslint --cache --fix .",
"lint": "eslint --cache .",

@@ -31,0 +31,0 @@ "test-unit": "node --test test/lib/*",

@@ -5,2 +5,4 @@ # Coralite

[Getting started: Basic templating](./docs/basic-templating.md)
## Installation

@@ -54,3 +56,3 @@

- **-c or --templates**: The path to your templates directory containing reusable UI elements (e.g., `-c ./src/templates`).
- **-t or --templates**: The path to your templates directory containing reusable UI elements (e.g., `-c ./src/templates`).
- **-p or --pages**: The path to your pages directory where static HTML files reside (e.g., `-p ./src/pages`).

@@ -57,0 +59,0 @@ - **--output or -o**: The output directory for the generated site (e.g., `--output ./dist`).

@@ -21,8 +21,28 @@ import { test, expect } from '@playwright/test'

test('', async ({ page }) => {
test('has custom element with default slot', async ({ page }) => {
await page.goto('/about.html')
await expect(page.locator('body')).toMatchAriaSnapshot(`
- text: test
`)
})
test('has aggregate content', async ({ page }) => {
await page.goto('/blog/index.html')
await expect(page.locator('body')).toMatchAriaSnapshot(`
- text: Hello
- banner: This is the mighty header
- heading "Post 1" [level=2]
- text: Nemo
- time: Wed, 8 Jan 25
- img "Photo of a cat"
- text: short description
- banner: This is the mighty header
- heading "Post 2" [level=2]
- text: Nemo
- time: Thu, 9 Jan 25
- img "Photo of a dog"
- text: short description
- banner: This is the mighty header
- text: world

@@ -32,1 +52,17 @@ `)

test('has named slots', async ({ page }) => {
await page.goto('/blog/index.html')
const metaName = page.locator('meta[name="name"]')
const metaDescription = page.locator('meta[name="description"]')
const metaDefaultHello = page.locator('meta[name="default-hello"]')
const metaDefaultWorld = page.locator('meta[name="default-world"]')
// named slots
await expect(metaName).toHaveAttribute('content', 'coralite')
await expect(metaDescription).toHaveAttribute('content', 'look mum, no database!')
// default slots
await expect(metaDefaultHello).toHaveAttribute('content', 'hello')
await expect(metaDefaultWorld).toHaveAttribute('content', 'world')
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc