Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ node_modules/*
typings/*
npm-debug.log

nbproject/*
nbproject/*

# lib/
# *.js
# *.js.map
11 changes: 6 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "angular2-color-picker",
"version": "1.2.1",
"name": "angular4-color-picker",
"version": "1.4.0",
"authors": [
"Alberto Pujante <[email protected]>"
"Alberto Pujante <[email protected]>",
"Russu Vadim <[email protected]>"
],
"description": "Color Picker Directive for Angular 2 with no dependencies required",
"description": "Color Picker Directive for Angular 4 with no dependencies required",
"main": [
"lib/color-picker.directive.ts"
],
"ignore": [
"node_modules"
],
"licence": "MIT"
}
}
2 changes: 1 addition & 1 deletion examples/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component} from '@angular/core';
import {ColorPickerDirective, ColorPickerService, Rgba} from 'angular2-color-picker';
import {ColorPickerDirective, ColorPickerService, Rgba} from 'angular4-color-picker';

export class Cmyk {
constructor(public c: number, public m: number, public y: number, public k: number) { }
Expand Down
2 changes: 1 addition & 1 deletion examples/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {ColorPickerModule} from 'angular2-color-picker';
import {ColorPickerModule} from 'angular4-color-picker';

import {AppComponent} from './app.component';

Expand Down
4 changes: 2 additions & 2 deletions examples/app/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1>Angular2 Color Picker Directive</h1>
<h4>A Color Picker Directive for Angular 2 with no dependencies.</h4>
<h4><b>by Alberto Pujante</b></h4>
<a class="btn btn-primary btn-lg" href="https://github.com/Alberplz/angular2-color-picker">View on Github</a>
<a class="btn btn-primary btn-lg" href="https://github.com/rvmoldova/angular4-color-picker">View on Github</a>

<hr>
<div class="row">
Expand Down Expand Up @@ -511,7 +511,7 @@ <h4><b>by Alberto Pujante</b></h4>
</div>
</div>
<hr>
<footer class="footer">&copy; Alberto Pujante 2016 | <a href="https://github.com/Alberplz/angular2-color-picker">Angular2 Color Picker</a></footer>
<footer class="footer">&copy; Alberto Pujante 2016 | <a href="https://github.com/rvmoldova/angular4-color-picker">Angular2 Color Picker</a></footer>
<br>

</div>
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "angular2-color-picker-example",
"name": "angular4-color-picker-example",
"version": "1.3.1",
"description": "Example for Angular2 Color Picker",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions examples/systemjs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
// other libraries
'rxjs': 'npm:rxjs',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'angular2-color-picker': 'node_modules/angular2-color-picker',
'angular4-color-picker': 'node_modules/angular4-color-picker',
'ts': 'npm:[email protected]/lib/plugin.js',
'typescript': 'npm:[email protected]/lib/typescript.js'
},
Expand All @@ -51,7 +51,7 @@
main: './index.js',
defaultExtension: 'js'
},
'angular2-color-picker': {main: 'index.ts', defaultExtension: 'ts'}
'angular4-color-picker': {main: 'index.ts', defaultExtension: 'ts'}
}
});
})(this);
Expand Down
4 changes: 2 additions & 2 deletions examples_webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular2-color-picker-example",
"name": "angular4-color-picker-example",
"version": "1.3.1",
"description": "Example for Angular2 Color Picker",
"description": "Example for Angular4 Color Picker",
"scripts": {
"start": "webpack-dev-server --inline --progress --port 8080",
"test": "karma start",
Expand Down
4 changes: 2 additions & 2 deletions examples_webpack/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1>Angular2 Color Picker Directive</h1>
<h4>A Color Picker Directive for Angular 2 with no dependencies.</h4>
<h4><b>by Alberto Pujante</b></h4>
<a class="btn btn-primary btn-lg" href="https://github.com/Alberplz/angular2-color-picker">View on Github</a>
<a class="btn btn-primary btn-lg" href="https://github.com/rvmoldova/angular4-color-picker">View on Github</a>

<hr>
<div class="row">
Expand Down Expand Up @@ -511,7 +511,7 @@ <h4><b>by Alberto Pujante</b></h4>
</div>
</div>
<hr>
<footer class="footer">&copy; Alberto Pujante 2016 | <a href="https://github.com/Alberplz/angular2-color-picker">Angular2 Color Picker</a></footer>
<footer class="footer">&copy; Alberto Pujante 2016 | <a href="https://github.com/rvmoldova/angular4-color-picker">Angular2 Color Picker</a></footer>
<br>

</div>
2 changes: 1 addition & 1 deletion examples_webpack/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from '@angular/core';
import '../../public/css/styles.css';
import {ColorPickerService, Rgba} from 'angular2-color-picker/lib';
import {ColorPickerService, Rgba} from 'angular4-color-picker/lib';

export class Cmyk {
constructor(public c: number, public m: number, public y: number, public k: number) { }
Expand Down
2 changes: 1 addition & 1 deletion examples_webpack/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import {ColorPickerModule, ColorPickerService} from 'angular2-color-picker/lib';
import {ColorPickerModule, ColorPickerService} from 'angular4-color-picker/lib';

@NgModule({
imports: [
Expand Down
2 changes: 1 addition & 1 deletion examples_webpack/src/vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import 'rxjs';
// Other vendors for example jQuery, Lodash or Bootstrap
// You can import js, ts, css, sass, ...

import 'angular2-color-picker/lib';
import 'angular4-color-picker/lib';
47 changes: 23 additions & 24 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var gulp = require('gulp');
var del = require('del');
var tsc = require('gulp-typescript');
var gulpTypings = require("gulp-typings");
var sourcemaps = require('gulp-sourcemaps');
var tscConfig = require('./tsconfig.json');
var sass = require('gulp-sass');
Expand All @@ -13,71 +12,71 @@ gulp.task('clean', function () {
return del.sync('lib/**/*');
});

gulp.task("typings", function () {
return gulp.src("./typings.json").pipe(gulpTypings());
});

gulp.task('sass', function () {
return gulp.src('src/**/*.scss')
.pipe(sass({outputStyle: 'compressed'}))
.pipe(gulp.dest('src'));
.pipe(sass({
outputStyle: 'compressed'
}))
.pipe(gulp.dest('src'));
});

gulp.task('createts', function () {
return gulp.src(['src/**/*.ts'])
.pipe(inlineNg2Template({base: '/src'}))
.pipe(gulp.dest('lib'));
.pipe(inlineNg2Template({
base: '/src'
}))
.pipe(gulp.dest('lib'));
});

gulp.task('compile:lib', function () {
var r = gulp.src(['typings/index.d.ts', 'lib/**/*.ts'])
.pipe(sourcemaps.init())
.pipe(tsc(tscConfig.compilerOptions));
var r = gulp.src(['lib/**/*.ts'])
.pipe(sourcemaps.init())
.pipe(tsc(tscConfig.compilerOptions));

r.dts.pipe(gulp.dest('lib'));
r.js.pipe(uglify()).pipe(gulp.dest('lib'));

return r.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('lib'));
.pipe(gulp.dest('lib'));
});

gulp.task('compile:index', function () {
var r = gulp.src(['typings/index.d.ts', 'index.ts'])
.pipe(sourcemaps.init())
.pipe(tsc(tscConfig.compilerOptions));
var r = gulp.src(['index.ts'])
.pipe(sourcemaps.init())
.pipe(tsc(tscConfig.compilerOptions));

r.dts.pipe(gulp.dest('.'));
r.js.pipe(gulp.dest('.'));

return r.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('.'));
.pipe(gulp.dest('.'));
});

gulp.task('clean:postcompile', function () {
return del.sync('src/templates/default/color-picker.css');
});

gulp.task('default', function (callback) {
runSequence('clean', 'typings', 'sass', 'createts', 'compile:lib', 'compile:index', 'clean:postcompile', callback);
runSequence('clean', 'sass', 'createts', 'compile:lib', 'compile:index', 'clean:postcompile', callback);
});

//copy the library to example/node_modules/angular2-color-picker and examples_webpack/node_modules/angular2-color-picker
//copy the library to example/node_modules/angular4-color-picker and examples_webpack/node_modules/angular4-color-picker
gulp.task('copylib', function (callback) {
runSequence('clean:examples', 'copy:lib', 'copy:index', callback);
});

gulp.task('copy:lib', function () {
return gulp.src(['lib/**/*'])
.pipe(gulp.dest('examples_webpack/node_modules/angular2-color-picker/lib'))
.pipe(gulp.dest('examples/node_modules/angular2-color-picker/lib'));
.pipe(gulp.dest('examples_webpack/node_modules/angular4-color-picker/lib'))
.pipe(gulp.dest('examples/node_modules/angular4-color-picker/lib'));
});

gulp.task('copy:index', function () {
return gulp.src(['index.*'])
.pipe(gulp.dest('examples/node_modules/angular2-color-picker'))
.pipe(gulp.dest('examples/node_modules/angular2-color-picker'));
.pipe(gulp.dest('examples/node_modules/angular4-color-picker'))
.pipe(gulp.dest('examples/node_modules/angular4-color-picker'));
});

gulp.task('clean:examples', function () {
return del.sync('examples_webpack/node_modules/angular2-color-picker/**/*', 'examples/node_modules/angular2-color-picker/**/*');
return del.sync('examples_webpack/node_modules/angular4-color-picker/**/*', 'examples/node_modules/angular4-color-picker/**/*');
});
3 changes: 0 additions & 3 deletions index.html

This file was deleted.

1 change: 1 addition & 0 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/classes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/classes.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/color-picker.directive.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/color-picker.directive.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/color-picker.module.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import { ModuleWithProviders } from '@angular/core';
export declare class ColorPickerModule {
static forRoot(): ModuleWithProviders;
}
2 changes: 1 addition & 1 deletion lib/color-picker.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/color-picker.module.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading