diff --git a/.circleci/config.yml b/.circleci/config.yml index fb21eb5a3..e4cd0426b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: - run: yarn lint - run: yarn test-unit - run: yarn build + - run: node -e "console.log(require('./lib/react-carousel'))" - run: name: publish gh pages for a given PR command: ./tools/deploy-gh-pages-pr.sh diff --git a/docs-www/src/globalReferences.js b/docs-www/src/globalReferences.js index 1c0d5bcc0..423997f24 100644 --- a/docs-www/src/globalReferences.js +++ b/docs-www/src/globalReferences.js @@ -1,7 +1,4 @@ const { default: Carousel, Dots } = (() => { - if (!global.window) { - global.window = {}; - } if ('__RC_ENV__' === 'development') { console.log('connecting with local react-carousel source code'); return require('../../src'); diff --git a/package.json b/package.json index f550e9de7..8069a2454 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lint": "esw webpack.config.* src tools test --color", "clean-dist": "rimraf ./lib && mkdir lib", "prebuild": "npm run clean-dist", - "build": "node tools/build.js", + "build": "node tools/build.js && mv lib/react-carousel.js 1.js && echo 'if (!global.window) { global.window = {}; }' >> lib/react-carousel.js && cat 1.js >> lib/react-carousel.js && rm 1.js", "selenium-start": "selenium-standalone start", "selenium-install": "selenium-standalone install", "test": "npm run test-unit && npm run test-regression",