Added "activeDataFile" parameter in hbs templates.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user