Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[287] fix undefined window #292

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions docs-www/src/globalReferences.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down