rollup-plugin-postcss
fontsource
Our great sponsors
rollup-plugin-postcss | fontsource | |
---|---|---|
3 | 40 | |
672 | 4,564 | |
- | 3.0% | |
0.0 | 9.1 | |
about 2 months ago | 7 days ago | |
JavaScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rollup-plugin-postcss
-
React Library Builder using Rollup.js and Storybook
The React Library Builder supports both SCSS and CSS out of the box, so you can style your components as you normally would. If you want to use CSS modules, you can refer to the rollup-plugin-postcss documentation for more information.
-
Using Fontsource With 11ty
import { nodeResolve } from "@rollup/plugin-node-resolve"; import postcss from "rollup-plugin-postcss"; import copy from "rollup-plugin-copy"; export default [ { input: "src/js/combine.js", output: { file: "src/js/minified/index.bundle.js", sourcemap: false, } plugins: [ nodeResolve(), postcss({ extract: true, // no way to move output to another folder https://github.com/egoist/rollup-plugin-postcss/issues/250 minimize: true, }), copy({ targets: [ { src: "src/js/minified/index.bundle.css", dest: "src/styles/minified", rename: "fonts.bundle.css", }, ], verbose: true, hook: "writeBundle", }) ], } ];
-
Setting Up a JavaScript Build Process using Rollup
To process Less files we will use PostCSS, which is a JavaScript build tool for CSS, Less, and other CSS preprocessors. It also comes with a built-in minifier. We can add it to the project with a Rollup plugin:
fontsource
-
Variable Fonts
Fontsource[0] is also an easy way to self-host variable fonts via NPM packages.
[0] https://fontsource.org/?variable=true
- Fontsource
-
Ask HN: What side projects landed you a job?
A few years ago, while I was still in high school, I began learning how to create websites purely for fun. One thing I found to be tedious was self-hosting fonts, with existing solutions to improve it completely abandoned. Consequently, I decided to learn a bit more about JavaScript by rewriting and improving these abandoned projects which led to the creation of Fontsource[0].
This project has undoubtedly set of a series of impactful events in my life, and I attribute many of my successes to it. I've had opportunities to network with numerous amazing engineers through it, leading to a part-time role and multiple internships. Companies that approached me for support also wanted to keep in touch! I also graduate this year and I am going with a full-time role from one of the aforementioned internships.
While I acknowledge my circumstances are extremely fortunate, I genuinely believe that having open source projects early on in your career can significantly contribute to standing out as a developer.
[0] https://fontsource.org
- Font Source – a privacy-friendly Google Fonts alternative
-
The new Google Fonts: find what you’re looking for
Tip: more privacy friendly Google alternatives are available and super easy to use: https://fontsource.org/
I switched most of my sites to use it and I’ve been quite happy so far.
No need to leak data to Google.
For weirder stuff (e.g. https://tidings.potato.horse) I use sites like dafont.com and convert fonts using Font Squirrel.
-
justFoundOutGoogleFontsCollectsUserIPs
Fontsource publishes all Google Fonts fonts as NPM packages, allowing you to easily import them with modern bundlers.
-
Just launched my first svelte project! An opensource alternative to Google Fonts, with a focus on variable fonts. Coming from a React background Svelte has been absolutely amazing to work with.
I personally like using FontSource for this, they have some extra fonts beyond Google Fonts too
-
Using Fontsource With 11ty
I stumbled upon fontsource.org the other day and I found the idea of installing fonts from npm packages appealing.
-
Adding locally hosted Google fonts to your SvelteKit project
To do this with SvelteKit, you can use the Fontsource project. They host all of the Google Fonts catalogue as NPM packages.
- Self-host Open Source fonts in neatly bundled NPM packages
What are some alternatives?
autoprefixer - Parse CSS and add vendor prefixes to rules by Can I Use
Google Fonts - Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
Less - Leaner CSS, in your browser or Ruby (via less.js).
fontfaceobserver - Webfont loading. Simple, small, and efficient.
browserslist - 🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env
juliamono - repository for JuliaMono, a monospaced font with reasonable Unicode support.
rollup-plugin-terser - Rollup plugin to minify generated bundle
netlify-menubar - Netlify menubar app to receive build information or trigger new builds
vue3-component-library - This is a template for building vue components library.Project makes use of vue3.0 with rollup configuration to build treeshakable imports and Postcss for compilation of css
leerob.io - ✨ My portfolio built with Next.js, Tailwind, and Vercel.
shopify-bare - Shopify starter theme that provides Javascript modules(ES6 and node_modules), tree-shaking, Live Reloading/ Hot module reloading, Tailwind Css w\ nesting & imports purges unused CSS, minify your built files, compress your images, and use quick commands to develop easier.
MeetingBar - 🇺🇦 Your meetings at your fingertips in the macOS menu bar