Skip to content

Commit

Permalink
Merge c709982 into 93f0b79
Browse files Browse the repository at this point in the history
  • Loading branch information
Xintong Xia committed Sep 17, 2019
2 parents 93f0b79 + c709982 commit 2f5d9ba
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 17 deletions.
11 changes: 11 additions & 0 deletions modules/react-map-gl-draw/babel.config.js
@@ -0,0 +1,11 @@
/* eslint-disable import/no-extraneous-dependencies */
const getBabelConfig = require('ocular-dev-tools/config/babel.config');

module.exports = api => {
const config = getBabelConfig(api);

config.presets = [['@babel/preset-env', {useBuiltIns: 'usage'}], '@babel/flow', '@babel/preset-react'];
config.plugins = (config.plugins || []).concat('@babel/proposal-class-properties');

return config;
};
19 changes: 19 additions & 0 deletions modules/react-map-gl-draw/ocular-dev-tools.config.js
@@ -0,0 +1,19 @@
const {resolve} = require('path');

const config = {
lint: {
paths: ['src', 'test'],
extensions: ['js']
},

alias: {
'react-map-gl-draw/test': resolve('./test'),
'react-map-gl-draw': resolve('./src')
},

entry: {
test: 'test/index.js'
}
};

module.exports = config;
38 changes: 21 additions & 17 deletions modules/react-map-gl-draw/package.json
Expand Up @@ -6,42 +6,46 @@
"author": "Xintong Xia <xintong@uber.com>",
"repository": {
"type": "git",
"url": "https://github.com/uber/nebula.gl"
"url": "https://github.com/uber/nebula.gl/tree/master/modules/react-map-gl-draw"
},
"keywords": [
"svg",
"visualization",
"editing"
],
"main": "dist/index.js",
"module": "dist-es6/index.js",
"main": "dist/es5/index.js",
"module": "dist/esm/index.js",
"esnext": "dist/es6/index.js",
"files": [
"src",
"dist",
"dist-es6",
"src"
"README.md"
],
"scripts": {
"build-clean": "rm -fr dist dist-es6 && mkdir -p dist dist-es6",
"build-es6": "rm -fr dist-es6 && BABEL_ENV=es6 babel src --config-file ../../babel.config.js --out-dir dist-es6 --source-maps inline",
"build-es5": "rm -fr dist && BABEL_ENV=es5 babel src --config-file ../../babel.config.js --out-dir dist --source-maps inline",
"build": "yarn build-clean && yarn build-es6 && yarn build-es5",
"flow": "(cd ../.. && yarn flow)",
"lint": "(cd ../.. && yarn lint)",
"prepublish": "yarn build",
"publish-prod": "yarn build && yarn test && yarn test-dist && npm publish",
"publish-beta": "yarn build && yarn test && yarn test-dist && npm publish --tag beta",
"test": "yarn lint && yarn build && yarn flow && yarn jest"
"clean": "ocular-clean",
"build": "ocular-clean && ocular-build",
"lint": "ocular-lint",
"cover": "ocular-test cover",
"publish-prod": "ocular-publish prod",
"publish-beta": "ocular-publish beta",
"test": "flow check && ocular-test",
"test-fast": "flow check && ocular-test fast",
"metrics": "ocular-metrics"
},
"dependencies": {
"@nebula.gl/edit-modes": "0.15.0",
"@nebula.gl/edit-modes": "^0.15.0",
"@turf/helpers": "^6.1.4",
"mjolnir.js": "^2.2.1",
"prop-types": "^15.7.2",
"uuid": "^3.3.2",
"viewport-mercator-project": "^6.1.0"
},
"devDependencies": {
"react-map-gl": "^5.0.2"
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"react-map-gl": "^5.0.2",
"ocular-dev-tools": "^0.0.29"
},
"peerDependencies": {
"react": "^16.x",
Expand Down
1 change: 1 addition & 0 deletions modules/react-map-gl-draw/test/index.js
@@ -0,0 +1 @@
import './utils.spec';

0 comments on commit 2f5d9ba

Please sign in to comment.