Browse Source

init

master
Nathan Bergey 6 years ago
commit
f46bd8ac12
  1. 4
      .gitignore
  2. 2
      README.markdown
  3. 10
      dist/index.html
  4. 22
      package.json
  5. 9
      src/index.js
  6. 9
      webpack.config.js

4
.gitignore

@ -0,0 +1,4 @@
node_modules
dist/*.js
dist/*.css
dist/*.xml

2
README.markdown

@ -0,0 +1,2 @@
Weather Dashboard
=================

10
dist/index.html

@ -0,0 +1,10 @@
<!doctype html>
<html>
<head>
<title>Getting Started</title>
</head>
<body>
<svg id="chart"></svg>
<script src="main.js"></script>
</body>
</html>

22
package.json

@ -0,0 +1,22 @@
{
"name": "weather-board",
"version": "1.0.0",
"description": "Pretty dashboard for NWS forcast data",
"private": true,
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"clean": "rm -f dist/*.js && rm -f dist/*.css",
"build": "webpack --mode production"
},
"author": "Nathan Bergey",
"license": "MIT",
"dependencies": {
"d3": "^5.7.0",
"d3-fetch": "^1.1.2"
},
"devDependencies": {
"webpack": "^4.28.4",
"webpack-cli": "^3.2.1"
}
}

9
src/index.js

@ -0,0 +1,9 @@
var d3 = require('d3')
let canvas = d3.select('svg')
//const url = 'https://forecast.weather.gov/MapClick.php?lat=39.9243509&lon=-75.1696126&FcstType=digitalDWML'
const url = '/forcast.xml'
d3.xml(url).then(function(xmldoc) {
console.log(xmldoc)
})

9
webpack.config.js

@ -0,0 +1,9 @@
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
}
};
Loading…
Cancel
Save