diff --git a/.babelrc b/.babelrc index b0b9a96e..bd5cf1c7 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,17 @@ { - "stage": 0 + "env": { + "test": { + "plugins": [ + "typecheck" + ] + } + }, + "plugins": [ + "transform-flow-comments" + ], + "presets": [ + "es2015", + "stage-0", + "react" + ] } diff --git a/.codeclimate.yml b/.codeclimate.yml index 82a71498..a09f0859 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -33,6 +33,5 @@ ratings: # exclude_paths key. exclude_paths: -- examples/** - lib/** - public/** diff --git a/.eslintignore b/.eslintignore index 89d00a2e..e0d346a8 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,3 @@ -examples/** +**/node_modules/** lib/** public/** diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 692ab6e9..00000000 --- a/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -tomchentw (https://github.com/tomchentw) diff --git a/LICENSE b/LICENSE index e33d17a1..787635ee 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Tom Chen +Copyright (c) 2016 Tom Chen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 1965fb94..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -web: - build: . - dockerfile: examples/gh-pages/Dockerfile - command: npm start - ports: - - "8080:8080" - environment: - - DOCKER_ENV=true diff --git a/package.json b/package.json index a68bde1d..6270ef1a 100644 --- a/package.json +++ b/package.json @@ -12,16 +12,16 @@ "clean": "rimraf lib", "prebuild": "npm run lint && npm run clean", "build:watch": "npm run build -- --watch", - "build": "babel src --out-dir lib", - "lint": "eslint .", + "build": "cross-env NODE_ENV=production babel src --out-dir lib", + "lint": "cross-env NODE_ENV=test eslint .", "pretest:cov": "npm run lint", "pretest": "npm run lint", - "test:cov": "babel-node ./node_modules/.bin/isparta cover --report lcov _mocha -- $npm_package_config_mocha", + "test:cov": "cross-env NODE_ENV=test babel-node ./node_modules/.bin/isparta cover --report lcov _mocha -- $npm_package_config_mocha", "test:watch": "npm test -- --watch", - "test": "mocha $npm_package_config_mocha" + "test": "cross-env NODE_ENV=test mocha $npm_package_config_mocha" }, "config": { - "mocha": "--compilers js:babel/register ./src/__tests__/*.spec.js ./src/**/__tests__/*.spec.js --require ./src/__tests__/__setup__.js" + "mocha": "--compilers js:babel-register ./src/**/__tests__/*.spec.js --require ./src/__tests__/setup.js" }, "repository": { "type": "git", @@ -63,22 +63,31 @@ }, "homepage": "https://tomchentw.github.io/react-google-maps/", "devDependencies": { - "babel": "^5.8.23", - "babel-core": "^5.8.25", - "babel-eslint": "^4.1.3", - "codeclimate-test-reporter": "^0.1.1", - "eslint": "^1.10.3", - "eslint-config-airbnb": "^2.1.1", - "eslint-plugin-react": "^3.12.0", - "expect": "^1.12.1", - "isparta": "^3.1.0", - "istanbul": "^0.3.22", - "jsdom": "^7.0.2", - "mocha": "^2.3.3", - "react": "^0.14.0", - "react-dom": "^0.14.0", - "rimraf": "^2.4.3", - "tomchentw-npm-dev": "^3.1.0" + "babel-cli": "^6.5.1", + "babel-core": "^6.5.2", + "babel-eslint": "^6.0.4", + "babel-plugin-transform-flow-comments": "^6.5.0", + "babel-plugin-typecheck": "^3.6.1", + "babel-preset-es2015": "^6.5.0", + "babel-preset-react": "^6.5.0", + "babel-preset-stage-0": "^6.5.0", + "babel-register": "^6.5.2", + "codeclimate-test-reporter": "^0.3.1", + "cross-env": "^1.0.7", + "eslint": "^2.2.0", + "eslint-config-airbnb": "^9.0.1", + "eslint-plugin-import": "^1.8.1", + "eslint-plugin-jsx-a11y": "^1.2.2", + "eslint-plugin-react": "^5.1.1", + "expect": "^1.14.0", + "isparta": "^4.0.0", + "istanbul": "^0.4.2", + "jsdom": "^9.2.1", + "mocha": "^2.4.5", + "react": "^15.1.0", + "react-dom": "^15.1.0", + "rimraf": "^2.5.2", + "tomchentw-npm-dev": "^3.3.0" }, "dependencies": { "can-use-dom": "^0.1.0",