Giter VIP home page Giter VIP logo

generic-names's Introduction

generic-names

Helper for building generic names, similar to webpack. Designed to be used with postcss‑modules‑scope.

Uses interpolateName from the webpack/loader-utils.

API

var genericNames = require('generic-names');
var generate = genericNames('[name]__[local]___[hash:base64:5]', {
  context: process.cwd()
});

generate('foo', '/case/source.css'); // 'source__foo___3mRq8'

generic-names's People

Contributors

alexander-akait avatar asmockler avatar benmvp avatar dependabot[bot] avatar evilebottnawi avatar liaoyinglong avatar longlho avatar sullenor avatar trysound avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

generic-names's Issues

inconsistency with css-loader

the regex at this line breaks consistency with css-loader generation getLocalIdent

the test case is @ in node modules, scoping packages is getting popular and when we use the same parameters (localindentname, hashprefix,...) with requiring css from a node module that has @ in it, generic-names replaces it with - but css-loader leaves it as @

That's because, \u00A0-\uFFFF doesn't contain @

npm access

We rewrite css-loader on ICSS and drop css modules from css-loader in favor postcss-loader with postcss-icss-* plugin. Can you give npm access to this repo for update deps?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.