Initial commit

This commit is contained in:
osmarks 2017-08-17 12:03:15 +01:00
commit 21d1d2bd83
9 changed files with 4178 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
elm-stuff
node_modules
dist

15
elm-package.json Normal file
View File

@ -0,0 +1,15 @@
{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"./src"
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}

10
index.html Normal file
View File

@ -0,0 +1,10 @@
<html>
<head>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div id="app"></div>
<script src="/app.js"></script>
</body>
</html>

4074
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

16
package.json Normal file
View File

@ -0,0 +1,16 @@
{
"name": "rpncalc",
"version": "1.0.0",
"description": "",
"scripts": {
"build": "webpack -p",
"dev": "webpack-dev-server"
},
"author": "",
"license": "MIT",
"devDependencies": {
"elm-webpack-loader": "^4.3.1",
"webpack": "^3.5.4",
"webpack-dev-server": "^2.7.1"
}
}

25
src/Main.elm Normal file
View File

@ -0,0 +1,25 @@
module Main exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
main = Html.beginnerProgram { model = model, update = update, view = view }
type alias Model =
{ expression : String
, result : List Float
}
model : Model
model = Model "" []
type Msg = ExpressionTyped String
update : Msg -> Model -> Model
update msg model =
model
view : Model -> Html Msg
view model =
div [] []

4
src/index.js Normal file
View File

@ -0,0 +1,4 @@
var Elm = require('./Main.elm');
var mountNode = document.getElementById('app');
var app = Elm.Main.embed(mountNode);

0
style.css Normal file
View File

31
webpack.config.js Normal file
View File

@ -0,0 +1,31 @@
var path = require("path");
module.exports = {
entry: {
app: [
'./src/index.js'
]
},
output: {
path: path.resolve(__dirname + '/dist'),
filename: '[name].js',
},
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
loader: 'elm-webpack-loader?verbose=true&warn=true',
}
],
noParse: /\.elm$/,
},
devServer: {
inline: true,
stats: { colors: true },
},
};