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

@twinklecube/create-ui-library

v0.3.0

Published

twinklecube ui - a react library to create and manage UIs...

Downloads

14

Readme

npx @twinklecube/create-ui-library ui-library required node version 18.17.0 or higher Here the 'ui-library' is the package/directory name... so, it's your choice This command will create a folder called 'ui-library' and install the project there npx @twinklecube/create-ui-library . This command will install the package in the current directory

npm start This command will start the development server on port 3030

npm run build This command will create the 'dist' folder and put the bundled files there

version 5.3.6 styled-components are installed and ready to use just import as usual and that's it import styled from "styled-components"

install emotion. npm i @emotion/styled then, just import as usual. you are good to go. import styled from @emotion/styled

if you use styled-components or @emotion in this ui-library, please be mindful, that,

if you install the ui-library in another app locally eg: npm i ../ui-library or npm link ui-library

you will get invalid hook call runtime error when you run your app on devServer or when you run your app through the dist folder This seems like a wierd bug... and anyone out there is most welcome to have a look :) npm clone https://github.com/twinklecube/create-ui-library.git

assets are copied in to the dist folder and NOT base64 encoded

Following formats are supported Image formats: jpg, jpeg, svg, png, gif, webp Font formats: woff2, woff, eot, ttf, otf

Step 1: open webpack.config.js which is located in the root folder Step 2: find test: /\.(jpg|jpeg|png|gif|svg|webp|woff|woff2|eot|ttf|otf)$/i Step 4: include the new file/format extension in this list seperated by a pipe character Step 5: open rollup.config.js which is located in the root folder Step 6: find include : [ '**/*.svg', '**/*.png', '**/*.jp(e)?g', '**/*.gif', '**/*.webp', '**/*.woff2', '**/*.woff', '**/*.ttf', '**/*.otf', '**/*.eot' ] Step 7: include the new file/format extension in this array seperated by a comma. eg '**/*.your-file-extension' Step 5: open module.d.ts which is located in the src folder Step 6: add declare module *.your-file-extension; at the end of the file.

when this project is built, assets(images/fonts) are copied in to the dist folder. in your app, you have to copy these assets in to the build folder (eg. dist folder) of the app in order to be referenced and served correctly for example you can do the following in your webpack config file

const CopyPlugin = require('copy-webpack-plugin');

module.exports = {

plugins: [
    new CopyPlugin({
        patterns: [
            {
                from: path.resolve(__dirname, 'node_modules', '<your-ui-library>', 'dist', 'esm', 'images'),
                to: path.join(__dirname, 'dist', 'images'),
                noErrorOnMissing: true
            },
            {
                from: path.resolve(__dirname, 'node_modules', <your-ui-library>', 'dist', 'esm', 'fonts'),
                to: path.join(__dirname, 'dist', 'fonts'),
                noErrorOnMissing: true
            }
        ]
    })
]

}

please be good enough to inform us about any bugs https://github.com/twinklecube/create-ui-library/issues