forked from opensourcepos/opensourcepos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix css minification (opensourcepos#329)
Fix suspended sales dialog (set class to modal-dlg)
- Loading branch information
Showing
12 changed files
with
7,910 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,152 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
wiredep: { | ||
task: { | ||
ignorePath: '../../../', | ||
src: ['**/header.php'] | ||
} | ||
}, | ||
bower_concat: { | ||
all: { | ||
dest: { | ||
'js': 'dist/opensourcepos_bower.js' | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
wiredep: { | ||
task: { | ||
ignorePath: '../../../', | ||
src: ['**/header.php'] | ||
} | ||
} | ||
}, | ||
concat: { | ||
js: { | ||
options: { | ||
separator: ';' | ||
}, | ||
bower_concat: { | ||
all: { | ||
mainFiles: { | ||
'bootswatch-dist': ['css/bootstrap.css', 'js/bootstrap.js'] | ||
}, | ||
dest: { | ||
'js': 'dist/opensourcepos_bower.js', | ||
'css': 'dist/opensourcepos_bower.css' | ||
} | ||
} | ||
}, | ||
cssmin: { | ||
target: { | ||
files: { | ||
'dist/<%= pkg.name %>.min.css': ['dist/opensourcepos_bower.css', 'css/*.css'] | ||
} | ||
} | ||
}, | ||
concat: { | ||
js: { | ||
options: { | ||
separator: ';' | ||
}, | ||
files: { | ||
'dist/<%= pkg.name %>.js': ['dist/opensourcepos_bower.js', 'js/jquery*', 'js/*.js'] | ||
} | ||
}, | ||
files: { | ||
'dist/<%= pkg.name %>.js': ['dist/opensourcepos_bower.js', 'js/jquery*', 'js/*.js'] | ||
sql: { | ||
options: { | ||
banner: '-- >> This file is autogenerated from tables.sql and constraints.sql. Do not modify directly << --' | ||
}, | ||
files: { | ||
'database/database.sql': ['database/tables.sql', 'database/constraints.sql'], | ||
'database/migrate_phppos_dist.sql': ['database/tables.sql', 'database/phppos_migrate.sql', 'database/constraints.sql'] | ||
} | ||
} | ||
}, | ||
sql: { | ||
uglify: { | ||
options: { | ||
banner: '-- >> This file is autogenerated from tables.sql and constraints.sql. Do not modify directly << --' | ||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' | ||
}, | ||
files: { | ||
'database/database.sql': ['database/tables.sql', 'database/constraints.sql'], | ||
'database/migrate_phppos_dist.sql': ['database/tables.sql', 'database/phppos_migrate.sql', 'database/constraints.sql'] | ||
dist: { | ||
files: { | ||
'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.js'] | ||
} | ||
} | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' | ||
}, | ||
dist: { | ||
files: { | ||
'dist/<%= pkg.name %>.min.js': ['dist/<%= pkg.name %>.js'] | ||
} | ||
} | ||
}, | ||
jshint: { | ||
files: ['Gruntfile.js', 'js/*.js'], | ||
options: { | ||
// options here to override JSHint defaults | ||
globals: { | ||
jQuery: true, | ||
console: true, | ||
module: true, | ||
document: true | ||
} | ||
} | ||
}, | ||
tags: { | ||
js : { | ||
jshint: { | ||
files: ['Gruntfile.js', 'js/*.js'], | ||
options: { | ||
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>', | ||
openTag: '<!-- start js template tags -->', | ||
closeTag: '<!-- end js template tags -->', | ||
absolutePath: true | ||
// options here to override JSHint defaults | ||
globals: { | ||
jQuery: true, | ||
console: true, | ||
module: true, | ||
document: true | ||
} | ||
} | ||
}, | ||
tags: { | ||
css : { | ||
options: { | ||
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>', | ||
openTag: '<!-- start css template tags -->', | ||
closeTag: '<!-- end css template tags -->', | ||
absolutePath: true | ||
}, | ||
src: [ 'css/*.css' ], | ||
dest: 'application/views/partial/header.php' | ||
}, | ||
mincss: { | ||
options: { | ||
scriptTemplate: '<rel type="text/css" src="{{ path }}"></rel>', | ||
openTag: '<!-- start mincss template tags -->', | ||
closeTag: '<!-- end mincss template tags -->', | ||
absolutePath: true | ||
}, | ||
src: [ 'dist/*min.css' ], | ||
dest: 'application/views/partial/header.php' | ||
}, | ||
js : { | ||
options: { | ||
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>', | ||
openTag: '<!-- start js template tags -->', | ||
closeTag: '<!-- end js template tags -->', | ||
absolutePath: true | ||
}, | ||
src: [ 'js/jquery*', 'js/*.js' ], | ||
dest: 'application/views/partial/header.php' | ||
}, | ||
src: [ 'js/jquery*', 'js/*.js' ], | ||
dest: 'application/views/partial/header.php' | ||
}, | ||
minjs : { | ||
options: { | ||
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>', | ||
openTag: '<!-- start minjs template tags -->', | ||
closeTag: '<!-- end minjs template tags -->', | ||
absolutePath: true | ||
}, | ||
src: [ | ||
'dist/*min.js' | ||
], | ||
dest: 'application/views/partial/header.php' | ||
} | ||
}, | ||
mochaWebdriver: { | ||
options: { | ||
timeout: 1000 * 60 * 3 | ||
minjs : { | ||
options: { | ||
scriptTemplate: '<script type="text/javascript" src="{{ path }}" language="javascript"></script>', | ||
openTag: '<!-- start minjs template tags -->', | ||
closeTag: '<!-- end minjs template tags -->', | ||
absolutePath: true | ||
}, | ||
src: [ | ||
'dist/*min.js' | ||
], | ||
dest: 'application/views/partial/header.php' | ||
} | ||
}, | ||
test : { | ||
options: { | ||
usePhantom: true, | ||
usePromises: true | ||
}, | ||
src: ['test/**/*.js'] | ||
} | ||
}, | ||
watch: { | ||
files: ['<%= jshint.files %>'], | ||
tasks: ['jshint'] | ||
}, | ||
cachebreaker: { | ||
dev: { | ||
mochaWebdriver: { | ||
options: { | ||
match: ['opensourcepos.min.js'], | ||
src: { | ||
path: 'dist/opensourcepos.min.js' | ||
}, | ||
replacement: 'md5' | ||
timeout: 1000 * 60 * 3 | ||
}, | ||
files: { | ||
src: ['**/header.php'] | ||
test : { | ||
options: { | ||
usePhantom: true, | ||
usePromises: true | ||
}, | ||
src: ['test/**/*.js'] | ||
} | ||
}, | ||
watch: { | ||
files: ['<%= jshint.files %>'], | ||
tasks: ['jshint'] | ||
}, | ||
cachebreaker: { | ||
dev: { | ||
options: { | ||
match: [ | ||
{ | ||
'opensourcepos.min.js': 'dist/opensourcepos.min.js', | ||
'opensourcepos.min.css': 'dist/opensourcepos.min.css' | ||
} | ||
], | ||
replacement: 'md5' | ||
}, | ||
files: { | ||
src: ['**/header.php'] | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
require('load-grunt-tasks')(grunt); | ||
require('load-grunt-tasks')(grunt); | ||
|
||
grunt.registerTask('default', ['wiredep', 'tags:js', 'bower_concat', 'concat', 'uglify', 'tags:minjs', 'cachebreaker']); | ||
grunt.registerTask('default', ['wiredep', 'bower_concat', 'concat', 'uglify', 'cssmin', 'tags', 'cachebreaker']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// Login page styling tuned for bootstrap | ||
|
||
* | ||
{ | ||
margin:0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.