How to use the generator-jhipster/generators/generator-constants.CLIENT_TEST_SRC_DIR function in generator-jhipster

To help you get started, we’ve selected a few generator-jhipster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hipster-labs / generator-jhipster-react / generators / client / index.js View on Github external
setupClientconsts() {
            // Make constants available in templates
      this.MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
      this.TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;

      this.serverPort = this.config.get('serverPort') || this.configOptions.serverPort || 8080;
      this.applicationType = this.config.get('applicationType') || this.configOptions.applicationType;
      if (!this.applicationType) {
        this.applicationType = 'monolith';
      }
      this.clientFramework = this.config.get('clientFramework') || 'react';
      this.useSass = this.config.get('useSass');
      this.enableTranslation = this.config.get('enableTranslation'); // this is enabled by default to avoid conflicts for existing applications
      this.nativeLanguage = this.config.get('nativeLanguage');
      this.languages = this.config.get('languages');
      this.messageBroker = this.config.get('messageBroker');
      this.packagejs = packagejs;
      const baseName = this.config.get('baseName');
      if (baseName) {
        this.baseName = baseName;
github jhipster / jhipster-vuejs / generators / page / files.js View on Github external
* You may obtain a copy of the License at
 *
 *      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 constants = require('generator-jhipster/generators/generator-constants');
const _ = require('lodash');
const utils = require('../utils');

/* Constants use throughout */
const CLIENT_TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
const VUE_DIR = 'src/main/webapp/app/';
const CLIENT_VUE_TEMPLATES_DIR = 'vue';

const vueFiles = {
    client: [
        {
            path: VUE_DIR,
            templates: [
                {
                    file: 'pages/page.vue',
                    renameTo: generator => `pages/${generator.pageFolderName}/${generator.pageFolderName}.vue`
                },
                {
                    file: 'pages/page.service.ts',
                    renameTo: generator => `pages/${generator.pageFolderName}/${generator.pageFolderName}.service.ts`
                },
github sonalake / generator-jhipster-multitenancy / generators / client / index.js View on Github external
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() {
github jhipster / jhipster-vuejs / generators / entity-client / files.js View on Github external
*
 * 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 constants = require('generator-jhipster/generators/generator-constants');
const jhipsterUtils = require('generator-jhipster/generators/utils');
const utils = require('../utils');

/* Use customized randexp */
const Randexp = jhipsterUtils.RandexpWithFaker;

/* Constants use throughout */
const CLIENT_TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
const VUE_DIR = 'src/main/webapp/app/';
const CLIENT_VUE_TEMPLATES_DIR = 'vue';

/**
* 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 vueFiles = {
    client: [
        {
            path: VUE_DIR,
            templates: [
                {
                    file: 'entities/entity-details.vue',
                    renameTo: generator => `entities/${generator.entityFolderName}/${generator.entityFileName}-details.vue`
github jhipster / jhipster-vuejs / test / generator.spec.js View on Github external
const path = require('path');
const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const constants = require('generator-jhipster/generators/generator-constants');
const blueprintPackagejs = require('../package.json');

const SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
const CLIENT_TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;
const CLIENT_SPEC_SRC_DIR = `${CLIENT_TEST_SRC_DIR}spec/`;
const CLIENT_WEBPACK_DIR = constants.CLIENT_WEBPACK_DIR;

const expectedFiles = {
    i18n: [
        `${CLIENT_MAIN_SRC_DIR}app/locale/translation.service.ts`,
        `${CLIENT_MAIN_SRC_DIR}app/shared/config/store/translation-store.ts`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/activate.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/audits.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/configuration.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/error.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/global.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/health.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/login.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/logs.json`,
        `${CLIENT_MAIN_SRC_DIR}i18n/en/home.json`,
github jhipster / jhipster-vuejs / generators / utils.js View on Github external
*
 *      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 jhipsterUtils = require('generator-jhipster/generators/utils');
const constants = require('generator-jhipster/generators/generator-constants');
const chalk = require('chalk');

const CLIENT_MAIN_SRC_DIR = constants.CLIENT_MAIN_SRC_DIR;
const CLIENT_WEBPACK_DIR = constants.CLIENT_WEBPACK_DIR;
const CLIENT_TEST_SRC_DIR = constants.CLIENT_TEST_SRC_DIR;

module.exports = {
    updateLanguagesInTranslationStore,
    updateI18nConfig,
    updateLanguagesInWebpack,
    replaceTranslation,
    addEntityToMenu,
    addEntityToRouterImport,
    addEntityToRouter,
    addEntityServiceToMainImport,
    addEntityServiceToMain,
    addPageToRouterImport,
    addPageToRouter,
    addPageServiceToMainImport,
    addPageServiceToMain,
    addPageProtractorConf
github jhipster / jhipster-vuejs / generators / client / files.js View on Github external
* You may obtain a copy of the License at
 *
 *      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',

generator-jhipster

Spring Boot + Angular/React/Vue in one handy generator

Apache-2.0
Latest version published 20 days ago

Package Health Score

89 / 100
Full package analysis