15.0.0 • Published 6 years ago

modular-css-paths v15.0.0

Weekly downloads
50
License
MIT
Repository
github
Last release
6 years ago

modular-css-paths NPM Version NPM License NPM Downloads

A resolver for modular-css that will let you resolve file references against arbitrary paths. Useful to avoid code like

@value foo from "../../../../../../../../some/other/directory/file.css";

which is annoying to write, annoying to read, and also super-brittle.

Install

$ npm i modular-css-paths

Usage

Pass as part of the resolvers array in the modular-css options (via JS API/Rollup/Browserify/WebPack/etc). When modular-css is trying to resolve @value or composes file references it'll use the default node resolution algorithm against whichever paths you specified.

var Processor = require("modular-css-core"),
    paths     = require("modular-css-paths")

    processor = new Processor({
        resolvers : [
            paths({
                paths : [
                    "./path/one",
                    "../../some/other/path"
                ]
            })
        ]
    });

Options

paths

An array of string file paths, they can be relative to the cwd of the Processor instance or absolute paths.

15.0.0

6 years ago

14.4.0

6 years ago

14.3.0

6 years ago

14.2.1

6 years ago

14.2.0

6 years ago

14.1.0

6 years ago

14.0.1

6 years ago

14.0.0

6 years ago

13.0.0

6 years ago

12.1.3

6 years ago

12.1.2

6 years ago

12.1.0

6 years ago

12.0.2

6 years ago

12.0.1

6 years ago

12.0.0

6 years ago

11.0.0

6 years ago

10.1.0

6 years ago

10.0.0

6 years ago

9.0.0

6 years ago

8.1.0

6 years ago

8.0.2

6 years ago

8.0.1

6 years ago

8.0.0

6 years ago

7.2.0

6 years ago

7.0.0

6 years ago

6.1.0

6 years ago

6.0.2

7 years ago

6.0.1

7 years ago

6.0.0

7 years ago

5.1.7

7 years ago

5.1.6

7 years ago

5.1.5

7 years ago

5.1.4

7 years ago

5.1.3

7 years ago

5.1.2

7 years ago

5.1.1

7 years ago

5.1.0

7 years ago

5.0.0-rc1

7 years ago

5.0.0-0

7 years ago

4.2.6

7 years ago

4.2.5

7 years ago

4.2.4

7 years ago

4.2.3

7 years ago

4.2.2

7 years ago

4.2.0

7 years ago

4.1.3

7 years ago

4.1.2

7 years ago

4.1.1

7 years ago