commit f46bd8ac12422da708ef2519fa16d7913fee2b41 Author: Nathan Bergey Date: Sat Jan 19 17:10:11 2019 -0500 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24c456a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +dist/*.js +dist/*.css +dist/*.xml diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..f6a3595 --- /dev/null +++ b/README.markdown @@ -0,0 +1,2 @@ +Weather Dashboard +================= diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..01288a5 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,10 @@ + + + + Getting Started + + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..446021e --- /dev/null +++ b/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" + } +} diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..d821648 --- /dev/null +++ b/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) +}) diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..2daae3a --- /dev/null +++ b/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') + } +};