File tree Expand file tree Collapse file tree 11 files changed +5206
-0
lines changed Expand file tree Collapse file tree 11 files changed +5206
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "extends": "eslint-config-airbnb-es5",
3+ "rules" : {
4+ "func-names": 0
5+ },
6+ "env" : {
7+ "browser" : true,
8+ "mocha" : true,
9+ "es6": true
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ yarn-error.log
2+ node_modules
3+ coverage
4+ dist
5+
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " js-app-boilerplate" ,
3+ "version" : " 1.0.0-SNAPSHOT" ,
4+ "dependencies" : {
5+ "@csgis/bricjs-loader" : " ^0.0.1" ,
6+ "leaflet" : " ^1.2.0"
7+ },
8+ "devDependencies" : {
9+ "babel-cli" : " ^6.26.0" ,
10+ "babel-core" : " ^6.26.0" ,
11+ "babel-eslint" : " ^7.2.1" ,
12+ "babel-loader" : " ^7.1.2" ,
13+ "babel-preset-env" : " ^1.6.0" ,
14+ "codecov" : " ^2.3.0" ,
15+ "copy-webpack-plugin" : " ^4.1.1" ,
16+ "css-loader" : " ^0.28.7" ,
17+ "eslint" : " ^3.18.0" ,
18+ "eslint-config-airbnb-es5" : " ^1.1.0" ,
19+ "eslint-plugin-react" : " ^6.10.3" ,
20+ "file-loader" : " ^1.1.5" ,
21+ "style-loader" : " ^0.19.0" ,
22+ "url-loader" : " ^0.6.2" ,
23+ "webpack" : " ^3.6.0" ,
24+ "webpack-archive-plugin" : " ^3.0.0" ,
25+ "webpack-dev-server" : " ^2.9.1"
26+ },
27+ "scripts" : {
28+ "lint" : " eslint src test" ,
29+ "build" : " webpack" ,
30+ "start" : " webpack-dev-server"
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ {
2+ "modules" : {
3+ "layers" : " ./layers" ,
4+ "map" : " ./map"
5+ }
6+ }
Original file line number Diff line number Diff line change 1+ export default {
2+ 'map' : {
3+ 'vendorOptions' : {
4+ 'center' : [ 51.505 , - 0.09 ] ,
5+ 'zoom' : 13
6+ }
7+ } ,
8+ 'layers' : [ {
9+ 'id' : 'mapbox.streets' ,
10+ 'url' : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' ,
11+ 'attribution' : 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
12+ '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
13+ } ]
14+ } ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+ < html lang ="en ">
3+
4+ < head >
5+ < title > BricJS Sample App</ title >
6+ < style >
7+ # mymap {
8+ position : fixed;
9+ right : 0 ;
10+ left : 0 ;
11+ top : 0 ;
12+ bottom : 0 ;
13+ }
14+ </ style >
15+ </ head >
16+
17+ < body >
18+ < div id ="mymap " data-bricjs-component ="map "> </ div >
19+ < script src ="bundle.js "> </ script >
20+ < script >
21+ App . run ( ) ;
22+ </ script >
23+ </ body >
24+
25+ </ html >
Original file line number Diff line number Diff line change 1+ var L = require ( 'leaflet' ) ;
2+
3+ function bricjs ( opts , map ) {
4+ opts . forEach ( function ( l ) {
5+ L . tileLayer ( l . url , {
6+ id : l . id ,
7+ attribution : l . attribution
8+ } ) . addTo ( map ) ;
9+ } ) ;
10+ }
11+
12+ module . exports = bricjs ;
Original file line number Diff line number Diff line change 1+ import 'leaflet/dist/leaflet.css' ;
2+
3+ import bricjs from '@csgis/bricjs-loader' ;
4+ import config from './config.js' ;
5+ import app from './app.json' ;
6+
7+ export { config } ;
8+ export let run = ( ) => bricjs ( config , app . modules , app . deps ) ;
Original file line number Diff line number Diff line change 1+ var L = require ( 'leaflet' ) ;
2+
3+ function bricjs ( opts ) {
4+ return L . map ( opts . parent , opts . vendorOptions ) ;
5+ }
6+
7+ module . exports = bricjs ;
Original file line number Diff line number Diff line change 1+ let path = require ( 'path' ) ;
2+ let CopyWebpackPlugin = require ( 'copy-webpack-plugin' ) ;
3+
4+ module . exports = {
5+ entry : './src/main.js' ,
6+ output : {
7+ path : path . join ( __dirname , 'dist' ) ,
8+ filename : './bundle.js' ,
9+ libraryTarget : 'var' ,
10+ library : 'App'
11+ } ,
12+ devtool : 'inline-source-map' ,
13+ module : {
14+ rules : [ {
15+ test : / \. c s s $ / ,
16+ use : [ 'style-loader' , {
17+ loader : 'css-loader' ,
18+ options : {
19+ minimize : true
20+ }
21+ } ]
22+ } , {
23+ test : / \. ( p n g | j p g | g i f | s v g | e o t | t t f | w o f f | w o f f 2 ) $ / ,
24+ loader : 'url-loader' ,
25+ options : {
26+ limit : 10000
27+ }
28+ } , {
29+ test : / a p p \. j s o n / ,
30+ use : [ '@csgis/json-modules-loader' , {
31+ loader : '@csgis/json-module-args-loader' ,
32+ options : {
33+ args : 'deps' ,
34+ skip : 1
35+ }
36+ } ]
37+ } ] ,
38+ loaders : [ {
39+ test : / \. j s $ / ,
40+ exclude : / n o d e _ m o d u l e s / ,
41+ loader : 'babel-loader' ,
42+ query : {
43+ compact : false
44+ }
45+ } ]
46+ } ,
47+ plugins : [ new CopyWebpackPlugin ( [
48+ { from : 'src/index.html' }
49+ ] ) ]
50+ } ;
You can’t perform that action at this time.
0 commit comments