Skip to content

Commit

Permalink
Publish TS scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehbraheem committed May 20, 2020
1 parent eae8aee commit 16922ce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/service/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ var _mustache = require('mustache');

var _mustache2 = _interopRequireDefault(_mustache);

var _capitalize = require('capitalize');

var _capitalize2 = _interopRequireDefault(_capitalize);

var _path = require('path');

var _path2 = _interopRequireDefault(_path);
Expand Down Expand Up @@ -96,15 +100,16 @@ var generator = exports.generator = function generator(_ref) {
var SCAFFOLD = _path2.default.resolve(__dirname, '../../', 'scaffold/service');
var DEST_DIR = _path2.default.resolve(destination, directory);

_mustache2.default.escape = function (v) {
return v;
};
var dockerPath = /\b([a-z0-9-]*(?<=\/)[/a-z0-9-]+)\b/.test(name) ? /\b([a-z0-9-]*(?<=\/)[/a-z0-9-]+)\b/.exec(name)[0] : name;
var serverName = (0, _capitalize2.default)(dockerPath);

new _scaffoldGenerator2.default({
data: (0, _extends3.default)({}, (0, _ramda.pickBy)(function (val, key) {
return (0, _ramda.startsWith)('scaffold_', key);
}, (0, _extends3.default)({}, _config2.default, {
scaffold_project_name: name,
scaffold_server_name: serverName,
scaffold_docker_path: dockerPath,
scaffold_project_description: description,
scaffold_project_author: author,
scaffold_project_git_url: giturl,
Expand Down

0 comments on commit 16922ce

Please sign in to comment.