diff --git a/.babelrc b/.babelrc index f2397d3..9a98b00 100755 --- a/.babelrc +++ b/.babelrc @@ -1,8 +1,6 @@ { "presets": ["env", "react","stage-2"], "plugins": [ - "ramda", - "lodash", "react-hot-loader/babel", ["transform-runtime", { "polyfill": false, diff --git a/.eslintrc b/.eslintrc index 65a988e..3b9e3fd 100755 --- a/.eslintrc +++ b/.eslintrc @@ -4,8 +4,7 @@ "plugins": [ "react", "jsx-a11y", - "import", - "jest" + "import" ], "rules": { "quotes": 1, @@ -43,9 +42,7 @@ "Element": true, "localStorage": true, }, - "env": { - "jest/globals": true - }, + "env": {}, "settings": { "import/resolver": { "webpack": { diff --git a/package.json b/package.json index 9f2a4f9..bad5f57 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "description": "Beta Map", "main": "./src/js/index.js", "scripts": { - "start": "NODE_ENV=development webpack-dev-server --mode development --hot --open --inline --progress" + "start": "NODE_ENV=development webpack-dev-server --mode development --hot --open --inline --progress", + "build": "NODE_ENV=production webpack --env production --config=webpack.config.js --progress" }, "author": "Grigory Chervoplyas", "license": "ISC", diff --git a/src/containers/App.jsx b/src/containers/App.jsx index 2ddcf8f..d102304 100644 --- a/src/containers/App.jsx +++ b/src/containers/App.jsx @@ -1,12 +1,16 @@ import React from 'react'; -import { Map } from "$containers/Map"; + +import { Map } from '../modules/map'; +import { MapScreen } from "$styles/mapScreen"; export class App extends React.Component { - render(){ - return ( -
+ componentDidMount() { + this.map = new Map('map'); + } -
- ) + render() { + return ( + + ); } }; diff --git a/src/index.js b/src/index.js index 01e4a32..702f7b6 100644 --- a/src/index.js +++ b/src/index.js @@ -2,28 +2,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { App } from '$containers/App'; -import { Provider } from 'react-redux'; - -import { ConnectedRouter } from 'react-router-redux'; -import { PersistGate } from 'redux-persist/integration/react'; - -// import { configs } from '$constants/moment'; -import configureStore, { history } from '$redux/store'; - -const { store, persistor } = configureStore(); - -// import './js/common'; -// import './js/script'; -import './css/style.css'; export const Index = () => ( - - - - - - - + ); ReactDOM.render(, document.getElementById('index')); diff --git a/src/modules/map.js b/src/modules/map.js new file mode 100644 index 0000000..5eface5 --- /dev/null +++ b/src/modules/map.js @@ -0,0 +1,22 @@ +import L from "leaflet"; + +import { providers } from "$constants/providers"; + +import 'leaflet/dist/leaflet.css'; + +export class Map { + constructor(container) { + this.map = L.map(container, { + editable: true, + layers: [ + + ] + }).setView([55.0153275, 82.9071235], 13); + + this.tileLayer = L.tileLayer(providers.default, { + attribution: 'Независимое Велосообщество', + maxNativeZoom: 18, + maxZoom: 18, + }).addTo(this.map); + } +}