Skip to content

Commit

Permalink
Fix Task "pug" not found error in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Krinkle committed Sep 8, 2024
1 parent 93e91bb commit 659188f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
21 changes: 18 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,24 @@ module.exports = function(grunt) {
});

grunt.loadTasks('tasks'); // getWiki, docs tasks
require('matchdep')
.filterAll(['grunt-*', '!grunt-docs'])
.forEach(grunt.loadNpmTasks);

grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-pug');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-sitemap');

if (process.env.NODE_ENV !== 'production') {
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-puglint');
}

grunt.registerTask('build', 'Build the site', [
'copy',
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"grunt-contrib-clean": "~1.1.0",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-less": "~2.0.0",
"grunt-contrib-pug": "^2.0.0",
"grunt-contrib-uglify": "~4.0.0",
"grunt-docs": "https://github.com/gruntjs/grunt-docs.git#d224f17ae21fe606b5b7eca73155a31f4e341930",
"grunt-sitemap": "~1.2.1",
"highlight.js": "~9.12.0",
"less-plugin-clean-css": "~1.5.1",
"lodash": "~4.17.10",
"marked": "https://github.com/vladikoff/marked/tarball/032a72231503b63e15e76b990a914becf664b0d7",
"matchdep": "~2.0.0",
"method-override": "~3.0.0",
"node-schedule": "~1.3.0",
"pug": "~2.0.3",
Expand All @@ -47,7 +47,6 @@
"devDependencies": {
"grunt-concurrent": "~2.3.1",
"grunt-contrib-jshint": "~1.1.0",
"grunt-contrib-pug": "^2.0.0",
"grunt-contrib-watch": "~1.1.0",
"grunt-html": "~9.3.0",
"grunt-nodemon": "~0.4.2",
Expand Down

0 comments on commit 659188f

Please sign in to comment.