Skip to content

Commit

Permalink
Using demo.css rather than demo.less.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoluteur committed Dec 13, 2024
1 parent 01922c9 commit 555c748
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 163 deletions.
169 changes: 82 additions & 87 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,99 +10,94 @@
*/

module.exports = function (grunt) {
grunt.initConfig({

// *************************************************************************************
// CONFIG OPTIONS
// *************************************************************************************
grunt.initConfig({
// *************************************************************************************
// CONFIG OPTIONS
// *************************************************************************************

pkg: grunt.file.readJSON('package.json'),
pkg: grunt.file.readJSON("package.json"),

banner : '/*\n <%= pkg.name %> <%= pkg.version %>\n <%= pkg.copyright %>\n <%= pkg.homepage %>\n*/\n',
banner:
"/*\n <%= pkg.name %> <%= pkg.version %>\n <%= pkg.copyright %>\n <%= pkg.homepage %>\n*/\n",

// *************************************************************************************
// JSHINT options
// *************************************************************************************
jshint: {
all: [
'Gruntfile.js',
'package.json',
'js/evol-colorpicker.js'
]
},
// *************************************************************************************
// JSHINT options
// *************************************************************************************
jshint: {
all: ["Gruntfile.js", "package.json", "js/evol-colorpicker.js"],
},

// *************************************************************************************
// UGLIFY options
// *************************************************************************************
uglify: {
options: {
banner: '<%= banner %>',
mangle: true
},
js: {
files: {
'js/evol-colorpicker.min.js': ['js/evol-colorpicker.js']
}
}
// *************************************************************************************
// UGLIFY options
// *************************************************************************************
uglify: {
options: {
banner: "<%= banner %>",
mangle: true,
},
js: {
files: {
"js/evol-colorpicker.min.js": ["js/evol-colorpicker.js"],
},
},
},

// *************************************************************************************
// LESS
// *************************************************************************************
less: {
dev: {
options: {
banner: '<%= banner %>'
},
files: {
"css/evol-colorpicker.css": "less/evol-colorpicker.less",
"css/demo.css": "less/demo.less"
}
},
prod: {
options: {
banner: '<%= banner %>',
compress: true
},
files: {
"css/evol-colorpicker.min.css": "less/evol-colorpicker.less"
}
}
}

});

// Load the plugin that provides the tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');

// Custom tasks

grunt.registerTask('header', 'evol-colorpicker version', function(arg1) {
var pkg=grunt.file.readJSON('package.json');
console.log(
(new Date()).toString() + '\n' +
' _ _ _\n'+
' ___ ___ | | ___ _ __ _ __ (_) ___| | _____ _ __\n'+
' / __/ _ \\| |/ _ \\| \'__| \'_ \\| |/ __| |/ / _ \\ \'__|\n'+
' | (_| (_) | | (_) | | | |_) | | (__| < __/ |\n'+
' \\___\\___/|_|\\___/|_| | .__/|_|\\___|_|\\_\\___|_| \n'+
' |_| '+
arg1 + ' '+ pkg.version
);
});
// *************************************************************************************
// BUILD TASKS : dev prod
// LESS
// *************************************************************************************
// Default task(s).
grunt.registerTask('default', ['prod']);

// Dev only task(s).
grunt.registerTask('dev', ['header:dev', 'jshint', 'less:dev']);

// Prod task(s).
grunt.registerTask('prod', ['header:prod', 'jshint', 'uglify', 'less']);

less: {
dev: {
options: {
banner: "<%= banner %>",
},
files: {
"css/evol-colorpicker.css": "less/evol-colorpicker.less",
},
},
prod: {
options: {
banner: "<%= banner %>",
compress: true,
},
files: {
"css/evol-colorpicker.min.css": "less/evol-colorpicker.less",
},
},
},
});

// Load the plugin that provides the tasks.
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-less");

// Custom tasks

grunt.registerTask("header", "evol-colorpicker version", function (arg1) {
var pkg = grunt.file.readJSON("package.json");
console.log(
new Date().toString() +
"\n" +
" _ _ _\n" +
" ___ ___ | | ___ _ __ _ __ (_) ___| | _____ _ __\n" +
" / __/ _ \\| |/ _ \\| '__| '_ \\| |/ __| |/ / _ \\ '__|\n" +
" | (_| (_) | | (_) | | | |_) | | (__| < __/ |\n" +
" \\___\\___/|_|\\___/|_| | .__/|_|\\___|_|\\_\\___|_| \n" +
" |_| " +
arg1 +
" " +
pkg.version
);
});
// *************************************************************************************
// BUILD TASKS : dev prod
// *************************************************************************************
// Default task(s).
grunt.registerTask("default", ["prod"]);

// Dev only task(s).
grunt.registerTask("dev", ["header:dev", "jshint", "less:dev"]);

// Prod task(s).
grunt.registerTask("prod", ["header:prod", "jshint", "uglify", "less"]);
};

76 changes: 0 additions & 76 deletions less/demo.less

This file was deleted.

0 comments on commit 555c748

Please sign in to comment.