Skip to content

Commit 0c89039

Browse files
committed
chore(gulp): Added bundles and sourcemaps, added AoT support, refactored build process
- Added bundles (normal and minified) for JavaScript (UMD) and CSS - Added sourcemaps for SASS and TypeScript - Added support for AoT compilation - Refactored tasks and task directory structure
1 parent 745e47e commit 0c89039

40 files changed

+929
-481
lines changed

.gitignore

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
# Dependencies
22
/node_modules
3-
/typings
43

5-
# Build code
4+
# Build: JavaScript plus sourcemaps
5+
/index.d.ts
66
/index.js
77
/index.js.map
8-
/index.d.ts
8+
/index.metadata.json
9+
/src/**/*.d.ts
910
/src/**/*.js
1011
/src/**/*.js.map
11-
/src/**/*.d.ts
12+
/src/**/*.metadata.json
13+
14+
# Build: CSS plus sourcemaps
1215
/style.css
16+
/style.css.map
1317
/src/styles/**/*.css
18+
/src/styles/**/*.css.map
19+
20+
# Build: Bundles
21+
/bundles
1422

15-
# Demo build code
23+
# Build: Demo
1624
/demo/*.js
1725
!/demo/systemjs.config.js
1826

@@ -21,6 +29,8 @@
2129

2230
# Development
2331
/.vscode
32+
33+
# Other
2434
*.todo
2535
*.old
2636
*.temp

.npmignore

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,34 @@
11
# Dependencies
22
/node_modules
3-
/typings
43

5-
# Source code
4+
# TypeScript source code
65
/index.ts
76
/src/**/*.ts
87
!/src/**/*.d.ts
98

10-
# Demo code
9+
# Demo
1110
/demo
1211

1312
# Build process
14-
/gulp-tasks
13+
/tools
1514
/.nvmrc
1615
/.sass-lint.yml
1716
/.travis.yml
1817
/browserlist
1918
/gulpfile.js
20-
/gulpfile.config.json
2119
/karma.config.js
22-
/karma-test-shim.js
20+
/karma-angular.config.js
2321
/tsconfig.json
22+
/tsconfig-aot.json
2423
/tslint.json
25-
/typings.json
2624

2725
# GitHub templates
2826
/.github
2927

3028
# Logs
3129
*.log
3230

33-
# Development
34-
/.vscode
31+
# Other
3532
*.todo
3633
*.old
3734
*.temp

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_script:
2828
- export DISPLAY=:99.0
2929
- sh -e /etc/init.d/xvfb start # Run xvfb to fake a display (muhaha ...)
3030
script:
31-
- npm run gulp build--prod && npm run gulp test # First build, then (if successful) test
31+
- npm run gulp test && npm run gulp build--publish # First test, then build for npm publish
3232

3333
before_deploy: # Automatic semantic release
3434
- git config --global user.name "dominique-mueller"; # Setup git

demo/app.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
* External imports
3-
*/
41
import { Component } from '@angular/core';
52

63
import { NotifierService } from './../index';

demo/app.module.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
/**
2-
* External imports
3-
*/
41
import { NgModule } from '@angular/core';
52
import { BrowserModule } from '@angular/platform-browser';
6-
import { NotifierModule } from '../index';
73

8-
/**
9-
* Internal imports
10-
*/
4+
import { NotifierModule } from './../index';
5+
116
import { AppComponent } from './app.component';
127

138
/**

demo/systemjs.config.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,39 @@ System.config( {
99

1010
// Package location details
1111
map: {
12+
13+
// Demo & library
1214
'app': './',
15+
'../': './../',
16+
17+
// Libraries
1318
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
1419
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
1520
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
1621
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
1722
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
18-
'rxjs': 'npm:rxjs',
19-
'../': './../'
23+
'rxjs': 'npm:rxjs'
24+
2025
},
2126

2227
// Package loading details
2328
packages: {
29+
30+
// App & library
2431
'app': {
25-
main: './main.js',
26-
defaultExtension: 'js'
27-
},
28-
'rxjs': {
32+
main: 'main.js',
2933
defaultExtension: 'js'
3034
},
3135
'../': {
3236
main: 'index.js',
3337
defaultExtension: 'js'
38+
},
39+
40+
// Libraries
41+
'rxjs': {
42+
defaultExtension: 'js'
3443
}
44+
3545
}
3646

3747
} );

gulp-tasks/build.task.js

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

gulp-tasks/env/env-clean.task.js

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

gulp-tasks/release.task.js

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

gulp-tasks/sass/sass-build.task.js

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

0 commit comments

Comments
 (0)