mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 04:01:55 +01:00
Restructure webpack and add favico
This commit is contained in:
parent
24a90b3c57
commit
b50855a4a9
9 changed files with 9 additions and 41 deletions
|
@ -1,6 +1,6 @@
|
|||
# Maputnik [![Build Status](https://travis-ci.org/maputnik/editor.svg?branch=master)](https://travis-ci.org/maputnik/editor) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/anelbgv6jdb3qnh9/branch/master?svg=true)](https://ci.appveyor.com/project/lukasmartinelli/editor) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://tldrlegal.com/license/mit-license)
|
||||
|
||||
<img width="200" align="right" alt="Maputnik" src="media/maputnik.png" />
|
||||
<img width="200" align="right" alt="Maputnik" src="src/img/maputnik.png" />
|
||||
|
||||
A free and open visual editor for the [Mapbox GL styles](https://www.mapbox.com/mapbox-gl-style-spec/)
|
||||
targeted at developers and map designers. Creating your own custom map is easy with **Maputnik**.
|
||||
|
|
BIN
media/demo.gif
BIN
media/demo.gif
Binary file not shown.
Before Width: | Height: | Size: 3.2 MiB |
|
@ -16,6 +16,7 @@ import HelpIcon from 'react-icons/lib/md/help-outline'
|
|||
import InspectionIcon from 'react-icons/lib/md/find-in-page'
|
||||
import AddIcon from 'react-icons/lib/md/add-circle-outline'
|
||||
|
||||
import logoImage from '../img/maputnik.png'
|
||||
import AddModal from './modals/AddModal'
|
||||
import SettingsModal from './modals/SettingsModal'
|
||||
import SourcesModal from './modals/SourcesModal'
|
||||
|
@ -172,7 +173,7 @@ export default class Toolbar extends React.Component {
|
|||
padding: 5,
|
||||
}}
|
||||
>
|
||||
<img src="https://github.com/maputnik/editor/raw/master/media/maputnik.png" alt="Maputnik" style={{width: 30, height: 30, paddingRight: 5, verticalAlign: 'middle'}}/>
|
||||
<img src={logoImage} alt="Maputnik" style={{width: 30, height: 30, paddingRight: 5, verticalAlign: 'middle'}}/>
|
||||
<span style={{fontSize: 20, verticalAlign: 'middle' }}>Maputnik</span>
|
||||
</ToolbarLink>
|
||||
<ToolbarAction onClick={this.toggleModal.bind(this, 'open')}>
|
||||
|
|
BIN
src/favicon.ico
Normal file
BIN
src/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import './favicon.ico'
|
||||
import './index.css'
|
||||
import App from './components/App';
|
||||
|
||||
|
|
|
@ -7,16 +7,6 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||
const HOST = process.env.HOST || "127.0.0.1";
|
||||
const PORT = process.env.PORT || "8888";
|
||||
|
||||
// local scss modules
|
||||
loaders.push({
|
||||
test: /[\/\\]src[\/\\].*\.scss/,
|
||||
loaders: [
|
||||
'style?sourceMap',
|
||||
'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]',
|
||||
'sass'
|
||||
]
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
target: 'web',
|
||||
entry: [
|
||||
|
@ -30,9 +20,6 @@ module.exports = {
|
|||
filename: 'bundle.js'
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'webworkify': 'webworkify-webpack'
|
||||
},
|
||||
extensions: ['', '.js', '.jsx']
|
||||
},
|
||||
module: {
|
||||
|
|
|
@ -14,28 +14,16 @@ module.exports = [
|
|||
}
|
||||
},
|
||||
{
|
||||
test: /\.(eot|svg|ttf|woff|woff2)$/,
|
||||
test: /\.(eot|ttf|woff|woff2)$/,
|
||||
loader: 'file?name=fonts/[name].[ext]'
|
||||
},
|
||||
{
|
||||
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
loader: "url?limit=10000&mimetype=image/svg+xml"
|
||||
test: /\.ico$/,
|
||||
loader: 'file?name=[name].[ext]'
|
||||
},
|
||||
{
|
||||
test: /\.gif/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
loader: "url-loader?limit=10000&mimetype=image/gif"
|
||||
},
|
||||
{
|
||||
test: /\.jpg/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
loader: "url-loader?limit=10000&mimetype=image/jpg"
|
||||
},
|
||||
{
|
||||
test: /\.png/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
loader: "url-loader?limit=10000&mimetype=image/png"
|
||||
test: /\.(svg|gif|jpg|png)$/,
|
||||
loader: 'file?name=img/[name].[ext]'
|
||||
},
|
||||
{
|
||||
test: /\.json$/,
|
||||
|
|
|
@ -6,12 +6,6 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
|
||||
|
||||
// local scss modules
|
||||
loaders.push({
|
||||
test: /[\/\\]src[\/\\].*\.scss/,
|
||||
loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]', 'sass')
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './src/index.jsx',
|
||||
|
@ -45,9 +39,6 @@ module.exports = {
|
|||
chunkFilename: '[chunkhash].js'
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'webworkify': 'webworkify-webpack',
|
||||
},
|
||||
extensions: ['', '.js', '.jsx']
|
||||
},
|
||||
module: {
|
||||
|
|
Loading…
Reference in a new issue