Skip to content

Commit 44cf748

Browse files
committed
1.2.1
Updated for ng2 final release Added Webpack example
1 parent 611f4a1 commit 44cf748

Some content is hidden

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

55 files changed

+1654
-997
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ examples/node_modules/*
66
examples/typings/*
77
examples/npm-debug.log
88

9+
examples_webpack/node_modules/*
10+
examples_webpack/dist/*
11+
examples_webpack/typings/*
12+
913
node_modules/*
1014
typings/*
1115
npm-debug.log
1216

13-
.sass-cache
1417
nbproject/*

.npmignore

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

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "angular2-color-picker",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"authors": [
55
"Alberto Pujante <[email protected]>"
66
],
77
"description": "Color Picker Directive for Angular 2 with no dependencies required",
88
"main": [
9-
"src/color-picker.directive.ts"
9+
"lib/color-picker.directive.ts"
1010
],
1111
"ignore": [
1212
"node_modules"

examples/app/app.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class Cmyk {
1212

1313
export class AppComponent {
1414
constructor(private cpService: ColorPickerService) { }
15-
15+
1616
private color: string = '#2889e9';
1717
private color2: string = "hsla(300,82%,52%)";
1818
private color3: string = "#fff500";
@@ -21,15 +21,15 @@ export class AppComponent {
2121
private color6: string = "#1973c0";
2222
private color7: string = "#f200bd";
2323
private color8: string = "#a8ff00";
24-
private color9: string = "#3b4da1";
25-
private cmyk: Cmyk = new Cmyk(0,0,0,0);
24+
private color9: string = "#3b4da1";
25+
private cmyk: Cmyk = new Cmyk(0, 0, 0, 0);
2626

2727
onChangeColor(color: string): Cmyk {
2828
return this.rgbaToCmyk(this.cpService.hsvaToRgba(this.cpService.stringToHsva(color)));
2929
}
30-
30+
3131
rgbaToCmyk(rgba: Rgba): Cmyk {
32-
var cmyk: Cmyk = new Cmyk(0,0,0,0), k;
32+
let cmyk: Cmyk = new Cmyk(0, 0, 0, 0), k: number;
3333
k = 1 - Math.max(rgba.r, rgba.g, rgba.b);
3434
if (k == 1) return new Cmyk(0, 0, 0, 1);
3535
cmyk.c = (1 - rgba.r - k) / (1 - k);

examples/app/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,4 +312,4 @@ <h4><b>by Alberto Pujante</b></h4>
312312
<footer class="footer">&copy; Alberto Pujante 2016 | <a href="https://github.com/Alberplz/angular2-color-picker">Angular2 Color Picker</a></footer>
313313
<br>
314314

315-
</div>
315+
</div>

examples/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
}
3737
</style>
3838

39-
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
40-
<script src="https://npmcdn.com/[email protected].12?main=browser"></script>
41-
<script src="https://npmcdn.com/[email protected]"></script>
42-
<script src="https://npmcdn.com/[email protected]/dist/system.src.js"></script>
39+
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
40+
<script src="https://unpkg.com/[email protected].21/dist/zone.js"></script>
41+
<script src="https://unpkg.com/[email protected]"></script>
42+
<script src="https://unpkg.com/[email protected]/dist/system.src.js"></script>
4343

4444
<!--uncomment to load files locally
4545
<script src="node_modules/core-js/client/shim.min.js"></script>

examples/package.json

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular2-color-picker-example",
33
"description": "Example for Angular2 Color Picker",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"scripts": {
66
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
77
"lite": "lite-server",
@@ -12,28 +12,27 @@
1212
},
1313
"license": "MIT",
1414
"dependencies": {
15-
"@angular/common": "2.0.0-rc.5",
16-
"@angular/compiler": "2.0.0-rc.5",
17-
"@angular/core": "2.0.0-rc.5",
18-
"@angular/forms": "0.3.0",
19-
"@angular/http": "2.0.0-rc.5",
20-
"@angular/platform-browser": "2.0.0-rc.5",
21-
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
22-
"@angular/router": "3.0.0-rc.1",
23-
"@angular/router-deprecated": "2.0.0-rc.2",
24-
"@angular/upgrade": "2.0.0-rc.5",
25-
"systemjs": "0.19.27",
26-
"core-js": "^2.4.0",
15+
"@angular/common": "2.0.0",
16+
"@angular/compiler": "2.0.0",
17+
"@angular/core": "2.0.0",
18+
"@angular/forms": "2.0.0",
19+
"@angular/http": "2.0.0",
20+
"@angular/platform-browser": "2.0.0",
21+
"@angular/platform-browser-dynamic": "2.0.0",
22+
"@angular/router": "3.0.0",
23+
"@angular/upgrade": "2.0.0",
24+
"core-js": "^2.4.1",
2725
"reflect-metadata": "^0.1.3",
28-
"rxjs": "5.0.0-beta.6",
29-
"zone.js": "^0.6.12",
30-
"angular2-in-memory-web-api": "0.0.15",
26+
"rxjs": "5.0.0-beta.12",
27+
"systemjs": "0.19.27",
28+
"zone.js": "^0.6.23",
29+
"angular2-in-memory-web-api": "0.0.20",
3130
"bootstrap": "^3.3.6"
3231
},
3332
"devDependencies": {
34-
"concurrently": "^2.0.0",
35-
"lite-server": "^2.2.0",
36-
"typescript": "^1.8.10",
37-
"typings": "^1.0.4"
33+
"concurrently": "^2.2.0",
34+
"lite-server": "^2.2.2",
35+
"typescript": "^2.0.2",
36+
"typings": "^1.3.2"
3837
}
3938
}

examples/systemjs.config.js

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,44 @@
33
* Adjust as necessary for your application needs.
44
*/
55
(function (global) {
6-
// map tells the System loader where to look for things
7-
var map = {
8-
'app': 'app', // 'dist',
9-
'@angular': 'node_modules/@angular',
10-
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
11-
'rxjs': 'node_modules/rxjs',
12-
'angular2-color-picker': 'node_modules/angular2-color-picker'
13-
};
14-
// packages tells the System loader how to load when no filename and/or no extension
15-
var packages = {
16-
'app': {main: 'main.js', defaultExtension: 'js'},
17-
'rxjs': {defaultExtension: 'js'},
18-
'angular2-in-memory-web-api': {main: 'index.js', defaultExtension: 'js'},
19-
'angular2-color-picker': {main:'index.js', defaultExtension: 'js'}
20-
};
21-
var ngPackageNames = [
22-
'common',
23-
'compiler',
24-
'core',
25-
'forms',
26-
'http',
27-
'platform-browser',
28-
'platform-browser-dynamic',
29-
'router',
30-
'router-deprecated',
31-
'upgrade',
32-
];
33-
// Individual files (~300 requests):
34-
function packIndex(pkgName) {
35-
packages['@angular/' + pkgName] = {main: 'index.js', defaultExtension: 'js'};
36-
}
37-
// Bundled (~40 requests):
38-
function packUmd(pkgName) {
39-
packages['@angular/' + pkgName] = {main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js'};
40-
}
41-
// Most environments should use UMD; some (Karma) need the individual index files
42-
var setPackageConfig = System.packageWithIndex ? packIndex : packUmd;
43-
// Add package entries for angular packages
44-
ngPackageNames.forEach(setPackageConfig);
45-
var config = {
46-
map: map,
47-
packages: packages
48-
};
49-
System.config(config);
6+
System.config({
7+
paths: {
8+
// paths serve as alias
9+
'npm:': 'node_modules/'
10+
},
11+
// map tells the System loader where to look for things
12+
map: {
13+
// our app is within the app folder
14+
app: 'app',
15+
// angular bundles
16+
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
17+
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
18+
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
19+
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
20+
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
21+
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
22+
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
23+
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
24+
// other libraries
25+
'rxjs': 'npm:rxjs',
26+
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
27+
'angular2-color-picker': 'node_modules/angular2-color-picker'
28+
},
29+
// packages tells the System loader how to load when no filename and/or no extension
30+
packages: {
31+
app: {
32+
main: './main.js',
33+
defaultExtension: 'js'
34+
},
35+
rxjs: {
36+
defaultExtension: 'js'
37+
},
38+
'angular2-in-memory-web-api': {
39+
main: './index.js',
40+
defaultExtension: 'js'
41+
},
42+
'angular2-color-picker': {main: 'index.js', defaultExtension: 'js'}
43+
}
44+
});
5045
})(this);
46+

examples/tsconfig.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
"emitDecoratorMetadata": true,
88
"experimentalDecorators": true,
99
"removeComments": false,
10-
"noImplicitAny": false,
11-
"declaration": true
12-
},
13-
"exclude": [
14-
"node_modules",
15-
"examples"
16-
]
10+
"noImplicitAny": false
11+
}
1712
}

examples/typings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"globalDependencies": {
3-
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
3+
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
44
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
5-
"node": "registry:dt/node#6.0.0+20160807145350"
5+
"node": "registry:dt/node#6.0.0+20160909174046"
66
}
77
}

0 commit comments

Comments
 (0)