Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Commit d48b7c3

Browse files
committed
chore: switch to @angular/cli build setup
1 parent b9636ab commit d48b7c3

33 files changed

+13712
-6921
lines changed

.editorconfig

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
1+
# Editor configuration, see http://editorconfig.org
42
root = true
53

6-
# Unix-style newlines with a newline ending every file
74
[*]
8-
end_of_line = lf
9-
insert_final_newline = true
10-
11-
# Matches multiple files with brace expansion notation
12-
# Set default charset
13-
[*.{js,css,scss,html}]
145
charset = utf-8
15-
16-
# 4 space indentation
17-
[*.{js,css,scss,html}]
18-
indent_style = space
19-
indent_size = 4
20-
21-
# Matches the exact files either package.json or .travis.yml
22-
[{package.json,.travis.yml,bower.json}]
236
indent_style = space
247
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: "⚠️ Bug report"
3+
about: Report a bug for this library. Please check the FAQ and search github/stackoverflow
4+
for a similar issue before submitting
5+
6+
---
7+
8+
<!--
9+
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.
10+
11+
ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
12+
-->
13+
14+
## Current behavior
15+
<!-- Describe how the issue manifests. -->
16+
17+
18+
## Expected behavior
19+
<!-- Describe what the desired behavior would be. -->
20+
21+
22+
## How do you think that we should fix this?
23+
<!-- If you can, describe how you would fix this. -->
24+
25+
26+
## Minimal reproduction of the problem with instructions
27+
<!--
28+
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
29+
https://stackblitz.com or similar. You can use this template as a starting point: https://stackblitz.com/fork/github-nmf2fo
30+
-->
31+
32+
33+
## Environment
34+
35+
<pre><code>
36+
ngx-translate version: X.Y.Z
37+
Angular version: X.Y.Z
38+
<!-- Check whether this is still an issue in the most recent Angular version -->
39+
40+
Browser:
41+
- [ ] Chrome (desktop) version XX
42+
- [ ] Chrome (Android) version XX
43+
- [ ] Chrome (iOS) version XX
44+
- [ ] Firefox version XX
45+
- [ ] Safari (desktop) version XX
46+
- [ ] Safari (iOS) version XX
47+
- [ ] IE version XX
48+
- [ ] Edge version XX
49+
50+
For Tooling issues:
51+
- Node version: XX <!-- run `node --version` -->
52+
- Platform: <!-- Mac, Linux, Windows -->
53+
54+
Others:
55+
<!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... -->
56+
</code></pre>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: "✨ Feature request"
3+
about: Suggesting new features for this library. Please check if a similar feature
4+
request exists before submitting
5+
6+
---
7+
8+
<!--
9+
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.
10+
11+
ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
12+
-->
13+
14+
## Current behavior
15+
<!-- Describe how the issue manifests. -->
16+
17+
18+
## Expected behavior
19+
<!-- Describe what the desired behavior would be. -->
20+
21+
22+
## What is the motivation / use case for changing the behavior?
23+
<!-- Describe the motivation or the concrete use case. -->
24+
25+
26+
## How do you think that we should implement this?
27+
<!-- If you can, describe how you would implement this feature. -->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: ℹ️ Other / Support request
3+
about: Please check the FAQ and search github/stackoverflow for a similar issue before
4+
submitting
5+
6+
---
7+
8+

.gitignore

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,39 @@
1-
#################
2-
## Misc
3-
#################
4-
**/.DS_Store
5-
nbproject
6-
manifest.mf
7-
build.xml
8-
node_modules/*
9-
npm-debug.log
10-
*.js
11-
!config/*
12-
!karma.conf.js
13-
!webpack.config.js
14-
*.map
15-
*.d.ts
16-
!make.js
17-
!examples/**/*.js
18-
coverage
19-
*.metadata.json
20-
bundles
21-
build
22-
dist
23-
dist.tgz
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
242

25-
#################
26-
## JetBrains
27-
#################
28-
.idea
29-
.project
30-
.settings
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
317

32-
############
33-
## Windows
34-
############
8+
# dependencies
9+
/node_modules
3510

36-
# Windows image file caches
37-
Thumbs.db
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
3819

39-
# Folder config file
40-
Desktop.ini
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
4126

42-
############
43-
## Mac
44-
############
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
4536

46-
# Mac crap
37+
# System Files
4738
.DS_Store
48-
39+
Thumbs.db

.npmignore

Lines changed: 0 additions & 41 deletions
This file was deleted.

.travis.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
language: node_js
2-
cache: yarn
32
sudo: false
43
notifications:
54
email: false
65
node_js:
7-
- '8'
6+
- '10'
87
before_install:
98
- export CHROME_BIN=chromium-browser
10-
- npm i -g npm@3 # fix for https://github.com/npm/npm/issues/19222
9+
- if [[ `npm -v` != 6* ]]; then npm i -g npm@6; fi
1110
after_success:
12-
- yarn build
13-
- cp .git dist/ -r # required by semantic release
14-
- cp README.md dist/
15-
- cd dist
16-
- yarn install
17-
- yarn semantic-release
11+
- npm run build
12+
- cp .git dist/@ngx-translate/http-loader/ -r # required by semantic release
13+
- cp README.md dist/@ngx-translate/http-loader/
14+
- cd dist/@ngx-translate/http-loader/
15+
- npm install
16+
- npm run semantic-release
1817
branches:
1918
except:
2019
- /^v\d+\.\d+\.\d+$/

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 Olivier Combe
1+
Copyright (c) 2018 Olivier Combe
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ Now you need to install the npm module for `TranslateHttpLoader`:
1717
npm install @ngx-translate/http-loader --save
1818
```
1919

20-
**if you're still on Angular <4.3, please use Http from @angular/http with http-loader@0.1.0.**
21-
22-
**If you're still using Angular v5, please use ngx-translate 9.x and http-loader 2.x, version 3 and above are only compatible with Angular v6. If you need to use RxJS 5, update to 5.6 and use the rxjs-compat library (see [the RxJS update guide](https://docs.google.com/document/d/12nlLt71VLKb-z3YaSGzUfx6mJbc34nsMXtByPUN35cg/preview#)).**
20+
Choose the version corresponding to your Angular version:
21+
22+
Angular | @ngx-translate/core | @ngx-translate/http-loader
23+
----------- | ------------------- | --------------------------
24+
6 | 10.x+ | 3.x+
25+
5 | 8.x to 9.x | 1.x to 2.x
26+
4.3 | 7.x or less | 1.x to 2.x
27+
2 to 4.2.x | 7.x or less | 0.x
2328

2429
## Usage
2530
#### 1. Setup the `TranslateModule` to use the `TranslateHttpLoader`:

angular.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"@ngx-translate/http-loader": {
7+
"root": "projects/ngx-translate/http-loader",
8+
"sourceRoot": "projects/ngx-translate/http-loader/src",
9+
"projectType": "library",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "projects/ngx-translate/http-loader/tsconfig.lib.json",
16+
"project": "projects/ngx-translate/http-loader/ng-package.json"
17+
}
18+
},
19+
"test": {
20+
"builder": "@angular-devkit/build-angular:karma",
21+
"options": {
22+
"main": "projects/ngx-translate/http-loader/test.ts",
23+
"tsConfig": "projects/ngx-translate/http-loader/tsconfig.spec.json",
24+
"karmaConfig": "projects/ngx-translate/http-loader/karma.conf.js"
25+
}
26+
},
27+
"lint": {
28+
"builder": "@angular-devkit/build-angular:tslint",
29+
"options": {
30+
"tsConfig": [
31+
"projects/ngx-translate/http-loader/tsconfig.lib.json",
32+
"projects/ngx-translate/http-loader/tsconfig.spec.json"
33+
],
34+
"exclude": [
35+
"**/node_modules/**"
36+
]
37+
}
38+
}
39+
}
40+
}
41+
},
42+
"defaultProject": "@ngx-translate/http-loader"
43+
}

0 commit comments

Comments
 (0)