Comparing version 1.1.0 to 1.2.0
@@ -0,2 +1,8 @@ | ||
## 1.2.0 | ||
* Added use strict option | ||
## 1.1.0 | ||
* More helper api added | ||
## 1.0.1 | ||
* Added more protection against code duplication |
@@ -99,2 +99,6 @@ const Assert = require('assert'); | ||
useStrict() { | ||
this.strict = true; | ||
} | ||
import(name, mod) { | ||
@@ -146,3 +150,4 @@ Assert.ok(!this.external, `You cannot add import to external module ${this.getPath()}`); | ||
Assert.ok(!this.external, `You cannot serialize external module ${this.getPath()}`); | ||
return `${this.imports.map(imp => imp.toString()).join('')}${super.toString()}`; | ||
return `${this.strict ? | ||
`'use strict';` : ''}${this.imports.map(imp => imp.toString()).join('')}${super.toString()}`; | ||
} | ||
@@ -149,0 +154,0 @@ |
{ | ||
"name": "code-jinni", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Generic javascript code generator that uses actual code snippets and mantains relationship ebtween artifacts to simplify DOM construction and eventual code generation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12048
226