Tailwind CSS "Printing Press" for Static Modules.
Works with 0Scrape (imgnx/open-src-scrape)
to create a scraper that can convert a website's CSS to TailwindCSS.
To initialize, just copy the files from the src/__template
directory into a folder with the name of your website or run init.sh
or init.bat
, passing your websites as an environment (or "PATH") variable (WEBSITE
).
Examples:
# MacOS
WEBSITE=mywebsite.com node index.cjs
# Windows PowerShell
$env:WEBSITE="mywebsite.com"
node index.cjs
Loading from a CDN:
<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://www.unpkg.com/react@^18.3.0/umd/react.development.js" crossorigin></script>
</head>
<body>
<!-- ... -->
</body>
</html>
const { default: React, useEffect, useState, useRef } = [`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import#description):("react")
import("./data.json", { with: { type: "json" } });
// webpack.config.js
module.exports = {
...
externals: {
react: "React",
"react-dom": "ReactDOM"
}
}
You can also just "import" (ie. "Download" ) JS files and put them in the src/
folder to include them.
* import()
https://spectrum.adobe.com/page/color-fundamentals/#Stevens-power-law