GithubHelp home page GithubHelp logo

dependents / node-detective-postcss Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 4.0 933 KB

Find the dependencies of a CSS file (PostCSS dialect)

License: MIT License

TypeScript 93.70% JavaScript 6.30%
nodejs postcss dependency-graph css parser dependencies detective ast

node-detective-postcss's Introduction

node-detective-postcss

build npm version npm downloads

Find the dependencies of a CSS file (PostCSS dialect)

Supports @import and @value ... from.

npm install postcss detective-postcss

It's the CSS (PostCSS dialect) counterpart to detective, detective-amd, detective-es6, detective-sass, detective-scss.

Usage

const fs = require('fs');
const detective = require('detective-postcss');

const content = fs.readFileSync('styles.css', 'utf8');

// list of imported file names (ex: 'bla.css', 'foo.css', etc.)
const dependencies = detective(content);

// or to also detect any url() references to images, fonts, etc.
const allDependencies = detective(content, { url: true });

License

MIT

Releasing

  • Bump the version of package.json to a meaningful version for the changes since the last release (we follow semver).
  • To do a dry-run of the release and what would go out in the package you can manually execute the npm-publish workflow on the main branch. It will do a dry-run publish (not actually publish the new version).
  • Draft a new release in the github project - please use a tag named vX.X.X (where X.X.X is the new to-be-releases semver of the package - please add as many detail as possible to the release description.
  • Once you're ready, Publish the release. Publishing will trigger the npm-publish workflow on the tag and do the actual publish to npm.

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.