Skip to content

Commit

Permalink
Merge branch 'jhipster-upstream'
Browse files Browse the repository at this point in the history
+ fix code to work previous changes
  • Loading branch information
yelhouti committed Jan 12, 2020
2 parents e977e16 + 9f963f5 commit e3e9e55
Show file tree
Hide file tree
Showing 549 changed files with 16,236 additions and 35,001 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ generators/**/templates
node_modules
travis
docs
# samples are linted with there respective eslint files
test/samples
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,12 @@ jhipster -d --blueprint primeng-blueprint
To make it it easy to keep up with the latest jhipster version, we have a branch jhipster-upstream with the original content of the original jhipster generator.
On each upgrade we edit the needed file and merge back into master (or feature branch).
To use the blueprint: `jhipster --blueprint primeng import-jdl jhipster.jh --force`
Sometimes, it looks like the blueprint is not detected, this causes by some dependencies not getting correctly installed, to fix that:
```
cd node_modules/generator-jhipster/
npm install
```
This usually happens with using npm link, npm install doesn't install dependencies of dependencies
once changes are made, `npm run test` one the project insures that application generated matches the one in the sample project 'test/samples/...'
This creates a new project under /tmp/primeng-blueprint-test we use it to run our tests:
- `npm run test` for angular unit tests (running tests on the sample filder doesn't lint well du to eslint picking up the parent project config I suppose)
- `npm run e2e` for e2e tests using an already server https://github.com/yelhouti/generator-jhipster-composite-key-server (this project supports composites keys and has the same entities...) (do nor forget to change the generated protractor.conf to use localhost:9000 instead of 8080)
Using the samples project makes this code very well suites for test driven development.
# License
Expand Down
1 change: 1 addition & 0 deletions generators/client/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable consistent-return */
const chalk = require('chalk');
const ClientGenerator = require('generator-jhipster/generators/client');
const writeAngularFiles = require('./templates/files-angular').writeFiles;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
export * from './<%= entityFileName %>.service';
export * from './<%= entityFileName %>-update.component';
export * from './<%= entityFileName %>-detail.component';
export * from './<%= entityFileName %>.component';
export * from './<%= entityFileName %>.route';
node_modules/
src/main/docker/
src/test/javascript/protractor.conf.js
src/test/javascript/jest.conf.js
webpack/
target/
build/
node/
postcss.config.js
42 changes: 42 additions & 0 deletions generators/client/templates/angular/.eslintrc.json.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<%#
Copyright 2013-2019 the original author or authors from the JHipster project.
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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.
-%>
{
"plugins": ["@typescript-eslint/tslint"],
"extends": ["jhipster"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"@typescript-eslint/tslint/config": [
"error",
{
"lintFile": "./tslint.json"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}
],
"@typescript-eslint/no-non-null-assertion": "off"
}
}
18 changes: 18 additions & 0 deletions generators/client/templates/angular/.huskyrc.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<%#
Copyright 2013-2019 the original author or authors from the JHipster project.
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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.
-%>
{
"hooks": {
"pre-commit": "lint-staged"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
export * from './error/error.component';
export * from './error/error.route';
export * from './main/main.component';
export * from './footer/footer.component';
export * from './navbar/navbar.component';
export * from './navbar/navbar.route';
<%_ if (enableTranslation) { _%>
export * from './navbar/active-menu.directive';
<%_ } _%>
export * from './profiles/page-ribbon.component';
export * from './profiles/profile.service';
export * from './profiles/profile-info.model';
module.exports = {
'{,src/**/}*.{md,json,ts,css,scss,yml}': ['prettier --write', 'git add']
};
161 changes: 80 additions & 81 deletions generators/client/templates/angular/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,163 +19,162 @@
<%_ var optionsForwarder = clientPackageManager == 'yarn' ? '' : '-- ' _%>
{
"name": "<%= dasherizedBaseName %>",
"version": "0.0.0",
"version": "0.0.1-SNAPSHOT",
"description": "Description for <%= baseName %>",
"private": true,
"license": "UNLICENSED",
"cacheDirectories": [
"node_modules"
],
"dependencies": {
"@angular/animations": "8.0.0",
"@angular/cdk": "8.0.0",
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"@fortawesome/angular-fontawesome": "0.4.0",
"@fortawesome/fontawesome-svg-core": "1.2.19",
"@fortawesome/free-solid-svg-icons": "5.9.0",
"@ng-bootstrap/ng-bootstrap": "4.2.1",
"@angular/animations": "8.2.14",
"@angular/cdk": "8.2.3",
"@angular/common": "8.2.14",
"@angular/compiler": "8.2.14",
"@angular/core": "8.2.14",
"@angular/forms": "8.2.14",
"@angular/platform-browser": "8.2.14",
"@angular/platform-browser-dynamic": "8.2.14",
"@angular/router": "8.2.14",
"@fortawesome/angular-fontawesome": "0.5.0",
"@fortawesome/fontawesome-svg-core": "1.2.26",
"@fortawesome/free-solid-svg-icons": "5.12.0",
"@ng-bootstrap/ng-bootstrap": "5.1.4",
"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
"bootstrap": "4.3.1",
"bootstrap": "4.4.1",
<%_ if (clientTheme !== 'none') { _%>
"bootswatch": "4.3.1",
"bootswatch": "4.4.1",
<%_ } _%>
"core-js": "3.1.3",
"core-js": "3.5.0",
"flat": "^4.1.0",
"moment": "2.24.0",
"ng-jhipster": "0.10.1",
"ng-jhipster": "0.11.5",
"ngx-cookie": "4.0.2",
"ngx-infinite-scroll": "7.2.0",
"ngx-infinite-scroll": "8.0.1",
"ngx-webstorage": "4.0.1",
"primeflex": "^1.0.0-rc.1",
"primeicons": "^1.0.0",
"primeng": "https://github.com/yelhouti/primeng/releases/download/8.0.0-rc2/primeng-8.0.0-rc.2-SNAPSHOT.tgz",
"rxjs": "6.5.2",
"swagger-ui": "2.2.10",
"rxjs": "6.5.3",
"swagger-ui-dist": "3.24.3",
<%_ if (websocket === 'spring-websocket') { _%>
"sockjs-client": "1.3.0",
"sockjs-client": "1.4.0",
"webstomp-client": "1.2.6",
<%_ } _%>
"tslib": "1.10.0",
"zone.js": "0.9.1"
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular/cli": "8.0.2",
"@angular/compiler-cli": "8.0.0",
"@ngtools/webpack": "8.0.2",
"@angular/cli": "8.3.20",
"@angular/compiler-cli": "8.2.14",
"@ngtools/webpack": "8.3.20",
<%_ if (protractorTests) { _%>
"@types/chai": "4.1.7",
"@types/chai-string": "1.4.1",
"@types/chai": "4.2.7",
"@types/chai-string": "1.4.2",
<%_ } _%>
"@types/flat": "0.0.28",
"@types/jest": "24.0.14",
"@types/jest": "24.0.23",
<%_ if (protractorTests) { _%>
"@types/mocha": "5.2.7",
<%_ } _%>
"@types/node": "10.12.27",
"@types/node": "12.12.17",
<%_ if (websocket === 'spring-websocket') { _%>
"@types/sockjs-client": "1.1.1",
<%_ } _%>
"@typescript-eslint/eslint-plugin": "2.11.0",
"@typescript-eslint/eslint-plugin-tslint": "2.11.0",
"@typescript-eslint/parser": "2.11.0",
<%_ if (protractorTests) { _%>
"@types/selenium-webdriver": "4.0.0",
"@types/selenium-webdriver": "4.0.5",
<%_ } _%>
"angular-router-loader": "0.8.5",
"angular2-template-loader": "0.6.2",
"autoprefixer": "9.6.0",
"autoprefixer": "9.7.3",
"base-href-webpack-plugin": "2.0.0",
"browser-sync": "2.26.7",
"browser-sync-webpack-plugin": "2.2.2",
"cache-loader": "4.0.0",
"cache-loader": "4.1.0",
<%_ if (protractorTests) { _%>
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"chai-string": "1.5.0",
<%_ } _%>
"codelyzer": "5.1.0",
"copy-webpack-plugin": "5.0.3",
"css-loader": "3.0.0",
"file-loader": "4.0.0",
"fork-ts-checker-webpack-plugin": "1.3.6",
"codelyzer": "5.2.0",
"copy-webpack-plugin": "5.1.1",
"css-loader": "3.3.2",
"eslint": "6.7.2",
"eslint-config-jhipster": "0.0.1",
"eslint-config-prettier": "6.7.0",
"eslint-loader": "3.0.3",
"file-loader": "5.0.2",
"fork-ts-checker-webpack-plugin": "3.1.1",
"friendly-errors-webpack-plugin": "1.7.0",
"generator-jhipster": "<%= packagejs.version %>",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
<%_ if (!skipCommitHook) { _%>
"husky": "2.4.1",
"husky": "3.1.0",
<%_ } _%>
"jest": "24.8.0",
"jest-junit": "6.4.0",
"jest-preset-angular": "7.1.1",
"jest": "24.9.0",
"jest-date-mock": "1.0.7",
"jest-junit": "10.0.0",
"jest-preset-angular": "8.0.0",
"jest-sonar-reporter": "2.0.0",
<%_ if (!skipCommitHook) { _%>
"lint-staged": "8.2.0",
"lint-staged": "8.2.1",
<%_ } _%>
<%_ if (enableTranslation) { _%>
"merge-jsons-webpack-plugin": "1.0.19",
"merge-jsons-webpack-plugin": "1.0.20",
<%_ } _%>
"mini-css-extract-plugin": "0.7.0",
"mini-css-extract-plugin": "0.8.0",
<%_ if (protractorTests) { _%>
"mocha": "6.1.4",
"mocha": "6.2.2",
<%_ } _%>
"moment-locales-webpack-plugin": "1.0.7",
"optimize-css-assets-webpack-plugin": "5.0.1",
"moment-locales-webpack-plugin": "1.1.2",
"optimize-css-assets-webpack-plugin": "5.0.3",
"postcss-loader": "3.0.0",
"prettier": "1.18.2",
"prettier": "1.19.1",
<%_ if (protractorTests) { _%>
"protractor": "5.4.2",
<%_ } _%>
"reflect-metadata": "0.1.13",
"rimraf": "2.6.3",
"sass": "1.21.0",
"sass-loader": "7.1.0",
"rimraf": "3.0.0",
"sass": "1.23.7",
"sass-loader": "8.0.0",
"simple-progress-webpack-plugin": "1.1.2",
"style-loader": "0.23.1",
"terser-webpack-plugin": "1.3.0",
"thread-loader": "2.1.2",
"to-string-loader": "1.1.5",
"ts-loader": "6.0.2",
"style-loader": "1.0.1",
"terser-webpack-plugin": "2.3.0",
"thread-loader": "2.1.3",
"to-string-loader": "1.1.6",
"ts-loader": "6.2.1",
<%_ if (protractorTests) { _%>
"ts-node": "8.2.0",
"ts-node": "8.5.4",
<%_ } _%>
"tslint": "5.17.0",
"tslint-config-prettier": "1.18.0",
"tslint-loader": "3.5.4",
"tslint": "5.20.1",
"typescript": "3.4.5",
<%_ otherModules.forEach(module => { _%>
"<%= module.name %>": "<%= module.version %>",
<%_ }); _%>
<%_ if (protractorTests) { _%>
"webdriver-manager": "12.1.5",
"webdriver-manager": "12.1.7",
<%_ } _%>
"webpack": "4.34.0",
"webpack-cli": "3.3.4",
"webpack-dev-server": "3.7.1",
"webpack-merge": "4.2.1",
"webpack-notifier": "1.7.0",
"@openapitools/openapi-generator-cli": "0.0.14-4.0.2",
"webpack": "4.41.2",
"webpack-cli": "3.3.10",
"webpack-dev-server": "3.9.0",
"webpack-merge": "4.2.2",
"webpack-notifier": "1.8.0",
"webpack-visualizer-plugin": "0.1.11",
"workbox-webpack-plugin": "4.3.1",
"write-file-webpack-plugin": "4.5.0"<% if (buildTool === 'maven') { %>,
"xml2js": "0.4.19"
<%_ } _%>
"write-file-webpack-plugin": "4.5.1"
},
"engines": {
"node": ">=8.9.0"<% if (clientPackageManager === 'yarn') { %>,
"yarn": ">=1.16.0"<% } %>
},
<%_ if (!skipCommitHook) { _%>
"lint-staged": {
"{,src/**/}*.{md,json,ts,css,scss,yml}": [
"prettier --write",
"git add"
]
"yarn": ">=1.19.0"<% } %>
},
<%_ } _%>
"scripts": {
"prettier:format": "prettier --write \"{,src/**/}*.{md,json,ts,css,scss,yml}\"",
"lint": "tslint --project tsconfig.json -e 'node_modules/**'",
"lint": "eslint . --ext .js,.ts",
"lint:fix": "<%= clientPackageManager %> run lint <%= optionsForwarder %>--fix",
"ngc": "ngc -p tsconfig-aot.json",
"cleanup": "rimraf <%= DIST_DIR %> <%= AOT_DIR %>",
Expand Down
Loading

0 comments on commit e3e9e55

Please sign in to comment.