patternplate-transform-resolve-includes
v0.1.4
Published
patternplate transform to rewrite dependency includes to interoperable paths
Downloads
11
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.