Files
home/Projects/pivoine.art/assets/bower_components/html5shiv/Gruntfile.js

62 lines
1.2 KiB
JavaScript
Raw Normal View History

2025-10-08 10:35:48 +02:00
/*global module:false*/
2025-10-10 16:43:21 +02:00
module.exports = function (grunt) {
2025-10-08 10:35:48 +02:00
// Project configuration.
grunt.initConfig({
2025-10-10 16:43:21 +02:00
pkg: grunt.file.readJSON("package.json"),
bower: grunt.file.readJSON("bower.json"),
2025-10-08 10:35:48 +02:00
copy: {
demo: {
files: [
2025-10-10 16:43:21 +02:00
{
expand: true,
src: ["src/*"],
dest: "dist/",
filter: "isFile",
flatten: true,
},
],
},
2025-10-08 10:35:48 +02:00
},
uglify: {
options: {
beautify: {
2025-10-10 16:43:21 +02:00
ascii_only: true,
2025-10-08 10:35:48 +02:00
},
2025-10-10 16:43:21 +02:00
preserveComments: "some",
2025-10-08 10:35:48 +02:00
},
html5shiv: {
2025-10-10 16:43:21 +02:00
files: [
{
expand: true, // Enable dynamic expansion.
cwd: "src/", // Src matches are relative to this path.
src: ["**/*.js"], // Actual pattern(s) to match.
dest: "dist/", // Destination path prefix.
ext: ".min.js",
},
],
},
2025-10-08 10:35:48 +02:00
},
watch: {
js: {
2025-10-10 16:43:21 +02:00
files: ["src/**/*.js"],
tasks: ["copy", "uglify", "bytesize"],
},
2025-10-08 10:35:48 +02:00
},
bytesize: {
all: {
2025-10-10 16:43:21 +02:00
src: ["dist/**.min.js"],
},
},
2025-10-08 10:35:48 +02:00
});
// Default task.
2025-10-10 16:43:21 +02:00
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-bytesize");
2025-10-08 10:35:48 +02:00
2025-10-10 16:43:21 +02:00
grunt.registerTask("default", ["copy", "uglify", "bytesize", "watch"]);
2025-10-08 10:35:48 +02:00
};