Commit 749c071f authored by Rolf Forst's avatar Rolf Forst
Browse files

Update textToReplace

parent 90b6a7e7
......@@ -3,7 +3,7 @@
const chalk = require('chalk');
const commander = require('commander');
const fs = require('fs-extra');
const clone = require('git-clone');
const gitClone = require('git-clone');
const path = require('path');
const replace = require('replace-in-file');
const packageJson = require('./package.json');
......@@ -43,7 +43,7 @@ if ('undefined' === typeof directoryName || '' === directoryName) {
process.exit(1);
}
var sanitize,
let sanitize,
sanitize2;
sanitize = directoryName.replace(/-/g, ' ');
......@@ -56,6 +56,9 @@ const nameSpace = sanitize2.replace(/([\w\-]+)$/g, str => str[0].toUpperCase() +
const textDomain = directoryName.toLowerCase();
sanitize = directoryName.replace(/-/g, '_');
const optionName = sanitize.toLowerCase();
// Liste der Dateien, die entfernt werden müssen.
const filesToRemove = [
'README.md',
......@@ -80,6 +83,10 @@ const textToReplace = [{
{
from: /cms-basis/g,
to: textDomain
},
{
from: /cms_basis/g,
to: optionName
}
];
......@@ -103,7 +110,7 @@ if (fs.existsSync('./' + directoryName)) {
/**
* Das Git-repository klonen.
*/
clone(packageJson.rrze.repos[projectType], './' + directoryName,
gitClone(packageJson.rrze.repos[projectType], './' + directoryName,
function(err) {
if (err) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment