簡體   English   中英

Grunt:在grunt命令后沒有創建Dist文件夾

[英]Grunt: Dist folder not created after grunt command

我是新人,使用Grunt,我需要一些幫助。 在運行grunt命令之后,我應該有一個'Dist'文件夾,但是沒有發生任何事情。 我沒有任何錯誤,一切似乎都很好。 任何幫助表示贊賞。 謝謝

'use strict';

module.exports = function (grunt) {

 // Time how long tasks take. Can help when optimizing build times
 require('time-grunt')(grunt);

 // Automatically load required Grunt tasks
 require('jit-grunt')(grunt);

 // Define the configuration for all the tasks
 grunt.initConfig({
      pkg: grunt.file.readJSON('package.json'),

// Make sure code styles are up to par and there are no obvious mistakes
jshint: {
  options: {
    jshintrc: '.jshintrc',
    reporter: require('jshint-stylish')
  },
  all: {
    src: [
      'Gruntfile.js',
      'app/scripts/{,*/}*.js'
    ]
  }
},
copy: {
  dist: {
    cwd: 'app',
    src: [ '**','!styles/**/*.css','!scripts/**/*.js' ],
    dest: 'dist',
    expand: true
  },
fonts: {
      files:[
          {
              //for bootstrap fonts
                expand: true,
                dot: true,
                cwd: 'bower_components/bootstrap/dist',
                src: ['fonts/*.*'],
                dest: 'dist'
            }, {
                //for font-awesome
                expand: true,
                dot: true,
                cwd: 'bower_components/font-awesome',
                src: ['fonts/*.*'],
                dest: 'dist'
            }
      ]
    }
 },
clean: {
    build:{
        src: [ 'dist/']
    }
  }
 });
  grunt.registerTask('build', [
   'clean',
  'jshint',
  'copy'
  ]);
  grunt.registerTask('default',['build']);
  };

看起來你錯過了斜線。

嘗試

dest: 'dist/'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM