@bigcommerce/stencil-paper
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -9,3 +9,7 @@ 'use strict'; | ||
const configId = paper.settings['theme_config_id']; | ||
const path = configId ? assetPath.replace(/\.css$/, `-${configId}.css`) : assetPath; | ||
// append the configId only if the asset path starts with assets/css/ | ||
const path = configId && assetPath.match(/^\/?assets\/css\//) | ||
? assetPath.replace(/\.css$/, `-${configId}.css`) | ||
: assetPath; | ||
const url = paper.cdnify(path); | ||
@@ -12,0 +16,0 @@ |
{ | ||
"name": "@bigcommerce/stencil-paper", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A stencil plugin to register partials and helpers from handlebars and returns the compiled version for the stencil platform.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -46,2 +46,9 @@ var Code = require('code'), | ||
}); | ||
it('should not append configId if the file is not in assets/css/ directory', done => { | ||
expect(c('{{{stylesheet "assets/lib/style.css" }}}', { theme_config_id: 'foo' })) | ||
.to.be.equal('<link data-stencil-stylesheet href="/assets/lib/style.css" rel="stylesheet">'); | ||
done(); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127140
3328