Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpatpat committed Apr 28, 2017
2 parents 28cfe5d + 516dba8 commit 5457491
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 64 deletions.
136 changes: 75 additions & 61 deletions visualization/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,35 @@ module.exports = function (grunt) {
},

browserify: {
dist: {
options: {
transform: ["babelify", "es6-arrow-function"],
presets: ["es2015"],
browserifyOptions: {
debug:true
}
},
files: {
"dist/app/libs/bundle.js": "app/app.js"
dist: {
options: {
transform: ["babelify", "es6-arrow-function"],
presets: ["es2015"],
browserifyOptions: {
debug:true
}
},
files: {
"dist/app/libs/bundle.js": "app/app.js"
}
}
}
},

htmlmin: {
dist: {
options: {
removeComments: true,
collapseWhitespace: true
},
files: [{
"expand": true,
"cwd": "app/",
"src": ["**/*.html"],
"dest": "dist/app/",
"ext": ".html",
"flatten": true
}]
}
dist: {
options: {
removeComments: true,
collapseWhitespace: true
},
files: [{
"expand": true,
"cwd": "app/",
"src": ["**/*.html"],
"dest": "dist/app/",
"ext": ".html",
"flatten": true
}]
}
},

jshint: {
Expand Down Expand Up @@ -105,40 +105,40 @@ module.exports = function (grunt) {
{expand: false, src: ["LICENSE.md"], dest: "dist/app/LICENSE.md"}
]
},
jquery: {
files: [
{expand: false, src: ["node_modules/jquery/dist/jquery.min.js"], dest: "dist/app/libs/jquery.min.js"}
]
},
angular: {
files: [
{expand: false, src: ["node_modules/angular/angular.min.js"], dest: "dist/app/libs/angular.min.js"}
]
},
hammer: {
files: [
{expand: false, src: ["node_modules/hammerjs/hammer.min.js"], dest: "dist/app/libs/hammer.min.js"}
]
},
materialize: {
files: [
{expand: false, src: ["node_modules/materialize-css/dist/js/materialize.min.js"], dest: "dist/app/libs/materialize.min.js"},
{expand: false, src: ["node_modules/materialize-css/dist/css/materialize.min.css"], dest: "dist/app/css/materialize.min.css"},
{expand: false, src: ["node_modules/materialize-css/extras/noUiSlider/nouislider.css"], dest: "dist/app/css/nouislider.css"},
{expand: true, src: ["node_modules/materialize-css/dist/fonts/roboto/*"], dest: "dist/app/fonts/roboto/", flatten: true}
]
},
fontawesome: {
files: [
{expand: false, src: ["node_modules/font-awesome/css/font-awesome.min.css"], dest: "dist/app/css/font-awesome.min.css"},
{expand: true, src: ["node_modules/font-awesome/fonts/*"], dest: "dist/app/fonts/", flatten: true}
]
},
jquery: {
files: [
{expand: false, src: ["node_modules/jquery/dist/jquery.min.js"], dest: "dist/app/libs/jquery.min.js"}
]
},
angular: {
files: [
{expand: false, src: ["node_modules/angular/angular.min.js"], dest: "dist/app/libs/angular.min.js"}
]
},
hammer: {
files: [
{expand: false, src: ["node_modules/hammerjs/hammer.min.js"], dest: "dist/app/libs/hammer.min.js"}
]
},
materialize: {
files: [
{expand: false, src: ["node_modules/materialize-css/dist/js/materialize.min.js"], dest: "dist/app/libs/materialize.min.js"},
{expand: false, src: ["node_modules/materialize-css/dist/css/materialize.min.css"], dest: "dist/app/css/materialize.min.css"},
{expand: false, src: ["node_modules/materialize-css/extras/noUiSlider/nouislider.css"], dest: "dist/app/css/nouislider.css"},
{expand: true, src: ["node_modules/materialize-css/dist/fonts/roboto/*"], dest: "dist/app/fonts/roboto/", flatten: true}
]
},
fontawesome: {
files: [
{expand: false, src: ["node_modules/font-awesome/css/font-awesome.min.css"], dest: "dist/app/css/font-awesome.min.css"},
{expand: true, src: ["node_modules/font-awesome/fonts/*"], dest: "dist/app/fonts/", flatten: true}
]
},
images: {
files: [
{"expand": true, "cwd": "app/img/", "src": ["*"], "dest": "dist/app/img", "flatten": true}
]
},
files: [
{"expand": true, "cwd": "app/img/", "src": ["*"], "dest": "dist/app/img", "flatten": true}
]
},
json: {
files: [
{"expand": true, "cwd": "app/", "src": ["**/*.json"], "dest": "dist/app/", "flatten": true}
Expand Down Expand Up @@ -193,7 +193,21 @@ module.exports = function (grunt) {
},
}
},

'string-replace': {
inline: {
files: {
"dist/app/codeCharta.html": ["dist/app/codeCharta.html"]
},
options: {
replacements: [
{
pattern: '!!Version!!',
replacement: grunt.file.readJSON('package.json').version
}
]
}
}
},
compress: {
linux32: {
options: {
Expand Down Expand Up @@ -234,11 +248,11 @@ module.exports = function (grunt) {
// tasks
grunt.registerTask("default", ["build"]);

grunt.registerTask("build", ["clean:app", "jshint", "browserify", "ngAnnotate:app", "htmlmin", "copy:style", "concat:css", "clean:style", "copy:materialize", "copy:json", "copy:hammer", "copy:fontawesome", "copy:angular", "copy:images", "copy:jquery", "copy:license"]);
grunt.registerTask("build", ["clean:app", "jshint", "browserify", "ngAnnotate:app", "htmlmin", "copy:style", "concat:css", "clean:style", "copy:materialize", "copy:json", "copy:hammer", "copy:fontawesome", "copy:angular", "copy:images", "copy:jquery", "copy:license", "string-replace"]);
grunt.registerTask("test", ["clean:coverage", "mocha_istanbul"]);
grunt.registerTask("doc", ["clean:doc", "exec:doc"]);
grunt.registerTask("package", ["clean:package", "nwjs", "compress"]);
grunt.registerTask("quick", ["jshint", "browserify", "ngAnnotate:app", "htmlmin", "copy:style", "concat:css","copy:json", "clean:style", "copy:images"]);
grunt.registerTask("quick", ["jshint", "browserify", "ngAnnotate:app", "htmlmin", "copy:style", "concat:css","copy:json", "clean:style", "copy:images", "string-replace"]);


};
2 changes: 1 addition & 1 deletion visualization/app/codeCharta/codeCharta.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<header id="title">
<a href="https://www.maibornwolff.de" target="_blank"><img src="img/logo.png" alt="MaibornWolff"></a>
<h1><span>CodeCharta</span></h1>
<h1><span>CodeCharta !!Version!!</span></h1>
</header>

<code-map-directive></code-map-directive>
Expand Down
5 changes: 3 additions & 2 deletions visualization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"exorcist": "^0.4.0",
"file-api": "^0.10.4",
"font-awesome": "^4.7.0",
"grunt": "~1.0.1",
"grunt": "^1.0.1",
"grunt-browserify": "5.0.0",
"grunt-cli": "1.2.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "1.0.0",
"grunt-contrib-compress": "^1.4.1",
"grunt-contrib-concat": "1.0.1",
Expand All @@ -64,6 +64,7 @@
"grunt-ng-annotate": "^3.0.0",
"grunt-ngdocs-tmp": "^0.0.1",
"grunt-nw-builder": "^3.1.0",
"grunt-string-replace": "^1.3.1",
"hammerjs": "^2.0.8",
"istanbul": "^1.1.0-alpha.1",
"jquery": "^3.1.1",
Expand Down

0 comments on commit 5457491

Please sign in to comment.