Woodland_Furniture
/
Gruntfile.cjs
47 строк · 1.4 Кб
1'use strict'
2
3require('fix-esm').register() // Allows to require any ECMAScript module in this file4
5const environment = require('./grunt/other/environment.js')6
7require('./grunt/other/server.js')8.server() // Starting the server9require('./grunt/other/fontsWriting.js')10.fontsWriting() // Parsing fonts into the style file11
12
13module.exports = grunt => {14// Load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns15require('load-grunt-tasks')(grunt)16grunt.loadTasks('./grunt/esbuild/tasks/')17grunt.loadTasks('./grunt/sharp/tasks/')18
19grunt.initConfig({20...require('./grunt/html/posthtml.js'),21...require('./grunt/css/postcss.js'),22...require('./grunt/css/minifier&formatter.js'),23...require('./grunt/scripts/compiler.js'),24...require('./grunt/images/sharp.js'),25...require('./grunt/html/formatter.js'),26...require('./grunt/other/ttf2woff2.js'),27...require('./grunt/other/newer.js'),28...require('./grunt/other/copy.js'),29...require('./grunt/other/watch.js'),30...require('./grunt/other/deleteDist.js'),31})32
33grunt.registerTask('default', [34// Delete the dist folder if the --update-dist flag is set.35environment.isDeleteDistBeforeLaunch && 'clean',36'sharp',37'newer:posthtml',38'newer:postcss',39'newer:cssmin',40'esbuild',41'ttf2woff2',42
43'newer:copy',44environment.isProductionMode && 'prettify',45'watch',46].filter(task => task))47}
48
49
50