Skip to content

Commit 88ec6e4

Browse files
committed
refactor(Global): Move to a bundle architecture (rollup & angular cli for demo app)
Fix all component to be compliant with Cli-compiler BREAKING CHANGE: Move all .module.ts files to index.ts #111
1 parent d323880 commit 88ec6e4

File tree

237 files changed

+5279
-1728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+5279
-1728
lines changed

.angular-cli.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"project": {
4+
"name": "dejajs-component"
5+
},
6+
"apps": [
7+
{
8+
"root": "demo",
9+
"outDir": "dist-demo",
10+
"assets": [
11+
"assets",
12+
"favicon.ico",
13+
"vs"
14+
],
15+
"index": "index.html",
16+
"main": "main.ts",
17+
"polyfills": "../polyfills.ts",
18+
"test": "test.ts",
19+
"tsconfig": "tsconfig.app.json",
20+
"testTsconfig": "tsconfig.spec.json",
21+
"prefix": "app",
22+
"styles": [
23+
"styles.scss"
24+
],
25+
"scripts": [
26+
"../node_modules/moment/min/moment.min.js",
27+
"../send-action.js",
28+
"send-action-demo.js"
29+
],
30+
"environmentSource": "environments/environment.ts",
31+
"environments": {
32+
"dev": "environments/environment.ts",
33+
"prod": "environments/environment.prod.ts"
34+
}
35+
}
36+
],
37+
"e2e": {
38+
"protractor": {
39+
"config": "./protractor.conf.js"
40+
}
41+
},
42+
"lint": [
43+
{
44+
"project": "demo/tsconfig.app.json"
45+
},
46+
{
47+
"project": "demo/tsconfig.spec.json"
48+
},
49+
{
50+
"project": "e2e/tsconfig.e2e.json"
51+
}
52+
],
53+
"test": {
54+
"karma": {
55+
"config": "./karma.conf.js"
56+
}
57+
},
58+
"defaults": {
59+
"styleExt": "scss",
60+
"component": {}
61+
}
62+
}

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 54 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,59 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Node template
3-
# Logs
4-
logs
5-
*.log
6-
npm-debug.log*
7-
*.bat
8-
9-
# Runtime data
10-
pids
11-
*.pid
12-
*.seed
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
21-
.grunt
22-
23-
# node-waf configuration
24-
.lock-wscript
25-
26-
# Compiled binary addons (http://nodejs.org/api/addons.html)
27-
build/Release
28-
29-
# Dependency directory
30-
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
31-
id_rsa
32-
id_rsa.pub
33-
node_modules
34-
dist
35-
*.d.ts
36-
*.js
37-
*.js.map
38-
!webpack.*
39-
!send-action.js
40-
!send-action-test.js
41-
!bs-config.js
42-
!specs/**/*.js
43-
44-
src/polyfills.js
45-
src/**/*.css
46-
src/**/*.css.map
47-
48-
dejajs-angular2.css
49-
50-
# IntelliJ project files
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/dist-demo
6+
/build
7+
/.tmp
8+
/out-tsc
9+
/docs
10+
11+
# dependencies
12+
/node_modules
13+
14+
# IDEs and editors
15+
/.idea
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# IDE - VSCode
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
30+
# IDE - IntelliJ
5131
*.iml
5232
*.iws
5333
*.ipr
5434
.idea/
5535

56-
# vscode project file
57-
.vscode/
58-
59-
# Typings
60-
typings/
61-
!src/common/global-event/typings
62-
63-
# docs
64-
docs/
65-
66-
# The output file for cyclic dependencies
67-
stats.json
36+
# misc
37+
/.sass-cache
38+
/connect.lock
39+
/coverage
40+
/libpeerconnection.log
41+
npm-debug.log
42+
testem.log
43+
/typings
44+
45+
# e2e
46+
/e2e/*.js
47+
/e2e/*.map
48+
49+
# System Files
50+
.DS_Store
51+
Thumbs.db
52+
53+
# Ignore in source
54+
src/*.js
55+
src/*.js.map
56+
src/**/*.d.ts
57+
58+
# Ignore in demo
59+
demo/vs

.npmignore

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
1-
# Compiled binary addons (http://nodejs.org/api/addons.html)
2-
build/Release
1+
# Node
2+
node_modules/*
3+
npm-debug.log
4+
docs/*
5+
# DO NOT IGNORE TYPESCRIPT FILES FOR NPM
6+
# TypeScript
7+
# *.js
8+
# *.map
9+
# *.d.ts
310

4-
# Dependency directory
5-
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
6-
node_modules
7-
8-
# IntelliJ project files
11+
# JetBrains
12+
.idea
13+
.project
14+
.settings
15+
.idea/*
916
*.iml
10-
*.iws
11-
*.ipr
12-
.idea/
1317

14-
#VS code project files
15-
.vscode/
18+
# VS Code
19+
.vscode/*
20+
21+
# Windows
22+
Thumbs.db
23+
Desktop.ini
24+
25+
# Mac
26+
.DS_Store
27+
**/.DS_Store
1628

17-
#Typings
18-
typings/
29+
# Ngc generated files
30+
**/*.ngfactory.ts
1931

20-
#npm-debug logs horodated
21-
npm-debug.log*
32+
# Library files
33+
src/*
34+
build/*

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,20 @@ branches:
2525
- dev
2626
before_install:
2727
- rm -rf node_modules
28-
- bash ./scripts/test-latest-versions.sh
28+
- bash ./tools/scripts/test-latest-versions.sh
2929
before_script:
3030
- "export DISPLAY=:99.0"
3131
- "sh -e /etc/init.d/xvfb start"
3232
- sleep 3
3333
- npm prune
34-
- npm run licensecheck
34+
- yarn run licensecheck
35+
- yarn run lint
3536
script:
36-
- npm test
37+
- yarn run e2e
3738
env:
3839
global:
3940
- ENCRYPTION_LABEL: d9215e5535f8
4041
- COMMIT_AUTHOR_EMAIL: [email protected]
41-
before_deploy:
42-
- bash ./scripts/fix-versions.sh
4342
deploy:
4443
provider: npm
4544

bs-config.js

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

demo-app/demo-app/theme.scss

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

404.html renamed to demo/404.html

File renamed without changes.

demo-app/accordion/accordion-demo.html renamed to demo/app/accordion/accordion-demo.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</md-card>
66
</md-tab>-->
77
<md-tab label="API REFERENCE"></md-tab>
8-
<md-tab label="EXAMPLES"></md-tab>
8+
<md-tab label="EXAMPLES 2"></md-tab>
99
</md-tab-group>
1010

1111
<md-card class="demo-card demo-basic" *ngIf="tabIndex === 0">

demo-app/accordion/accordion-demo.ts renamed to demo/app/accordion/accordion-demo.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { Component } from '@angular/core';
1010

1111
@Component({
1212
selector: 'deja-accordion-demo',
13-
styleUrls: ['./accordion-demo.scss'],
14-
templateUrl: './accordion-demo.html',
13+
styleUrls: ['./accordion-demo.component.scss'],
14+
templateUrl: './accordion-demo.component.html',
1515
})
1616
export class DejaAccordionDemoComponent {
1717
protected tabIndex = 1;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export declare class DejaAccordionDemoComponent {
2+
protected tabIndex: number;
3+
constructor();
4+
}

demo-app/demo-app/demo-app.html renamed to demo/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<md-toolbar color="primary" id="toolbar-demo">
2-
<img src="hug-logo-bw.svg" alt="HUG Logo" height="30">
2+
<img src="/assets/img/logo/hug-logo-bw.svg" alt="HUG Logo" height="30">
33
<a md-button routerLink="/">DEJA JS</a>
44
<a md-button routerLink="/components">COMPONENTS</a>
55
<a md-button routerLink="/guides">GUIDES</a>

demo-app/demo-app/demo-app.scss renamed to demo/app/app.component.scss

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
@import '~@angular/material/theming';
2-
@import '../../src/scss/index.scss';
3-
@import '../home/home-theme';
4-
5-
@mixin create-theme($color1, $color2) {
6-
@include mat-core();
7-
8-
// Define color scheme
9-
$primary: mat-palette($color1);
10-
$accent: mat-palette($color2);
11-
$warn: mat-palette($mat-red);
12-
13-
// Create the theme object from colors
14-
$pink-theme: mat-light-theme($primary, $accent, $warn);
15-
16-
// Include theme styles for core and each component used in the app.
17-
@include angular-material-theme($pink-theme);
18-
19-
/* ------ FAKE THEME ----- */
20-
/* WE NEED TO CREATE A FAKE THEME AND OVERRIDE THE COMPONENT MIXIN TO FIX THE MATERIAL COMPONENT COLOR ISSUE */
21-
/* https://github.com/angular/material2/issues/947 */
22-
$fake-theme: mat-light-theme($primary, $primary, $warn);
23-
@include mat-radio-theme($fake-theme);
24-
@include deja-theme($pink-theme);
25-
@include home-demo-theme($pink-theme);
26-
}
2+
/*@import '../home/home-theme';*/
273

284
html,
295
body {
@@ -32,24 +8,6 @@ body {
328
padding: 0;
339
}
3410

35-
demo-app {
36-
width: 100%;
37-
height: 100%;
38-
display: flex;
39-
flex-direction: column;
40-
// overflow: hidden;
41-
42-
&[theme="hug"] {
43-
@import '../../src/scss/variables/themeHUG';
44-
@include deja-theme($theme);
45-
@include home-demo-theme($theme);
46-
}
47-
48-
&[theme="pink"] { @include create-theme($mat-pink, $mat-indigo); }
49-
&[theme="teal"] { @include create-theme($mat-teal, $mat-green); }
50-
&[theme="amber"] { @include create-theme($mat-amber, $mat-orange); }
51-
}
52-
5311
body {
5412
font-family: Roboto, 'Helvetica Neue', sans-serif;
5513
// Helps fonts on OSX looks more consistent with other systems

0 commit comments

Comments
 (0)