Skip to content

Commit 745e47e

Browse files
committed
feat(config): Added new options, docs improbement, refactoring
- Added timer service - Added animation presets - Added and implements new options, such as auto hide, animation overlap, and more - Added styling for types, added material design theme - Updated TSLint, updated Node version, updated Gulp tasks - Added JS Docs, refactored many parts of the code - Updated demo - Updated dependencies
1 parent 4fcab3b commit 745e47e

35 files changed

+1330
-555
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.12
1+
6.9.1

.sass-lint.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
rules:
2+
attribute-quotes:
3+
- 1
4+
- include: true
25
bem-depth:
36
- 1
47
- max-depth: 1
@@ -17,6 +20,7 @@ rules:
1720
- 1
1821
- filename-extension: true
1922
leading-underscore: false
23+
declarations-before-nesting: 1
2024
empty-args:
2125
- 1
2226
- include: true
@@ -45,10 +49,18 @@ rules:
4549
- 1
4650
- allow-leading-underscore: false
4751
convention: hyphenatedbem
48-
indentation: 0
52+
indentation:
53+
- 1
54+
- size: tab
4955
leading-zero:
5056
- 1
5157
- include: false
58+
max-file-line-count:
59+
- 1
60+
- length: 500
61+
max-line-length:
62+
- 1
63+
- length: 140
5264
mixin-name-format:
5365
- 1
5466
- allow-leading-underscore: false
@@ -57,9 +69,18 @@ rules:
5769
nesting-depth:
5870
- 1
5971
- max-depth: 3
60-
no-color-literals: 0
72+
no-attribute-selectors: 1
73+
no-color-hex: 0
74+
no-color-keywords: 1
75+
no-color-literals:
76+
- 1
77+
- allow-map-identifiers: 1
78+
allow-rgba: 1
79+
allow-variable-identifiers: 1
80+
no-combinators: 0
6181
no-css-comments: 1
6282
no-debug: 1
83+
no-disallowed-properties: 0
6384
no-duplicate-properties: 1
6485
no-empty-rulesets: 1
6586
no-extends: 1
@@ -73,8 +94,10 @@ rules:
7394
- allow-element-with-attribute: true
7495
allow-element-with-class: true
7596
allow-element-with-id: false
97+
no-trailing-whitespace: 1
7698
no-trailing-zero: 1
7799
no-transition-all: 1
100+
no-url-domains: 1
78101
no-url-protocols: 1
79102
no-vendor-prefixes: 1
80103
no-warn: 1
@@ -86,24 +109,24 @@ rules:
86109
convention: hyphenatedbem
87110
property-sort-order:
88111
- 1
89-
- order: smacss
112+
- order: concentric
90113
ignore-custom-properties: true
91114
property-units:
92115
- 1
93116
- global:
94117
- "px"
95-
- "rem"
96118
- "%"
97119
- "s"
120+
pseudo-element: 1
98121
quotes:
99122
- 1
100123
- style: double
101124
shorthand-values:
102125
- 1
103126
- allowed-shorthands:
104127
- 1
105-
- 2
106-
- 3
128+
2
129+
3
107130
single-line-per-selector: 1
108131
space-after-bang:
109132
- 1
@@ -133,6 +156,9 @@ rules:
133156
url-quotes: 1
134157
variable-for-property:
135158
- 1
159+
- properties:
160+
- color
161+
- background-color
136162
variable-name-format:
137163
- 1
138164
- allow-leading-underscore: false

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ before_install:
2222
- npm install -g npm # Update npm to its latest version
2323
install:
2424
- npm install
25-
- npm run typings install # Install typings
2625

2726
before_script:
2827
- npm prune

demo/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ export class AppComponent {
3333
}
3434

3535
public test(): void {
36-
this.notifier.notify( 'test', `Notification #${ this.counter }` );
36+
this.notifier.notify( 'default', `Notification #${ this.counter }` );
3737
this.counter++;
3838
}
3939

4040
public showSpecific(): void {
4141
this.notifier.show( {
4242
id: 'ID_SPECIFIC',
4343
message: 'Specific notification here',
44-
type: 'test'
44+
type: 'default'
4545
} );
4646
}
4747

gulp-tasks/build.task.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
const gulp = require( 'gulp' );
44

5-
const environmentClean = require( './environment/environment-clean.task' );
5+
const envClean = require( './env/env-clean.task' );
66
const sassBuild = require( './sass/sass-build.task' );
77
const sassLint = require( './sass/sass-lint.task' );
8-
const typescriptBuild = require( './typescript/typescript-build.task' );
9-
const typescriptLint = require( './typescript/typescript-lint.task' );
8+
const tsBuild = require( './ts/ts-build.task' );
9+
const tsLint = require( './ts/ts-lint.task' );
1010

1111
/**
1212
* Gulp task: Complete build for development
1313
*/
1414
gulp.task( 'build--dev',
1515
gulp.series( [
16-
'environment:clean',
16+
'env:clean',
1717
gulp.parallel( [
18-
'typescript:build--dev',
18+
'ts:build--dev',
1919
'sass:build--dev'
2020
] )
2121
] )
@@ -26,11 +26,11 @@ gulp.task( 'build--dev',
2626
*/
2727
gulp.task( 'build--prod',
2828
gulp.series( [
29-
'environment:clean',
29+
'env:clean',
3030
gulp.parallel( [
31-
'typescript:lint',
31+
'ts:lint',
3232
'sass:lint',
33-
'typescript:build--prod',
33+
'ts:build--prod',
3434
'sass:build--prod'
3535
] )
3636
] )
@@ -41,7 +41,7 @@ gulp.task( 'build--prod',
4141
*/
4242
gulp.task( 'build--demo',
4343
gulp.series( [
44-
'environment:clean--demo',
45-
'typescript:build--demo'
44+
'env:clean--demo',
45+
'ts:build--demo'
4646
] )
4747
);

gulp-tasks/environment/environment-clean.task.js renamed to gulp-tasks/env/env-clean.task.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const gulp = require( 'gulp' );
66
/**
77
* Gulp task: Clean project build files
88
*/
9-
gulp.task( 'environment:clean', () => {
9+
gulp.task( 'env:clean', () => {
1010
return del( [
1111
'./index.js', // Generated JavaScript, sourcemaps, and TypeScript definition files ...
1212
'./index.js.map',
@@ -22,7 +22,7 @@ gulp.task( 'environment:clean', () => {
2222
/**
2323
* Gulp task: Clean demo build files
2424
*/
25-
gulp.task( 'environment:clean--demo', () => {
25+
gulp.task( 'env:clean--demo', () => {
2626
return del( [
2727
'./demo/*.js',
2828
'!./demo/systemjs.config.js'

gulp-tasks/typescript/typescript-build.task.js renamed to gulp-tasks/ts/ts-build.task.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const ts = require( 'gulp-typescript' );
88
/**
99
* Gulp task: Build project TypeScript for development
1010
*/
11-
gulp.task( 'typescript:build--dev', () => {
11+
gulp.task( 'ts:build--dev', () => {
1212

1313
// Compile TypeScript (without sourcemaps), using two sources for better performance (#perfmatters)
1414
let tsSourceProject = ts.createProject( './tsconfig.json' );
@@ -37,7 +37,7 @@ gulp.task( 'typescript:build--dev', () => {
3737
/**
3838
* Gulp task: Build project TypeScript for production
3939
*/
40-
gulp.task( 'typescript:build--prod', () => {
40+
gulp.task( 'ts:build--prod', () => {
4141

4242
// Compile TypeScript (including sourcemaps)
4343
let tsProject = ts.createProject( './tsconfig.json' );
@@ -64,7 +64,7 @@ gulp.task( 'typescript:build--prod', () => {
6464
/**
6565
* Gulp task: Build demo TypeScript
6666
*/
67-
gulp.task( 'typescript:build--demo', () => {
67+
gulp.task( 'ts:build--demo', () => {
6868

6969
// Compile TypeScript (including sourcemaps)
7070
let tsProject = ts.createProject( './tsconfig.json' );

gulp-tasks/ts/ts-lint.task.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict';
2+
3+
const gulp = require( 'gulp' );
4+
const gulpTslint = require( 'gulp-tslint' );
5+
const tslint = require( 'tslint' );
6+
7+
/**
8+
* Gulp task: Lint project TypeScript (and checks styleguide conventions)
9+
*/
10+
gulp.task( 'ts:lint', () => {
11+
const program = tslint.createProgram( './tsconfig.json' ); // Enable type-checked rules
12+
return gulp
13+
.src( [
14+
'./index.ts',
15+
'./src/**/*.ts'
16+
], {
17+
base: '.' // Fixes program issues, see <https://github.com/panuhorsmalahti/gulp-tslint/issues/71>
18+
} )
19+
.pipe( gulpTslint( { // Also runs codelyzer rules
20+
formatter: 'prose',
21+
program
22+
} ) )
23+
.pipe( gulpTslint.report() );
24+
} );

gulp-tasks/typescript/typescript-lint.task.js

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

gulp-tasks/watch.task.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ gulp.task( 'watch:reload', ( done ) => {
1818
/**
1919
* Gulp task: Start watcher for build tasks (note: paths muts be written without dots in the beginning!!)
2020
*/
21-
gulp.task( 'watch:build',
21+
gulp.task( 'watch',
2222
gulp.series( [
2323
gulp.parallel( [
2424
'build--dev',
@@ -51,7 +51,7 @@ gulp.task( 'watch:build',
5151
'index.ts',
5252
'src/**/*.ts'
5353
], gulp.series( [
54-
'typescript:build--dev',
54+
'ts:build--dev',
5555
'watch:reload'
5656
] ) );
5757
tsWatcher.on( 'change', ( path ) => {
@@ -74,7 +74,7 @@ gulp.task( 'watch:build',
7474
let demoTsWatcher = gulp.watch( [
7575
'demo/*.ts'
7676
], gulp.series( [
77-
'typescript:build--demo',
77+
'ts:build--demo',
7878
'watch:reload'
7979
] ) );
8080
demoTsWatcher.on( 'change', ( path ) => {

0 commit comments

Comments
 (0)