Gathering detailed insights and metrics for femtosite
Gathering detailed insights and metrics for femtosite
npm install femtosite
Typescript
Module System
Min. Node Version
Node Version
NPM Version
58.3
Supply Chain
81.4
Quality
78.2
Maintenance
100
Vulnerability
97
License
Cumulative downloads
Total Downloads
Last day
500%
6
Compared to previous day
Last week
0%
7
Compared to previous week
Last month
333.3%
26
Compared to previous month
Last year
-42.5%
871
Compared to previous year
18
21
Extremely tiny static site generator based on TSX templates.
We've created an easy interactive init process, start by calling the command in your favourite terminal:
1npx femtosite init
The guide will now help setup the femtosite.json
config file and make sure you hit the ground running.
Once you're ready to build your static site run:
1npx femtosite build 2# OR 3npm run build
Femtosite will now transpile your TSX pages and render them afterwards, while taking care of any assets referenced with either the <StyleAsset />
or <ScriptAsset />
built in components.
1import { createPage } from 'femtosite'; 2 3import { HelloWorld } from '../components/hello-world.component.js'; 4import { Shell } from '../components/shell.component.js'; 5 6export default createPage(async page => ( 7 <Shell page={page}> 8 <HelloWorld /> 9 </Shell> 10));
1import { FemtositePageProps, Html, ScriptAsset, StyleAsset } from 'femtosite'; 2 3export const Shell = async ( 4 { page }: { page: FemtositePageProps }, 5 ...children 6) => ( 7 <Html lang="en"> 8 <head> 9 <StyleAsset src="./assets/style.css" inline={true} /> 10 <StyleAsset src="./scss/main.scss" /> 11 <ScriptAsset src="./assets/app.js" inline={true} /> 12 <ScriptAsset src="./assets/app.js" async={true} /> 13 </head> 14 <body>{...children}</body> 15 </Html> 16);
1export const HelloWorld = () => ( 2 <div> 3 <h1>Hello World</h1> 4 <p>Welcome to your new Femtosite!</p> 5 </div> 6);
No vulnerabilities found.
No security vulnerabilities found.