Skip to content

Commit

Permalink
v1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Vach committed Feb 1, 2017
2 parents ed21edc + d99d793 commit 6d04a78
Show file tree
Hide file tree
Showing 274 changed files with 7,254 additions and 12,580 deletions.
118 changes: 38 additions & 80 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Banner
banner: 'Copyright: Z-Wave Europe GmbH, Created: <%= grunt.template.today("dd-mm-yyyy HH:MM:ss") %>',
// Clean dir
clean: {
options: {force: true},
Expand Down Expand Up @@ -69,12 +71,13 @@ module.exports = function (grunt) {
'vendor/bootstrap/bootstrap.min.js',
'vendor/bootstrap/plugins/bootstrap-datetimepicker.js',
// APP
'app/icons.js',
'app/app.js',
'app/routes.js',
'dist/app/js/templates.js',
'app/modules/qAllSettled.js',
'app/modules/httpLatency.js',
'app/config/settings.js',
'app/services/factories.js',
'app/factories/factories.js',
'app/services/services.js',
'app/directives/directives.js',
'app/directives/dir-pagination.js',
Expand Down Expand Up @@ -110,6 +113,16 @@ module.exports = function (grunt) {
dest: 'dist/app/js/build.js'
}
},
json_generator: {
target: {
dest: "app/info.json",
options: {
name: 'SmartHome UI',
built: '<%= grunt.template.today("dd-mm-yyyy HH:MM:ss") %>',
timestamp: '<%= Math.floor(Date.now() / 1000) %>'
}
}
},
// Copy
copy: {
main: {
Expand All @@ -119,12 +132,13 @@ module.exports = function (grunt) {
'!app/views/_test/**',
'app/img/**',
'app/img/**',
'app/views/**',
//'app/views/**',
'app/lang/**'
], dest: 'dist/'
},
//{expand:true,src: ['../zwave-api/storage/data/z_en.json'], dest: 'storage/data/',flatten: true},
{expand: true, src: ['app/config.js'], dest: 'dist/app/js/', flatten: true},
{expand: true, src: ['app/icons.js'], dest: 'dist/app/js/', flatten: true},
{expand: true, src: ['app/css/screenshot.png'], dest: 'dist/app/css/', flatten: true},
{src: ['storage/img/**'], dest: 'dist/'},
{src: ['storage/demo/**'], dest: 'dist/'},
Expand All @@ -136,6 +150,11 @@ module.exports = function (grunt) {
{src: ['app/css/main.css'], dest: 'app/css/main.css.orig'}
]
},
info: {
files: [
{src: ['app/info.json'], dest: 'dist/app/info.json'}
]
},
images: {
files: [
{src: ['app/css/wallpaper.png'], dest: 'dist/app/css/wallpaper.png'}
Expand All @@ -159,7 +178,7 @@ module.exports = function (grunt) {
cssmin: {
my_target: {
options: {
banner: '/* Minified css file */',
banner: '/* <%= banner %> */',
keepSpecialComments: 0
},
files: [
Expand All @@ -173,94 +192,32 @@ module.exports = function (grunt) {
]
}
},
jsdox: {
generate: {
usebanner: {
jscss: {
options: {
contentsEnabled: true,
contentsTitle: 'SmartHome UI Documentation',
contentsFile: 'readme.md',
//pathFilter: /^example/,
templateDir: 'docstemplates'
},
src: ['app/**/*.js'],
//src: ['app/controllers/*.js','app/services/*.js','app/directives/*.js','app/modules/*.js','app/jquery/*.js','app/filters/*.js'],
dest: 'docs'
}
},
remove: {
options: {
trace: true
},
//fileList: ['path_to_file_1.extension', 'path_to_file_2.extension'],
dirList: [
'dist/app/views/_test/',
'dist/storage/data/_test/'
]
},
// HTML min
htmlmin: {
dist: {
options: {
removeComments: true,
collapseWhitespace: true
position: 'top',
banner: '/* <%= banner %> */'
},
files: {
'dist/abc.html': 'index.html'
src: [ 'dist/app/js/templates.js','dist/app/js/config.js','dist/app/js/build.js','dist/app/js/icons.js']
}
},
multiple: {
files: [{
expand: true,
cwd: 'app/views',
src: '**/*.html',
dest: 'dist/views'
}]
}
},
sass: {
dist: {
html: {
options: {
style: 'expanded'
position: 'top',
banner: '<!-- <%= banner %> -->'
},
files: {
'app/css/bootstrap.css': 'app/css/sass/bootstrap.scss',
'app/css/main.css': 'app/css/sass/main.scss'
}
}
},
watch: {
files: "app/css/sass/**",
tasks: ["sass"]
},
// Uglify
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
compress: true
},
build: {
src: ['app/js/*'],
dest: 'dist/app/js/build.min.js'
}
},
'string-replace': {
dist: {
files: {
'dist/app/js/config.js': 'app/config.js',
},
options: {
replacements: [{
pattern: /'server_url': (.*?) /ig,
replacement: '\'server_url\': \'/\''
}]
src: [ 'dist/index.html']
}
}
}

});
grunt.registerTask('skinFolder', 'Creates an empty file', function () {
grunt.registerTask('skinFolder', 'Creates an empty .keep file in skins dir', function () {
grunt.file.write('dist/user/skins/.keep', '');
});
grunt.registerTask('iconFolder', 'Creates an empty file', function () {
grunt.registerTask('iconFolder', 'Creates an empty .keep file in icons dir', function () {
grunt.file.write('dist/user/icons/.keep', '');
});

Expand All @@ -277,9 +234,10 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-remove');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-jsdox');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-json-generator');

// Default task(s).
grunt.registerTask('default', ['clean', 'ngtemplates', 'concat', 'copy', 'cssmin', 'jsdox', 'skinFolder','iconFolder']);
grunt.registerTask('default', ['clean', 'ngtemplates', 'concat','json_generator', 'copy', 'cssmin', 'skinFolder','iconFolder','usebanner']);

};
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@ This User Interfaces allows to operate a Smart Home Network based on Z-Wave devi
## Project leader
Marcel Kermer

## v1.6.0
#### New features
- Cloud Backup: Gives possibility to upload and store your backups on the remote server.
- Custom icons: Possibility to upload and assign custom icons for devices.
- Skins: A Skin is a CSS style that allow to change the appearance of the SmartHome UI.
- New widget type sensorDiscrete: N-State visualisation of CentralScene commands.
- Apps/Active: Sorting by active/inactive apps.

#### Changes
- Connection error refactored.
- Caching online modules.

## v1.5.1
#### Fixes
- Displays Firmware Update int POPP version.
- Displays Firmware Update in POPP version.

## v1.5.0
#### New features
- Apps: Added button Add more apps if filter feature apps is preselected.git
- Time zone on the first access page and in the management (POPP only).
- More products in the Z-Wave devices.
- Add update time to toggle button #167.
Expand Down
Loading

0 comments on commit 6d04a78

Please sign in to comment.