Skip to content

Commit

Permalink
refactor: use angular-cli during the deployment process
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

To support the angular-cli process we performed some adjustments:
- kaltura ng libraries were renamed from `@kaltura-ng2` to `@kaltura-ng`.
- kaltura ng libraries build process uses ngc instead of tsc.
- kaltura typescript client lib `types/all` imports were changed to import types explicitly.
- kaltura theme was moved from the repo outside to a separated theme repo. previously imported theme from `~kmcng-theme/scss/variables`. use `app-styles/_variables.scss`instead.
- the configuration data was merged into angular-cli environment infrastructure and is now accessible by importing `environment` from `app-environment`
- kmc-shell was moved into `app-shared`
- css class `kUseKMCngIcons` was replaced with `kOverrideFAIcons`
  • Loading branch information
eransakal authored Jun 26, 2017
1 parent 6be4c78 commit a31dd05
Show file tree
Hide file tree
Showing 209 changed files with 3,371 additions and 6,887 deletions.
62 changes: 62 additions & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "KMCng"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"i18n",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "kmc",
"styles": [
"styles/app-theme/styles.sass"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
},
"stylePreprocessorOptions" : {
"includePaths" : ["styles"]
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}

13 changes: 7 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
# Editor configuration, see http://editorconfig.org
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
indent_style = tab
indent_size = 4
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
88 changes: 38 additions & 50 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,55 +1,43 @@
# Logs
logs
*.log
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# compiled output
/dist
/tmp
/out-tsc

# Users Environment Variables
.lock-wscript
# dependencies
/node_modules

# OS generated files #
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings
yarn*.log

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
ehthumbs.db
Icon?
Thumbs.db

# Node Files #
/node_modules
/bower_components

# Coverage #
/coverage/

# Typing #
/src/typings/tsd/
/typings/
/tsd_typings/

# Dist #
/dist
/public/__build__/
/src/*/__build__/
__build__/**
.webpack.json

# Doc #
/doc/

# IDE #
.idea/
*.swp
8 changes: 4 additions & 4 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Fork and clone the this repository:

1. Login to your GitHub account or create one by following the instructions given
[here](https://github.com/signup/free).
2. [Fork](http://help.github.com/forking) the [repository](https://github.com/KMCng/KMCng-infra).
2. [Fork](http://help.github.com/forking) the [repository](https://github.com/KMCng/kaltura-ng).
3. Clone your fork of the infrastructure repository and define an `upstream` remote pointing back to
the Angular repository that you forked in the first place.

Expand Down Expand Up @@ -68,7 +68,7 @@ $ npm run setup
* remove previous `node_modules` and `dist` folders
* run `yarn install` (which is equivalent to `npm install`)
* run `npm run build`
* configure `wml` with to local modules of [kaltura-ng](https://github.com/kaltura/KMCng-infra) if exists on your machine.
* configure `wml` with to local modules of [kaltura-ng](https://github.com/kaltura/kaltura-ng) if exists on your machine.


> You should run setup every time you pull changes to make sure you are in-sync with latest libraries/changes done by others.
Expand All @@ -93,13 +93,13 @@ $ npm run serve

## Syncing changes from other local module into an other module

If you are developing [kaltura-ng](https://github.com/kaltura/KMCng-infra) modules locally, and you want to sync their change into this repo do the following:
If you are developing [kaltura-ng](https://github.com/kaltura/kaltura-ng) modules locally, and you want to sync their change into this repo do the following:

```shell
$ npm run wml:sync
```

To watch for changes and sync them automatically when the local [kaltura-ng](https://github.com/kaltura/KMCng-infra) modules are being re-build do the following:
To watch for changes and sync them automatically when the local [kaltura-ng](https://github.com/kaltura/kaltura-ng) modules are being re-build do the following:
```shell
$ npm run wml:watch
```
Expand Down
8 changes: 0 additions & 8 deletions config/empty.js

This file was deleted.

20 changes: 0 additions & 20 deletions config/head-config.common.js

This file was deleted.

28 changes: 0 additions & 28 deletions config/helpers.js

This file was deleted.

108 changes: 0 additions & 108 deletions config/html-elements-plugin/index.js

This file was deleted.

Loading

0 comments on commit a31dd05

Please sign in to comment.