Skip to content

Commit

Permalink
Merge pull request #19 from eballo/develop
Browse files Browse the repository at this point in the history
Release 7.3
  • Loading branch information
eballo authored Sep 1, 2017
2 parents 169e3f8 + b0998bf commit 2fcfd1d
Show file tree
Hide file tree
Showing 50 changed files with 22,501 additions and 1,051 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.DS_Store
.qicon
.project
.settings/
.settings/
node_modules/
dist/
.sonarlint/
139 changes: 139 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
config: {
work: {
options: {
variables: {
'environment': 'work',
'configuration': 'catalunya-map-options-v2.js',
'style': 'src/css/catalunya-map-v2.css'
}
}
},
prod: {
options: {
variables: {
'environment': 'production',
'configuration': 'catalunya-map-options-v1.js',
'style': 'src/css/catalunya-map-v1.css'
}
}
},
map: {
options: {
variables: {
'environment': 'map',
'configuration': 'catalunya-map-options-v1.js',
'style': 'src/css/catalunya-map-v1.css'
}
}
},
demo: {
options: {
variables: {
'environment': 'demo',
'configuration': 'catalunya-map-options-v2.js',
'style': 'src/css/catalunya-map-v2.css'
}
}
}
},
"jsbeautifier": {
files: ["src/js/*.js"],
options: {}
},
uglify: {
options: {
// the banner is inserted at the top of the output
banner: '/*! Generated <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
my_target: {
files: {
'assets/js/catalunya-map/catalunya-map.min.js': ['src/js/catalunya-map.js'],
'assets/js/catalunya-map/scale.raphael.min.js': ['src/js/scale.raphael.js'],
'assets/js/catalunya-map/jquery-3.2.1.min.js': ['src/js/jquery-3.2.1.js'],
'assets/js/catalunya-map/catalunya-map-init.min.js': ['src/js/catalunya-map-init.js'],
'assets/js/catalunya-map/bootstrap.min.js': ['src/js/bootstrap.js'],
}
}
},
copy: {
options: {
punctuation: ''
},
main: {
files: [{
src: ['src/js/<%= grunt.config.get("configuration") %>'],
dest: 'assets/js/catalunya-map/catalunya-map-options.js'
},
{
src:['src/css/bootstrap.min.css'],
dest: 'assets/css/catalunya-map/bootstrap.min.css'
},
{
src:['src/css/main.css'],
dest:'assets/css/catalunya-map/main.min.css'
},
{
src: ['src/css/bootstrap-theme.min.css'],
dest:'assets/css/catalunya-map/bootstrap-theme.min.css'
},
{
src: ['src/js/catalunya-map-path.json'],
dest:'assets/js/catalunya-map/catalunya-map-path.json'
},
{
src: ['src/js/raphael.min.js'],
dest:'assets/js/catalunya-map/raphael.min.js'
}

],
},
},
clean: ['assets/js/', 'assets/css/'],
cssmin: {
target: {
files: [{
dest: 'assets/css/catalunya-map/catalunya-map.min.css',
src: ['<%= grunt.config.get("style") %>']
}]
}
},
// make a zipfile
compress: {
main: {
options: {
archive: 'dist/map-<%= grunt.config.get("environment") %>.zip'
},
files: [
{expand: true, cwd: 'assets/', src: ['**'], dest: 'map/assets'} // makes all src relative to cwd
]
}
}
});

// Load required modules
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-config');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-compress');

// Task definitions
grunt.registerTask('map', ['config:map', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('demo', ['config:demo', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('work', ['config:work', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);
grunt.registerTask('prod', ['config:prod', 'clean', 'jsbeautifier', 'uglify', 'copy', 'cssmin']);

grunt.registerTask('demo-compress',['demo','compress']);
grunt.registerTask('work-compress',['work','compress']);
grunt.registerTask('prod-compress',['prod','compress']);

grunt.registerTask('release', ['demo-compress','work-compress','prod-compress','default']);

grunt.registerTask('default', ['map']);
};
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Interactive vectorial map of Catalunya based on a SVG/VML and the library Rapha
- [Demo v7.0](http://demo.catalunyamedieval.es/map7)
- [Demo v7.1](http://demo.catalunyamedieval.es/map71)
- [Demo v7.2](http://demo.catalunyamedieval.es/map71)
- [Demo v7.3](http://demo.catalunyamedieval.es/map71)

## How to create a Map using a SVG file

Expand Down Expand Up @@ -88,7 +89,7 @@ Explanation :

<div id="container row">

<div class="mapWrapper">
<div class="map-wrapper">
<div id="text" class="col-md-4">
<div id="comarcaName">
<h1>Catalunya Medieval</h1></div>
Expand Down Expand Up @@ -179,6 +180,11 @@ v7.1
v7.2
- Fix styles

v7.3
- Grunt
- nodejs
- refactor
- sonar fixes

## Webs using this map:
- [blog cimasdestacables](http://cimasdestacables.blogspot.com/p/mapa-comarcal-de-catalunya.html)
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions assets/css/catalunya-map/catalunya-map.min.css

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

37 changes: 37 additions & 0 deletions assets/css/catalunya-map/main.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* ------ genaral css file --------*/

body {
background: #fff;
font-family: Helvetica, Arial, sans-serif;
text-align: center;
}
h1 {
font-size: 25px;
padding: 30px 0 10px;
}
p {
padding-bottom: 30px;
}

a {
color: #66bbdd;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}

#container {
margin:20px auto;

}

.description {
margin-left: auto;
margin-right: auto;
width: 99%;
}

.description strong {
padding: 10px;
}
Binary file added assets/images/CM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/js/catalunya-map/bootstrap.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/js/catalunya-map/catalunya-map-init.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*! Generated 01-09-2017 */

!function(a,n){$.ajax({url:n.URL_JSON,dataType:"json",async:!0,success:function(a){n.create(n.MAP_OPTIONS,a).loadMapAndText()}})}(window,window.Catmap);
Loading

0 comments on commit 2fcfd1d

Please sign in to comment.