matass /
swu-mjml
| 1 | var mjml_templates = { |
||
|
0 ignored issues
–
show
|
|||
| 2 | example1: { |
||
| 3 | racoon1: { id: 'tem_xxx', version: 'ver_xxx' }, |
||
| 4 | racoon2: { id: 'tem_xxx', version: 'ver_xxx' } |
||
| 5 | }, |
||
| 6 | example2: { |
||
| 7 | racoon1: { id: 'tem_xxx', version: 'ver_xxx' } |
||
| 8 | } |
||
| 9 | } |
||
| 10 | |||
| 11 | var config = { |
||
|
0 ignored issues
–
show
As per coding-style, prefer block-scoped variables using
let or const which have better semantics than var.
Since ECMAScript 6, you can create block-scoped vars or constants with the keywords
Consider the following two pieces of code: if (true)
{
var x = "Hello, Stonehenge!";
}
console.log(x); //prints Hello, Stonehenge! to the console
and if (true)
{
let x = "Hello, Stonehenge!";
}
console.log(x); //ReferenceError: x is not defined
The variable is not defined otuside of its block. This limits bleeding of variables into other contexts. To know more about this ECMA6 feature, look at the MDN pages on let and const. Loading history...
|
|||
| 12 | swu_api_key: 'test_xxx', |
||
| 13 | path: 'test/templates', |
||
| 14 | mjml_src: 'test/mjml', |
||
| 15 | views_path: 'test/views/index', |
||
| 16 | port: 3001 |
||
| 17 | }; |
||
| 18 | |||
| 19 | var swu_mjml = require('./lib/swu_mjml')(config, mjml_templates); |
||
|
0 ignored issues
–
show
As per coding-style, prefer block-scoped variables using
let or const which have better semantics than var.
Since ECMAScript 6, you can create block-scoped vars or constants with the keywords
Consider the following two pieces of code: if (true)
{
var x = "Hello, Stonehenge!";
}
console.log(x); //prints Hello, Stonehenge! to the console
and if (true)
{
let x = "Hello, Stonehenge!";
}
console.log(x); //ReferenceError: x is not defined
The variable is not defined otuside of its block. This limits bleeding of variables into other contexts. To know more about this ECMA6 feature, look at the MDN pages on let and const. Loading history...
|
|||
| 20 | swu_mjml.start() |
||
| 21 |
Since ECMAScript 6, you can create block-scoped vars or constants with the keywords
letorconst. These variables/constants are only valid in the code block where they have been declared.Consider the following two pieces of code:
and
The variable is not defined otuside of its block. This limits bleeding of variables into other contexts.
To know more about this ECMA6 feature, look at the MDN pages on let and const.