Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the library to use the structure proposed by cli. #32

Merged
merged 24 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ npm-debug.log
node_modules
coverage
build
lib
dist
css
html
sass
Expand Down
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@ language: node_js
node_js:
- '10'
addons:
apt:
sources:
- google-chrome
chrome: stable

before_install:
- npm i -g makeshift && makeshift -s @systelab-technologies -r https://registry.npmjs.org
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

before_script:
- npm install -g makeshift && makeshift -s @systelab-technologies -r https://registry.npmjs.org
- npm install -g codecov
- npm install -g codacy-coverage
- npm install
- ng build

script:
- ng test --watch=false --code-coverage
script:
- npm run test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order is different in systelab-preferences

- npm run build

after_success:
- cat coverage/lcov.info | codecov
- cat ./coverage/lcov.info | codacy-coverage

before_deploy:
- cp README.md dist/systelab-translate
- cd dist/systelab-translate

deploy:
skip_cleanup: true
provider: npm
Expand Down
104 changes: 17 additions & 87 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,95 +3,39 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"systelab-translate-library": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"systelab-translate": {
"projectType": "library",
"root": "projects/systelab-translate",
"sourceRoot": "projects/systelab-translate/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/favicon.ico",
{
"glob": "**/*",
"input": "src/i18n/error",
"output": "/i18n/error"
},
{
"glob": "**/*",
"input": "src/i18n/language",
"output": "/i18n/language"
}
],
"styles": [
"src/styles.css"
],
"scripts": []
"tsConfig": "projects/systelab-translate/tsconfig.lib.json",
"project": "projects/systelab-translate/ng-package.json"
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
"tsConfig": "projects/systelab-translate/tsconfig.lib.prod.json"
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "systelab-translate-library:build"
},
"configurations": {
"production": {
"browserTarget": "systelab-translate-library:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "systelab-translate-library:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"styles": [
"src/styles.css"
],
"main": "projects/systelab-translate/src/test.ts",
"tsConfig": "projects/systelab-translate/tsconfig.spec.json",
"karmaConfig": "projects/systelab-translate/karma.conf.js",
"assets": [
"src/favicon.ico",
{
"glob": "**/*",
"input": "src/i18n/error",
"input": "i18n/error",
"output": "/i18n/error"
},
{
"glob": "**/*",
"input": "src/i18n/language",
"input": "i18n/language",
"output": "/i18n/language"
}
]
Expand All @@ -101,30 +45,16 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
"projects/systelab-translate/tsconfig.lib.json",
"projects/systelab-translate/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"systelab-translate-library-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application"
}
},
"defaultProject": "systelab-translate-library",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
"defaultProject": "systelab-translate"
}
12 changes: 0 additions & 12 deletions browserslist

This file was deleted.

34 changes: 0 additions & 34 deletions gulpfile.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"COMMON_ERROR_CODE1": "Error code 1",
"COMMON_ERROR_CODE2": "Error code 2",
"COMMON_ERROR_CODE3": "Error code 3"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"COMMON_ERROR_CODE1": "Código error 1",
"COMMON_ERROR_CODE2": "Código error 2",
"COMMON_ERROR_CODE3": "Código error 3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
"COMMON_CENTER": "Centre",
"USER_AGE_AND_GENDER": "User age is {{USER_AGE}} and gender is {{USER_GENDER}}",
"USER_GENDER": "User gender is {{USER_GENDER}}"

}
}
3 changes: 3 additions & 0 deletions i18n/language/MessagesBundle_en_US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"COMMON_CENTER": "Center"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"COMMON_WEEK": "Mes",
"COMMON_YEAR": "Año",
"COMMON_CENTER": "Centro"
}
}
Loading