
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
lll-components
Advanced tools
This is a poc to:
have a component library for all web UI components.
Install yarn install wae-components@1.0.0
or from the repos url yarn install https://github.com/Lululemon/wae-components
Use it in your project!
// import it
import Page from 'wae-components/components/Page';
import Header from 'wae-components/components/Header';
// use it
const HomePage = () => (
<Page>
<Header
title="my title"
/>
</Page>
);
This renders static markup *per-*component
yarn export
this runs
"export": "node generate-static-markup.js"
and outputs html fragments based off of the partials to the markup
directory.
Example.*
Input src/component/Header.js
:
import React from "react";
export default class Header extends React.Component {
render(){
return <div>Hello Header</div>;
}
}
Output markup/Header.html
:
<div>Hello Header</div>
This can be use in many ways like some of the following.
Use case 1:
import React from "react";
import ReactDOM from "react-dom";
// these props will be the default props used with ssr and the static markup
const headerProps = {
title: "my title"
}
ReactDOM.render(<Page />, document.getElementById("page"));
ReactDOM.render(<Header {...headerProps}/>, document.getElementById("header"));
index.html should have:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Example App</title>
</head>
<body>
<section id="header"></section>
<section id="page"></section>
</body>
</html>
Use case 2:
const renderTemplate = ({
title,
Partials
}) => `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>${title}</title>
</head>
<body>
${Partials.Header}
${Partials.Page}
</body>
</html>
)`
import renderTemplate from './renderTemplate'
app.use('*', (req,res)=>{
const myTemplate = renderTemplate({
title: "my title",
Partials
})
res.send(myTemplate)
})
FAQs
WAE Component Library
The npm package lll-components receives a total of 3 weekly downloads. As such, lll-components popularity was classified as not popular.
We found that lll-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.