Woodland_Furniture

Форк
0
/
Gruntfile.cjs 
47 строк · 1.4 Кб
1
'use strict'
2

3
require('fix-esm').register() // Allows to require any ECMAScript module in this file
4

5
const environment = require('./grunt/other/environment.js')
6

7
require('./grunt/other/server.js')
8
  .server() // Starting the server
9
require('./grunt/other/fontsWriting.js')
10
  .fontsWriting() // Parsing fonts into the style file
11

12

13
module.exports = grunt => {
14
  // Load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns
15
  require('load-grunt-tasks')(grunt)
16
  grunt.loadTasks('./grunt/esbuild/tasks/')
17
  grunt.loadTasks('./grunt/sharp/tasks/')
18

19
  grunt.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

33
  grunt.registerTask('default', [
34
    // Delete the dist folder if the --update-dist flag is set.
35
    environment.isDeleteDistBeforeLaunch && 'clean',
36
    'sharp',
37
    'newer:posthtml',
38
    'newer:postcss',
39
    'newer:cssmin',
40
    'esbuild',
41
    'ttf2woff2',
42

43
    'newer:copy',
44
    environment.isProductionMode && 'prettify',
45
    'watch',
46
  ].filter(task => task))
47
}
48

49

50

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.