Added "activeDataFile" parameter in hbs templates.

This commit is contained in:
2022-05-06 07:49:00 +03:00
parent d791edda3e
commit 29734a6b94
9 changed files with 26 additions and 28 deletions
+2 -2
View File
@@ -60,8 +60,8 @@ module.exports = class extends Generator {
);
this.fs.copyTpl(
this.templatePath('src/scripts/template.mjs'),
this.destinationPath(path.join(pathDist, 'src', 'scripts', data.blockFilename + '.mjs')),
this.templatePath('src/scripts/template.js'),
this.destinationPath(path.join(pathDist, 'src', 'scripts', data.blockFilename + '.js')),
data
);
@@ -1,5 +1,6 @@
module.exports = {
cssUrl: "https://",
jsUrl: "https://",
blockName: "<%= blockFilename %>",
baseView: "<%= baseView %>",
remToPx: <%= remToPx %>,
@@ -1,5 +1,5 @@
/**
* Use "rem" instead of pixels. 1rem = 16pixels
* Use "rem" instead of pixels. 1rem = <%= remToPx %>pixels
* No need to use rem in situations of "1px". (usually used for borders width).
*
* Use BEM naming system for class names: http://getbem.com/naming/
@@ -25,7 +25,7 @@
&__visual {
&-image {
// Example of BEM usage.
}
}
@@ -1,4 +1,4 @@
<section class="<%= blockClassName %>">
<section class="<%= blockClassName %> <%= blockClassName %>--{{ activeDataFile }}">
{{!
Remove Everything Below: