Numbers Probably Matter

    patternplate-transform-resolve-imports

    1.0.0 • Public • Published

    patternplate-transform-resolve-imports

    patternplate transform pattern dependency imports to interoperable paths.

    Installation

    npm install --save patternplate-transform-resolve-imports

    Transformation

    Input

    // foo/bar/foo/index.js
    import foo from 'bar';
    require('baz');
    // foo/bar/foo/pattern.json
    {
        "name": "foo",
        "patterns": {
            "bar": "foo/bar/baz",
            "baz": "baz/bar/foo"
        }
    }

    Output

    import foo from '../baz/index.js';
    require('../../baz/bar/index.js');

    Parameters

    // configuration/patternplate-server/transforms.js
    module.exports = {
        'resolve-imports': {
            'outFormat': 'js'
        }
    }

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

    Install

    npm i patternplate-transform-resolve-imports

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • kotzendekrabbe
    • lkuechler
    • rongae
    • marionebl