Commit bb2b57c9 authored by Scott Ames's avatar Scott Ames
Browse files

added webpack configuration files and entry point (index.js) in src folder

parent 93632aed
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
{
    "singleQuote": true
}
 No newline at end of file
{}

dist/index.html

0 → 100644
+9 −0
Original line number Diff line number Diff line
<!doctype html>
  <html>
   <head>
     <title>Getting Started</title>
   </head>
   <body>
    <script src="main.js"></script>
   </body>
  </html>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
    "url": "https://github.com/CartoCosmos/CartoCosmos.git"
  },
  "scripts": {
    "build": "webpack",
    "lint": "eslint --ext .js src",
    "fix": "npm run lint -- --fix",
    "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}"
@@ -49,6 +50,7 @@
  },
  "dependencies": {
    "leaflet": "^1.6.0",
    "lodash": "^4.17.15",
    "proj4leaflet": "^1.0.2"
  }
}

src/index.js

0 → 100644
+10 −0
Original line number Diff line number Diff line
import _ from 'lodash';
function component() {
  const element = document.createElement('div');

  element.innerHTML = _.join(['Hello', 'Test'], ' ');

  return element;
}

document.body.appendChild(component());

webpack.config.js

0 → 100644
+9 −0
Original line number Diff line number Diff line
const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'main.js',
    path: path.resolve(__dirname, 'dist')
  }
};