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

slant

v2.11.6

Published

This is a simple wrapper for ant-design that overrides some of the styling. It is intended to be used in the same way as [antd](https://www.npmjs.com/package/antd), and only apply some minor visual changes.

Downloads

3

Readme

Slant

This is a simple wrapper for ant-design that overrides some of the styling. It is intended to be used in the same way as antd, and only apply some minor visual changes.

This project requires node 8 and npm 5 to develop.

Usage

A project that depends on this module will need to use webpack 2 and have a few loaders set up:

{
  test: /\.less$/,
  use: [
    { loader: 'style-loader' },
    { loader: 'css-loader' },
    { loader: 'less-loader' },
  ],
},

Then, import the less files from slant in your project:

@import '~slant/dist/antd.less';
@import '~slant/dist/slstyle/index.less';

It is also suggested to use babel-import-loader as suggested with antd.

Keep in mind that you will have to point to slant instead of antd, leave out the style property:

[ "import", { libraryName: "slant" }]

Once you've done these steps you're all set to start using slant as if you were using antd!

Testing

Testing consists of a simple automated browser test based on nightmare.js followed by screenshot comparison using image-diff.

The visual tests require (imagemagick)[https://www.imagemagick.org/script/index.php] to work. Install it using brew.

To run tests, first launch the example npm run example and then run npm test. A screenshot of the example page and a diff image will be placed in test/tmp and image-diff will be used to compare them. If there are any differences, make sure they are intentional and run npm run diff:approve to overwrite the reference screenshot with the new screenshot. Don't forget to add and commit the new screenshot.

Developing

Start the example, extend it with any components that you change. If you added components to the example, verify that the new image you produce covers the entire page. Don't forget to update CHANGELOG.md with any changes, even if you just bump a dependency.

Publishing

Before publishing, ensure that the version matches the antd version as closely as possible. Also ensure that there is no visual diff, or that the diff is acceptable.

Scripts

  • npm run clean - removes dist and lib folders
  • npm run build - copies our src and ant-design dist into combined dist and lib folders.
  • npm run example - runs build and then starts a devserver with HMR on http://localhost:3000 with the example docs.
  • npm run test - runs a jest snapshot test.