저는 오늘 Yeoman 워크 플로우를 처음 사용했습니다. 자산 관리 프로세스를 자동화하기 위해 grunt bower-install을 설치하려고합니다.grunt bower-install을 설정하는 데 문제가 있습니다.
문제는 내가 문서의 지침을 마지막으로 실행 했음에도 불구하고 실행하려고 할 때 grunt bower-install
오류가 발생합니다. 홈 DIR에서이 명령을 실행하려고 할 때
있습니다 :
[email protected]:~/app$ grunt bower-install
Loading "gruntfile.js" tasks...ERROR
>> Error: Unable to read "package.json" file (Error code: ENOENT).
Warning: Task "bower-install" not found. Use --force to continue.
Aborted due to warnings.
:
[email protected]:~$ !!
Running "bower-install:app" (bower-install) task
Verifying property bower-install.app.src exists in config...ERROR
>> Unable to process task.
Warning: Required config property "bower-install.app.src" missing. Use --force to continue.
Aborted due to warnings.
Execution Time (2014-01-20 10:17:47 UTC)
loading tasks 3ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 25%
bower-install:app 8ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 67%
Total 12ms
응용 프로그램 디렉토리에 cding하고 명령을 다시 실행 한 후, 나는 다른 오류
어떤 도움도 훨씬 크게 받으실 수 있습니다! 다음과 같은
내 Gruntfile.js는 (응용 프로그램/디렉토리 내에서) 보이는 : 패키지 : 당신은 "읽을 수 없습니다 오류"프로젝트 디렉토리에 package.json 파일을 (누락되었습니다
'use strict';
module.exports = function (grunt) {
// Project configuration
grunt.initConfig({
// Metadata
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= props.license %> */\n',
// Task configuration
concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
dist: {
src: ['lib/<%= pkg.name %>.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: '<%= concat.dist.dest %>',
dest: 'dist/<%= pkg.name %>.min.js'
}
},
'bower-install': {
target: {
// Point to the files that should be updated when
// you run `grunt bower-install`
src: ['/home/oleg/index.html'],
// Optional:
// ---------
cwd: '',
ignorePath: '',
exclude: [],
fileTypes: {}
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true,
browser: true,
globals: {
jQuery: true
}
},
gruntfile: {
src: 'gruntfile.js'
},
lib_test: {
src: ['lib/**/*.js', 'test/**/*.js']
}
},
qunit: {
files: ['test/**/*.html']
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib_test: {
files: '<%= jshint.lib_test.src %>',
tasks: ['jshint:lib_test', 'qunit']
}
}
});
// These plugins provide necessary tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-bower-install');
// Default task
grunt.registerTask('default', ['jshint', 'qunit', 'concat', 'uglify']);
};