npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dat-design

v5.0.2

Published

design assets and docs for dat project

Downloads

9

Readme

dat-design

NPM version Join the chat at https://gitter.im/datproject/design

design resources and assets for the dat project

Build and deploy documentation website

run ./scripts/build

Build and/or develop on this module:

npm install
npm run watch-css
npm run watch-site
open dist/index.html

api for importing (s)css assets into other projects

from your project’s root directory (assuming you’re using npm):

npm install dat-design --save

from here you have the following choices for including individual .css files in your project:

vanilla link

the simplest way to include this module in another project. just include the stylesheet you want in your html as you would any other stylesheet with a relative link. not recommended for use in production web apps because this would involve making your node_modules directory accessible from the web:

<link type="text/css" rel="stylesheet" href="./../node_modules/dat-design/css/base.css">

vanilla @import:

from within a css file in your project, include a relative path to the file you want to include from this repo, which is now in your project’s nodule_modules directory. not recommended for use in production web apps without a build step that removes the @import, since @import is not performant on the fly.

@import './../node_modules/dat-design/public/css/base.css';

node-sass-magic-importer:

Use the magic importer npm module with node-sass.

npm install node-sass-magic-importer --save-dev

when you set up node-sass to run in your package.json scripts, you can use the --importer option like so:

"build-css": "node-sass --importer node_modules/node-sass-magic-importer src/scss/sample.scss public/css/sample.css"

now, from within your sample.scss file, you can @import this dat-design npm module with the following syntax:

@import "~dat-design";

if there's no file path specified after the dat-design module name (like above), the @import rule resolves to the file defined by this module's style property in the package.json. you can also point at individual files within this module from within the scss files in your project to use mixins and variables:

@import "~dat-design/base/buttons.scss"

node-sass-magic-importer offers lots of other options in addition to these as well.

How To Use Dat (S)CSS in Your Project

By importing dat-design in your projects (s)css, you’ll get the following:

Reset

Dat-design uses Normalize, which makes browsers render all elements more consistently.

Variables

The SCSS version of dat-design provides you with variables for colors and transitions which you should use in your project to ensure visual consistency between dat-related projects. Refer to the Dat Styleguide to understand how.

Dat classes

There’s also a set of custom classes for dat-specific components, like buttons or loaders. Those components are documented in the Dat Styleguide.

Logo Assets

Dat-design comes with ready-to-use logo assets, in ./../node_modules/dat-design/public/img.

Is something missing?

If some dat project is in need of a new design element or concept please open an issue!