JSPM

patternplate-transform-resolve-includes

0.1.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q26011F
  • License MIT

patternplate transform to rewrite dependency includes to interoperable paths

Package Exports

  • patternplate-transform-resolve-includes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (patternplate-transform-resolve-includes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.