Hello Hagen, thanks for your purchase and kind words!
There are differences between the pre-built css and the result of the scss and less file processing – at least if I try to re-generate the css using sass and less processors without any additional knowledge of your development (like for example Gruntfile) settings.
Could you provide the required files (like project.json, Gruntfile, etc.)?
Here’s our “gruntfile.js”:
var path = require('path');
module.exports = function(grunt) {
// measures the time each task takes
require('time-grunt')(grunt);
// load grunt config
require('load-grunt-config')(grunt, {
configPath: path.join(process.cwd(), '_grunt'), //path to task.js files, defaults to grunt dir
jitGrunt: {
staticMappings: {
replace: 'grunt-text-replace',
removeemptylines: 'grunt-remove-empty-lines',
sass: 'node-sass'
}
}
});
};
* Note we use the “load-grunt-config” module for the tasks.
We use “grunt” + “node-sass” to compile .scss/sass files. Here’s our “sass” task:
module.exports = function(grunt, options) {
const sass = require('node-sass');
return {
tf: {
options: {
implementation: sass,
style: 'expanded',
lineNumbers: false,
quiet: true,
sourcemap: 'none'
},
files: [
{
expand: true,
cwd: 'theme/css/',
src: ['**/*.scss'],
dest: '../Versions/<%= package.version %>/TF/HTML/css/',
ext: '.css'
}
]
}
}
};
To compile .less we use “grunt” + “grunt-contrib-less”. Here’s our “less” task:
https://pastebin.com/raw/GxaDPNgb
I have the need to generate “.min.css” files for the things inside the “master” folder
If you are using grunt as task runner, you can use the sass/less module options to compile the CSS minified. For example on SASS you should change the option style:
..
.....
....
options: {
implementation: sass,
style: 'compressed',
lineNumbers: false,
quiet: true,
sourcemap: 'none'
},
..
...
....
* Note style: 'compressed'.
* This is using node-sass as module.
For .less you can do the same as above. Change the option style:
tf: {
options: {
paths: ["theme/master/less"],
style: 'compressed'
},
files: [
* Note style: 'compressed'.
* This is using grunt-contrib-less as module.
1) publish these files with the theme ZIP file or 2) link those files in the Change Log for each new release?
Thanks for the suggestion! I will discuss about that with our team.
We hope this helps!
Please try that and let us know if you need further assistance.
Kind Regards,
Rodrigo.
If you are satisfied with Porto HTML and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads