Skip to content

Commit

Permalink
Minify CSS, create Release
Browse files Browse the repository at this point in the history
  • Loading branch information
elesdoar committed Sep 26, 2013
1 parent 17c5cb4 commit d456755
Show file tree
Hide file tree
Showing 11 changed files with 478 additions and 6 deletions.
28 changes: 25 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,31 @@ module.exports = function(grunt) {
},
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['src/leaflet.orderlayers.js']
'dist/<%= pkg.name %>.min.js': ['src/leaflet.control.orderlayers.js'],
}
}
},

cssmin: {
add_banner: {
options: {
banner:'/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
files: {
'dist/css/<%= pkg.name %>.min.css':['src/css/*.css']
}
}
},

copy: {
main: {
expand: true,
cwd: 'src/',
src: '**',
dest: 'dist/',
},
},

jshint: {
options: {
jquery: true,
Expand All @@ -36,7 +56,7 @@ module.exports = function(grunt) {
}
},
source: {
src: ['src/leaflet.orderlayers.js']
src: ['src/leaflet.control.orderlayers.js']
},
tests: {
src: ['test/unit/*.js', 'test/e2e/*.js'],
Expand Down Expand Up @@ -88,13 +108,15 @@ module.exports = function(grunt) {

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');

grunt.registerTask('test:e2e', ['connect:testserver', 'karma:e2e']);
grunt.registerTask('test', ['karma:unit', 'test:e2e']);
grunt.registerTask('release', ['copy', 'uglify', 'cssmin']);
grunt.registerTask('server', ['connect:server']);
grunt.registerTask('default', ['karma:background', 'watch']);

};
50 changes: 50 additions & 0 deletions dist/css/leaflet.control.orderlayers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.leaflet-control-layers {
width: 150px;
padding: 10px !important;
}

.leaflet-control-layers-separator {
float: left;
width: 100%;
}

.leaflet-control-layers .leaflet-control-layers-title {
font-size: 1.2em;
}

.leaflet-control-layers .leaflet-row {
float: left;
width: 100%;
}

.leaflet-control-layers .leaflet-row .leaflet-input {
float: left;
width: 15%;
}

.leaflet-control-layers .leaflet-row .leaflet-name {
float: left;
width: 60%;
}

.leaflet-control-layers .leaflet-row .leaflet-up {
float: left;
background-image: url(../images/arrow-up.png);
background-repeat: no-repeat;
background-position: center;
height: 20px;
width: 16px;
opacity: 0.75;
cursor: pointer;
}

.leaflet-control-layers .leaflet-row .leaflet-down {
float: left;
background-image: url(../images/arrow-down.png);
background-repeat: no-repeat;
background-position: center;
height: 20px;
width: 16px;
opacity: 0.75;
cursor: pointer;
}
3 changes: 3 additions & 0 deletions dist/css/leaflet.control.orderlayers.min.css

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

Binary file added dist/images/arrow-down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/images/arrow-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"homepage": "http://elesdoar.github.io/leaflet-control-orderlayers/",
"repository": {
"type": "git",
"type": "git",
"url": "https://github.com/elesdoar/leaflet-control-orderlayers"
},
"keywords": [
Expand All @@ -20,13 +20,14 @@
"grunt": "latest",
"grunt-contrib-uglify": "latest",
"grunt-contrib-jshint": "latest",
"grunt-contrib-copy": "latest",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-watch": "latest",
"grunt-contrib-concat": "latest",
"grunt-contrib-connect": "latest",
"grunt-karma": "latest",
"jasmine-node": "latest",
"karma": "latest",
"karma-ng-scenario": "latest"
"karma-ng-scenario": "latest",
"grunt-contrib-cssmin": "~0.6.2"
}
}
50 changes: 50 additions & 0 deletions src/css/leaflet.control.orderlayers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.leaflet-control-layers {
width: 150px;
padding: 10px !important;
}

.leaflet-control-layers-separator {
float: left;
width: 100%;
}

.leaflet-control-layers .leaflet-control-layers-title {
font-size: 1.2em;
}

.leaflet-control-layers .leaflet-row {
float: left;
width: 100%;
}

.leaflet-control-layers .leaflet-row .leaflet-input {
float: left;
width: 15%;
}

.leaflet-control-layers .leaflet-row .leaflet-name {
float: left;
width: 60%;
}

.leaflet-control-layers .leaflet-row .leaflet-up {
float: left;
background-image: url(../images/arrow-up.png);
background-repeat: no-repeat;
background-position: center;
height: 20px;
width: 16px;
opacity: 0.75;
cursor: pointer;
}

.leaflet-control-layers .leaflet-row .leaflet-down {
float: left;
background-image: url(../images/arrow-down.png);
background-repeat: no-repeat;
background-position: center;
height: 20px;
width: 16px;
opacity: 0.75;
cursor: pointer;
}
Binary file added src/images/arrow-down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/arrow-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d456755

Please sign in to comment.