Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution of copy has no effect? #282

Open
ghost opened this issue Feb 6, 2017 · 0 comments
Open

Execution of copy has no effect? #282

ghost opened this issue Feb 6, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2017

I've tried to copy a .css file bower_components/components-font-awesome/css/font-awesome.min.css into a target directory like this:

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
      },
      build: {
        src: 'src/main/webapp/js/**/*/<%= pkg.name %>.js',
        dest: 'build/<%= pkg.name %>.min.js'
      }
    },
    
    copy: {
		main: {
			//files: {
				expand: true,
			    cwd: '/',
				src: 'bower_components/components-font-awesome/css/font-awesome.min.css', 
				dest: 'src/main/webapp/css/' 
			//}
	 
		}
	}
    
  });
  
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-copy');


  // Default task(s).
  grunt.registerTask('default', ['copy']);

};

but I am not getting anything copied. grunt -v gives me just

Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK

Registering "grunt-contrib-uglify" local Npm module tasks.
Reading /media/Data/workspaces/git/easy-model-access/ema-server/web/node_modules/grunt-contrib-uglify/package.json...OK
Parsing /media/Data/workspaces/git/easy-model-access/ema-server/web/node_modules/grunt-contrib-uglify/package.json...OK
Loading "uglify.js" tasks...OK
+ uglify

Registering "grunt-contrib-copy" local Npm module tasks.
Reading /media/Data/workspaces/git/easy-model-access/ema-server/web/node_modules/grunt-contrib-copy/package.json...OK
Parsing /media/Data/workspaces/git/easy-model-access/ema-server/web/node_modules/grunt-contrib-copy/package.json...OK
Loading "copy.js" tasks...OK
+ copy
Loading "Gruntfile.js" tasks...OK
+ default

No tasks specified, running default tasks.
Running tasks: default

Running "default" task

Running "copy" task

Running "copy:main" (copy) task
Verifying property copy.main exists in config...OK
Options: encoding="utf8", processContent=false, processContentExclude=[], timestamp=false, mode=false


Done.

What I need is to copy a few specific .css files from the bower_components into the distribution css directory. Any idea why this is not working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants