patternplate-transform-resolve-includes

    0.1.4 • Public • Published

    patternplate-transform-resolve-includes

    patternplate transform pattern dependency includes to interoperable paths.

    Installation

    npm install --save patternplate-transform-resolve-includes

    Transformation

    Input

    // foo/bar/foo/index.css
    @import 'bar';
    @import 'baz';
    @import 'npm://normalize.css';
    @import 'normalize.css';
    // foo/bar/foo/pattern.json
    {
      "name": "foo",
      "patterns": {
        "bar": "foo/bar/baz",
        "baz": "baz/bar/foo"
      }
    }

    Output

    @import 'baz/index.css';
    @import '../../baz/bar/index.css';
    @import 'npm://normalize.css';
    @import 'normalize.css';

    Configuration

    Install patternplate-transform-resolve-includes, patternplate-server currently ships with patternplate-transform-resolve-includes working on *.less, *.css files by default.

    Parameters

    // configuration/patternplate-server/transforms.js
    module.exports = {
      "resolve-imports": {
        "resolve": "%(outputName)s/%(patternId)s/index.%(extension)s"
      }
    }

    Copyright 2016 by SinnerSchrader Deutschland GmbH and contributors. Released under the MIT license.

    Install

    npm i patternplate-transform-resolve-includes

    DownloadsWeekly Downloads

    1

    Version

    0.1.4

    License

    MIT

    Last publish

    Collaborators

    • kotzendekrabbe
    • lkuechler
    • rongae
    • marionebl