2016-09-24 4 views
0

"BOSS" 프로젝트를 설치하려고합니다.내 gulpfile에 빌드 작업을 어떻게 추가 할 수 있습니까?

이것은 내가 실행하려고 시도했을 때 bin/buildout -c frontend.cfg입니다. 전체 설치 단계를 여기에서 확인할 수 있습니다.

<USER>@ubuntu:/opt/boss$ sudo bin/buildout -c frontend.cfg 
Installing frontend-admin. 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No README data 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No repository field. 
npm http GET https://registry.npmjs.org/bower 
npm http 304 https://registry.npmjs.org/bower 
[email protected] node_modules/bower 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No README data 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No repository field. 
npm http GET https://registry.npmjs.org/bower/1.5.2 
npm http 304 https://registry.npmjs.org/bower/1.5.2 
npm http GET https://registry.npmjs.org/abbrev 
npm http GET https://registry.npmjs.org/archy/1.0.0 
npm http GET https://registry.npmjs.org/bower-config 
npm http GET https://registry.npmjs.org/bower-endpoint-parser 
npm http GET https://registry.npmjs.org/bower-logger 
npm http GET https://registry.npmjs.org/bower-json 
npm http GET https://registry.npmjs.org/bower-registry-client 
npm http GET https://registry.npmjs.org/cardinal/0.4.4 
npm http GET https://registry.npmjs.org/chalk 
npm http GET https://registry.npmjs.org/configstore 
npm http GET https://registry.npmjs.org/decompress-zip 
npm http GET https://registry.npmjs.org/chmodr/0.1.0 
npm http GET https://registry.npmjs.org/fstream 
npm http GET https://registry.npmjs.org/fstream-ignore 
npm http GET https://registry.npmjs.org/github 
npm http GET https://registry.npmjs.org/deep-sort-object 
npm http GET https://registry.npmjs.org/glob 
npm http GET https://registry.npmjs.org/graceful-fs 
npm http GET https://registry.npmjs.org/handlebars 
npm http GET https://registry.npmjs.org/is-root 
npm http GET https://registry.npmjs.org/inquirer/0.8.0 
npm http GET https://registry.npmjs.org/insight 
npm http GET https://registry.npmjs.org/junk 
npm http GET https://registry.npmjs.org/mout 
npm http GET https://registry.npmjs.org/lockfile 
npm http GET https://registry.npmjs.org/lru-cache 

----------- CUT는 --------------

npm http 304 https://registry.npmjs.org/amdefine 
npm http GET https://registry.npmjs.org/end-of-stream/1.0.0 
npm http GET https://registry.npmjs.org/stream-shift 
npm http GET https://registry.npmjs.org/es6-iterator 
npm http GET https://registry.npmjs.org/es6-symbol 
npm http 304 https://registry.npmjs.org/es6-symbol 
npm http 304 https://registry.npmjs.org/es6-iterator 
npm http 304 https://registry.npmjs.org/es6-iterator 
npm http 304 https://registry.npmjs.org/es6-symbol 
npm http 304 https://registry.npmjs.org/pinkie-promise 
npm http 304 https://registry.npmjs.org/stream-shift 
npm http GET https://registry.npmjs.org/pinkie 
npm http 304 https://registry.npmjs.org/end-of-stream/1.0.0 
npm http GET https://registry.npmjs.org/once 
npm http 304 https://registry.npmjs.org/pinkie 
npm http 304 https://registry.npmjs.org/once 
[email protected] node_modules/bower 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected].2 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
[20:47:43] Working directory changed to /opt/boss/frontend/admin 
[20:47:43] Using gulpfile /opt/boss/frontend/admin/gulpfile.js 
[20:47:43] Task 'build' is not in your gulpfile 
[20:47:43] Please check the documentation for proper gulpfile formatting 
While: 
    Installing frontend-admin. 

An internal error occurred due to a bug in either zc.buildout or in a 
recipe being used: 
Traceback (most recent call last): 
    File "/opt/boss/.buildout/eggs/zc.buildout-2.5.3-py3.4.egg/zc/buildout/buildout.py", line 1995, in main 
    getattr(buildout, command)(args) 
    File "/opt/boss/.buildout/eggs/zc.buildout-2.5.3-py3.4.egg/zc/buildout/buildout.py", line 666, in install 
    installed_files = self[part]._call(recipe.install) 
    File "/opt/boss/.buildout/eggs/zc.buildout-2.5.3-py3.4.egg/zc/buildout/buildout.py", line 1410, in _call 
    return f() 
    File "/opt/boss/eggs/collective.recipe.cmd-0.11-py3.4.egg/collective/recipe/cmd/__init__.py", line 56, in install 
    self.execute() 
    File "/opt/boss/eggs/collective.recipe.cmd-0.11-py3.4.egg/collective/recipe/cmd/__init__.py", line 69, in execute 
    run_commands(cmds, self.shell) 
    File "/opt/boss/eggs/collective.recipe.cmd-0.11-py3.4.egg/collective/recipe/cmd/__init__.py", line 39, in run_commands 
    check_call('%s %s' % (shell, tmpfile), shell=True) 
    File "/usr/lib/python3.4/subprocess.py", line 561, in check_call 
    raise CalledProcessError(retcode, cmd) 
subprocess.CalledProcessError: Command 'sh /tmp/tmprbxr2129/run' returned non-zero exit status 1 

이 내 gulpfile.js의 모습입니다.

var gulp = require('gulp'), 
    extractTranslate = require('gulp-angular-translate-extractor'); 


    gulp.task('i18n', function() { 
     var i18ndest = './assets/translations'; 
     return gulp.src([ 
      '!../shared/skyline/**/*.tpl.html', 
      '!../shared/skyline/**/*.js', 
      '!../shared/openstackService/**/*.js', 
      '../shared/**/*.tpl.html', 
      '../shared/**/*.js', 
      './src/**/*.tpl.html', 
      './src/**/*.js', 
      './lib/**/*.tpl.html', 
      './lib/**/*.js' 
     ]) 
     .pipe(extractTranslate({ 
      defaultLang: 'en.i18n', 
      lang: ['en.i18n', 'ru.i18n'], 
      dest: i18ndest, 
      safeMode: false, // do not delete old translations 
      stringifyOptions: true // force json to be sorted 
     })) 
     .pipe(gulp.dest(i18ndest)); 
    }); 
    ~         

이 프론트 엔드/관리자

cd <project-dir>/frontend/admin 
    npm install 
    npm run install 
    npm run compile 
    The last command creates 'bin' folder with compiled and minified admin frontend. 

    npm run dev 
    The command places built code inside a build folder, start local web server with livereload and watchers to rebuild app on files changes. 

    npm run i18n 
    The command extracts all translations keys for angular translate and place them to admin/src/assets/translations 

    npm run test 
    The command runs karma tests 

에 대한 빌드 설명서이며,이 프론트 엔드/LK 내가 [20:47:43] Task 'build' is not in your gulpfile 오류를 해결할 수있는 방법

cd <project-dir>/frontend/admin 
    npm install 
    npm run install 
    npm run build 
    The last command creates 'bin' folder with compiled and minified admin frontend. 

    npm run dev 
    The command places built code inside a build folder, start local web server with livereload and watchers to rebuild app on files changes. 

    npm run i18n 
    The command extracts all translations keys for angular translate and place them to admin/src/assets/translations 

    npm run test 

The command runs karma tests 

의 빌드 설명서입니까?

도움이 필요합니다. 감사.

+0

https://css-tricks.com/gulp-for-beginners/을 통해 협력하여 시작하는 것이 좋습니다? – Rahul

+0

@rahulreddy 나는 단지'[20:47:43] Task 'build'가 gulpfile에 없다는 오류를 고치고 싶습니다. 'Error. – kycfeel

+0

gulpfile에 'build'라는 작업이 없기 때문입니다. build라는 이름으로 태스크를 생성 한 다음 gulp 빌드를 수행하십시오. – Rahul

답변

0

은 귀하의 질문에 대답하려면 : gulp x를 실행할 때, 당신의 gulpfile.js, 당신은 i18n라는 이름의 작업을 실행하는 것이다, gulp i18n를 실행할 수 있습니다 또는 당신이에 i18n 작업의 이름을 바꿀 수있는 귀하의 경우에는

gulp.task('x' ...); 

을 포함한다 build을 실행 한 다음 gulp build을 실행하십시오.


여기에는 여러 가지 일들이 있습니다. 처음에는 패키지를 초기화하지 않은 것 같습니다 .json - 그게

npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No README data 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No repository field. 

의 출처입니다.

npm init 

를 실행하고 초기화 알아 보겠습니다 (백업 할 수 있습니다 첫 번째 package.json 현재). 기본 꿀꺽 작업을 실행할 때

나는, 당신은 당신이 실행 위에서 언급 한 빌드 작업을 할 의미합니까

+0

답장을 보내 주셔서 감사합니다! 나는 당신의 연결된 가이드를 정말 좋아합니다. – kycfeel

+0

도움이 되니 기쁩니다! 이 질문에 대한 답변이있는 경우 "허용 대답"(위/아래 투표 버튼 옆에있는 체크 표시)으로 표시하십시오 - 다른 사람들이 당신이 지금 준비 중임을 알게 될 것입니다 – henry

관련 문제