Commit 8956b7e2 authored by Valentin Hervieu's avatar Valentin Hervieu

Refactor build process

parent 087948b4
module.exports = function (grunt) {
module.exports = function(grunt) {
var banner = '/*! <%= pkg.name %> - v<%= pkg.version %> - \n' +
' (c) <%= pkg.author %> - \n'+
' <%= pkg.repository.url %> - \n' +
' <%= grunt.template.today("yyyy-mm-dd") %> */\n',
minBanner = banner.replace(/\n/g, '') + '\n';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
minBanner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'(c) <%= pkg.author %>, <%= pkg.repository.url %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */\n',
minBanner: minBanner,
recess: {
options: {
......@@ -58,10 +62,10 @@ module.exports = function (grunt) {
removeStyleLinkTypeAttributes: true
},
module: 'rzModule',
url: function (url) {
url: function(url) {
return url.replace('src/', '');
},
bootstrap: function (module, script) {
bootstrap: function(module, script) {
return 'module.run(function($templateCache) {\n' + script + '\n});';
}
}
......@@ -85,6 +89,21 @@ module.exports = function (grunt) {
}
},
concat: {
options: {
stripBanners: true,
banner: banner
},
js: {
src: ['dist/rzslider.js'],
dest: 'dist/rzslider.js',
},
css: {
src: ['dist/rzslider.css'],
dest: 'dist/rzslider.css',
},
},
ngAnnotate: {
options: {
singleQuotes: true,
......@@ -131,6 +150,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-replace');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-ng-annotate');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-serve');
......@@ -140,5 +160,5 @@ module.exports = function (grunt) {
grunt.registerTask('test', ['karma']);
grunt.registerTask('css', ['recess']);
grunt.registerTask('js', ['ngtemplates', 'replace', 'ngAnnotate', 'uglify']);
grunt.registerTask('js', ['ngtemplates', 'replace','concat', 'ngAnnotate', 'uglify']);
};
/**
* Angular JS slider directive
*
* (c) Rafal Zajac <rzajac@gmail.com>
* http://github.com/rzajac/angularjs-slider
*
* Licensed under the MIT license
*/
/* Slider colors */
/* Slider size parameters */
/*! angularjs-slider - v2.2.0 -
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
https://github.com/rzajac/angularjs-slider.git -
2015-12-20 */
rzslider {
position: relative;
display: inline-block;
......
/**
* Angular JS slider directive
*
* (c) Rafal Zajac <rzajac@gmail.com>
* http://github.com/rzajac/angularjs-slider
*
* Version: v2.2.0
*
* Licensed under the MIT license
*/
/*! angularjs-slider - v2.2.0 -
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
https://github.com/rzajac/angularjs-slider.git -
2015-12-20 */
/*jslint unparam: true */
/*global angular: false, console: false, define, module */
(function(root, factory) {
......
/*! angularjs-slider - v2.2.0 - (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-12-18 */
/*! angularjs-slider - v2.2.0 - (c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-12-20 */
rzslider{position:relative;display:inline-block;width:100%;height:4px;margin:35px 0 15px 0;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}rzslider[disabled]{cursor:not-allowed}rzslider[disabled] .rz-pointer{cursor:not-allowed;background-color:#d8e0f3}rzslider span{position:absolute;display:inline-block;white-space:nowrap}rzslider .rz-base{width:100%;height:100%;padding:0}rzslider .rz-bar-wrapper{left:0;z-index:1;width:100%;height:32px;padding-top:16px;margin-top:-16px;box-sizing:border-box}rzslider .rz-bar-wrapper.rz-draggable{cursor:move}rzslider .rz-bar{left:0;z-index:1;width:100%;height:4px;background:#d8e0f3;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}rzslider .rz-bar.rz-selection{z-index:2;background:#0db9f0;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}rzslider .rz-pointer{top:-14px;z-index:3;width:32px;height:32px;cursor:pointer;background-color:#0db9f0;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}rzslider .rz-pointer:after{position:absolute;top:12px;left:12px;width:8px;height:8px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;content:''}rzslider .rz-pointer:hover:after{background-color:#fff}rzslider .rz-pointer.rz-active:after{background-color:#451aff}rzslider .rz-bubble{bottom:16px;padding:1px 3px;color:#55637d;cursor:default}rzslider .rz-bubble.rz-selection{top:16px}rzslider .rz-bubble.rz-limit{color:#55637d}rzslider .rz-ticks{position:absolute;top:-3px;left:0;z-index:1;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;padding:0 11px;margin:0;list-style:none;box-sizing:border-box;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}rzslider .rz-ticks .tick{width:10px;height:10px;text-align:center;cursor:pointer;background:#d8e0f3;border-radius:50%}rzslider .rz-ticks .tick.selected{background:#0db9f0}rzslider .rz-ticks .tick .tick-value{position:absolute;top:-30px;transform:translate(-50%,0)}rzslider.vertical{position:relative;width:4px;height:100%;padding:0;margin:0 20px;vertical-align:baseline}rzslider.vertical .rz-base{width:100%;height:100%;padding:0}rzslider.vertical .rz-bar-wrapper{top:auto;left:0;width:32px;height:100%;padding:0 0 0 16px;margin:0 0 0 -16px}rzslider.vertical .rz-bar{bottom:0;left:auto;width:4px;height:100%}rzslider.vertical .rz-pointer{top:auto;bottom:0;left:-14px!important}rzslider.vertical .rz-bubble{bottom:0;left:16px!important;margin-left:3px}rzslider.vertical .rz-bubble.rz-selection{top:auto;left:16px!important}rzslider.vertical .rz-ticks{top:0;left:-3px;z-index:1;width:auto;height:100%;padding:11px 0;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}rzslider.vertical .rz-ticks .tick{vertical-align:middle}rzslider.vertical .rz-ticks .tick .tick-value{top:auto;right:-30px;transform:translate(0,-28%)}
\ No newline at end of file
This diff is collapsed.
......@@ -18,6 +18,7 @@
"chai-things": "^0.2.0",
"grunt": "~0.4.2",
"grunt-angular-templates": "^0.5.7",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-mincss": "~0.3.2",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-watch": "^0.6.1",
......
......@@ -4,11 +4,8 @@
* (c) Rafal Zajac <rzajac@gmail.com>
* http://github.com/rzajac/angularjs-slider
*
* Version: v2.2.0
*
* Licensed under the MIT license
*/
/*jslint unparam: true */
/*global angular: false, console: false, define, module */
(function(root, factory) {
......
......@@ -4,7 +4,6 @@
border-radius: @radius;
}
/* Slider colors */
@handleActiveColor: #451aff;
@handleHoverColor: #fff;
@labelTextColor: #55637d;
......@@ -21,7 +20,6 @@
@ticksHeight: 10px;
@ticksValuePosition: -30px;
/* Slider size parameters */
@handleSize: 32px;
@handlePointerSize: 8px;
@bubblePadding: 1px 3px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment