diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..94e8389fc0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 +jobs: + test: + steps: + - run: + command: npm test + setup: + docker: + - image: circleci/node:latest + steps: + - checkout + - run: + command: npm install -g gulp + - run: + command: npm install gulp-qunit + + +workflows: + version: 2 + build-test: + jobs: + - test: + requires: + - setup diff --git a/circle.yml b/circle.yml deleted file mode 100644 index c9d4fd3700..0000000000 --- a/circle.yml +++ /dev/null @@ -1,8 +0,0 @@ -machine: - node: - version: 6.12.3 - -dependencies: - pre: - - npm install -g gulp - - npm install gulp-qunit diff --git a/cocos2d/core/label/CCSGLabel.js b/cocos2d/core/label/CCSGLabel.js index fed8c6998c..77e1a7c3c9 100644 --- a/cocos2d/core/label/CCSGLabel.js +++ b/cocos2d/core/label/CCSGLabel.js @@ -502,6 +502,7 @@ _ccsg.Label = _ccsg.Node.extend({ //avoid the error in wechat devtool platform if (!fontFamilyName) { fontFamilyName = cc.CustomFontLoader._getFontFamily(fontHandle); + cc.warn("TTF font is not supported on debugger, but it will be displayed correctly on mobile device."); } callback(); } else { diff --git a/polyfill/misc.js b/polyfill/misc.js index aa62b6bb68..6072ba33e5 100644 --- a/polyfill/misc.js +++ b/polyfill/misc.js @@ -10,7 +10,7 @@ if (!Math.sign) { if (!Number.isInteger) { Number.isInteger = function (value) { - return typeof value === 'number' && (value | 0) === value; + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; }; }