FE-star / 2018.1

第二期课程仓库,请勿fork,建议watch或者star
43 stars 7 forks source link

第一节课问题收集 #3

Open miniflycn opened 6 years ago

miniflycn commented 6 years ago

感觉还是那个帖子收集下比较好,大家有问题请跟帖吧

Elliott-Hu commented 6 years ago

在接入coveralls的时候,coveralls.io 会要求你写一份 配置文件,里面要包含它给你的 repo_token, 但是文档上却说这个token 不能暴露出来,但是我写在代码里面了,这个要如何处理呢? image

ceerqingting commented 6 years ago

Travis pro 才需要token,Travis CI 好像不需要吧,我没配也可以接入

wanglei-elf commented 6 years ago

请问,travis ci 环境,怎么选择环境的运行版本比较好呢? 因为最开始写travis.yml时,没有写node_js的版本,配置文件中只写了language:node_js,所以node的版本默认0.0.1,导致运行不通过。所以想问问师父,怎么选择这些版本比较好呢?

miniflycn commented 6 years ago

@wanglei-elf 4以上版本即可

wanglei-elf commented 6 years ago

exercise3在travis-ci中,karam: no capture browser,build没有成功,这样应该怎么处理呢?

https://www.travis-ci.org/wanglei-elf/exercise3 02 02 2018 01:52:07.105:WARN [karma]: No captured browser, open http://localhost:9876/ 02 02 2018 01:52:07.117:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/

配置文件.travis.yml:

language: node_js
node_js:
  - '6.11.2'
dist: trusty
addons:
  chrome: stable
before_install:
  - export CHROME_BIN=chromium-browser
  - export Display=:99.0
  - sh -e /etc/init.d/xvfb start
wknhsj commented 6 years ago

你这个是ci环境浏览器报错。 同学看一下这个网址:http://karma-runner.github.io/2.0/config/browsers.html 然后再看看同学们提交的karma配置文件:karma.conf.js

wanglei-elf commented 6 years ago

@wknhsj 谢谢,问题解决了 .travis.yml: language: node_js node_js:

karma.config.js: ... browsers: ['Chrome', 'Chrome_travis_ci'], customLaunchers: { Chrome_travis_ci: { base: 'Chrome', flags: ['--no-sandbox'] } } ... if(process.env.TRAVIS){ cfg.browsers=['Chrome_travis_ci']; }

此外,自己给自己挖了一个坑,karma.config.js中少写了,config.set(cfg),导致配置一直没有生效

谢谢啦

wangyuanlitin commented 6 years ago

解释一下通过Ojbect.create()实现的继承吧,不明白

miniflycn commented 6 years ago

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Inheritance_Revisited

miniflycn commented 6 years ago

解答完毕