Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setUpVariables() {
// Ok
this.webappDir = jhipsterConstants.CLIENT_MAIN_SRC_DIR;
this.angularDir = jhipsterConstants.ANGULAR_DIR;
this.reactDir = jhipsterConstants.REACT_DIR;
this.CLIENT_TEST_SRC_DIR = jhipsterConstants.CLIENT_TEST_SRC_DIR;
// template variables
mtUtils.tenantVariables(this.config.get('tenantName'), this);
},
writeAdditionalFile() {
const mkdirp = require('mkdirp');
const constants = require('generator-jhipster/generators/generator-constants');
/* Constants use throughout */
const MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
// const TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
const REACT_DIR = constants.ANGULAR_DIR;
/**
* The default is to use a file path string. It implies use of the template method.
* For any other config an object { file:.., method:.., template:.. } can be used
*/
const files = {
common: [
{
templates: [
'_package.json',
'_.eslintrc.json',
'_.babelrc',
'_.editorconfig',
'webpack/webpack.common.js',
'webpack/webpack.dev.js',
'webpack/webpack.prod.js'
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const mkdirp = require('mkdirp');
const constants = require('generator-jhipster/generators/generator-constants');
const utils = require('../utils');
const MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
const TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
const VUE_DIR = constants.ANGULAR_DIR;
const CLIENT_VUE_TEMPLATES_DIR = 'vue';
module.exports = {
writeFiles
};
const vueFiles = {
common: [
{
templates: [
'package.json',
'tsconfig.json',
'.huskyrc',
'.postcssrc.js',
'tslint.json',
'config/index.js',
cleanup() {
const context = this.context;
const entityName = context.name;
if (this.isJhipsterVersionLessThan('5.0.0')) {
this.removeFile(`${jhipsterConstants.ANGULAR_DIR}entities/${entityName}/${entityName}.model.ts`);
}
},