postcss: {
material: {
options: {
- map: {
- inline: false,
- },
-
processors: [
require('pixrem')(),
require('autoprefixer')({ browsers: 'last 2 versions' }),
},
baggy: {
options: {
- map: {
- inline: false,
- },
-
processors: [
require('pixrem')(),
require('autoprefixer')({ browsers: 'last 2 versions' }),
files: {
'<%= releaseDir %>/themes/material/js/material.min.js':
['<%= buildDir %>/material.browser.js'],
- },
- options: {
- sourceMap: true,
- },
+ }
},
baggy: {
files: {
'<%= releaseDir %>/themes/baggy/js/baggy.min.js':
['<%= buildDir %>/baggy.browser.js'],
- },
- options: {
- sourceMap: true,
- },
+ }
},
},
copy: {
src: 'annotator.min.js',
dest: '<%= buildDir %>/themes/_global/js/',
},
- },
- symlink: {
baggyfonts: {
files: [
{
expand: true,
- overwrite: true,
cwd: '<%= modulesDir %>/icomoon-free-npm/Font',
src: 'IcoMoon-Free.ttf',
dest: '<%= releaseDir %>/themes/baggy/fonts/',
},
{
expand: true,
- overwrite: true,
cwd: '<%= modulesDir %>/ptsans-npm-webfont/fonts',
src: 'ptsansbold.woff',
dest: '<%= releaseDir %>/themes/baggy/fonts/',
},
{
expand: true,
- overwrite: true,
cwd: '<%= modulesDir %>/material-design-icons-iconfont/dist/fonts/',
src: ['MaterialIcons-Regular.eot', 'MaterialIcons-Regular.woff2', 'MaterialIcons-Regular.woff', 'MaterialIcons-Regular.ttf'],
dest: '<%= releaseDir %>/themes/baggy/fonts/',
},
],
},
+ },
+ symlink: {
pics: {
files: [
{
src: ['./<%= releaseDir %>/*'],
}
},
+ eslint: {
+ target: ['<%= appDir %>/themes/material/js/init.js', '<%= appDir %>/themes/baggy/js/init.js']
+ },
+ stylelint: {
+ target: ['<%= appDir %>/themes/material/css/*.css', '<%= appDir %>/themes/baggy/css/*.css']
+ }
+
});
grunt.registerTask(
'fonts',
'Install fonts',
- ['symlink:baggyfonts', 'symlink:materialfonts']
+ ['copy:baggyfonts', 'copy:materialfonts']
);
grunt.registerTask(
grunt.registerTask(
'default',
'Build and install everything',
- ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'symlink']
+ ['clean', 'copy:pickerjs', 'concat', 'browserify', 'uglify', 'postcss', 'copy', 'symlink']
);
grunt.registerTask(
'Compiles the stylesheets.',
['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss']
);
+
+ grunt.registerTask(
+ 'tests',
+ 'Test css and js style conformity',
+ ['eslint', 'stylelint', 'default']
+ )
};