sf-sketch-rpc
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -28,17 +28,2 @@ Object.defineProperty(exports, "__esModule", { | ||
/* | ||
const templates = { | ||
'bootstrap-plugin-instance': require('raw-loader!./templates/bootstrap-plugin-instance.js'), | ||
'coscript-executor': require('raw-loader!./templates/coscript-executor.js'), | ||
'plugin-command-executor': require('raw-loader!./templates/plugin-command-executor.js'), | ||
}; | ||
*/ | ||
/* | ||
const readTemplateNamed = (name) => { | ||
let script = templates[name]; | ||
return _.replace(_.replace(script,/"<</g,''),/>>"/g,''); | ||
}; | ||
*/ | ||
var readTemplateNamed = function readTemplateNamed(name) { | ||
@@ -45,0 +30,0 @@ var script = _fs2['default'].readFileSync(_path2['default'].join(_path2['default'].resolve(__dirname, 'templates'), String(name) + '.js'), 'utf8'); |
{ | ||
"name": "sf-sketch-rpc", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "RPC module based on `coscript` cli for running scripts in Sketch runtime on node.js platform", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -8,18 +8,3 @@ | ||
/* | ||
const templates = { | ||
'bootstrap-plugin-instance': require('raw-loader!./templates/bootstrap-plugin-instance.js'), | ||
'coscript-executor': require('raw-loader!./templates/coscript-executor.js'), | ||
'plugin-command-executor': require('raw-loader!./templates/plugin-command-executor.js'), | ||
}; | ||
*/ | ||
/* | ||
const readTemplateNamed = (name) => { | ||
let script = templates[name]; | ||
return _.replace(_.replace(script,/"<</g,''),/>>"/g,''); | ||
}; | ||
*/ | ||
const readTemplateNamed = (name) => { | ||
let script = fs.readFileSync(path.join(path.resolve(__dirname,'templates'),`${name}.js`),'utf8'); | ||
@@ -26,0 +11,0 @@ return _.replace(_.replace(script,/"<</g,''),/>>"/g,''); |
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
28969
514