@@ -0,0 +1,49 @@ | |||
FROM ubuntu:17.10 | |||
MAINTAINER Ray Burgemeestre | |||
RUN apt-get update && \ | |||
apt-get install -y software-properties-common && \ | |||
add-apt-repository ppa:leaningtech-dev/cheerp-ppa && \ | |||
apt-get update | |||
RUN apt-get -y install cheerp-core | |||
#RUN g++ -v | |||
# | |||
#WORKDIR /usr/local/src/ | |||
# | |||
#RUN git clone https://bitbucket.org/rayburgemeestre/starcry | |||
# | |||
#WORKDIR /usr/local/src/starcry/ | |||
# | |||
#RUN git submodule update --init --recursive | |||
# | |||
#RUN echo deb http://apt.llvm.org/artful/ llvm-toolchain-artful-6.0 main >> /etc/apt/sources.list && \ | |||
# echo deb-src http://apt.llvm.org/artful/ llvm-toolchain-artful-6.0 main >> /etc/apt/sources.list && \ | |||
# wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - ; \ | |||
# apt update -y && \ | |||
# apt-get install -y clang-6.0 lldb-6.0 lld-6.0 | |||
# | |||
##RUN bash prepare_ubuntu15.sh initialize | |||
##RUN bash prepare_ubuntu15.sh crtmpserver | |||
##RUN bash prepare_ubuntu15.sh v8 | |||
##RUN bash prepare_ubuntu15.sh allegro | |||
##RUN bash prepare_ubuntu15.sh caf | |||
##RUN bash prepare_ubuntu15.sh boost | |||
##RUN bash prepare_ubuntu15.sh benchmarklib | |||
##RUN bash prepare_ubuntu15.sh fastpfor | |||
##RUN bash prepare_ubuntu15.sh ffmpeg | |||
# | |||
## Use below to run all at once | |||
#RUN /bin/bash -c "set -euxo pipefail; bash prepare_ubuntu15.sh 2>&1 | tee /tmp/install.log" | |||
# | |||
## Use below as sanity check if image is correct | |||
## TODO: is it using clang now or what?? | |||
#RUN /bin/bash -c "set -euxo pipefail; cmake -DSTATIC=1 -DLIB_PREFIX_DIR=/usr/local/src/starcry . && make -j 8 starcry" | |||
# | |||
#WORKDIR /projects/starcry | |||
# | |||
#CMD "/bin/bash" |
@@ -0,0 +1,2 @@ | |||
Followed this readme | |||
https://webpack.js.org/guides/getting-started/ |
@@ -0,0 +1,9 @@ | |||
#docker build --no-cache -t cheerp:latest . | |||
docker build -t cheerp:latest . | |||
#docker build -t sc_build_ubuntu:17.10 ./Ubuntu17.10 | |||
docker login | |||
docker tag cheerp:latest rayburgemeestre/cheerp:latest | |||
echo docker push rayburgemeestre/cheerp:latest | |||
@@ -0,0 +1,12 @@ | |||
<!doctype html> | |||
<html> | |||
<head> | |||
<title>Getting Started</title> | |||
</head> | |||
<body> | |||
<div id="container" style="width:800px; height:600px;"></div> | |||
<script src="main.js"></script> | |||
<div id="my-statusbar"></div> | |||
</body> | |||
</html> | |||
@@ -0,0 +1,24 @@ | |||
{ | |||
"name": "cheerpweb", | |||
"version": "1.0.0", | |||
"description": "Compiler explorer like web interface for Leaning Technologies' Cheerp compiler", | |||
"private": true, | |||
"scripts": { | |||
"test": "echo \"Error: no test specified\" && exit 1", | |||
"build": "webpack" | |||
}, | |||
"author": "", | |||
"license": "ISC", | |||
"devDependencies": { | |||
"webpack": "^4.21.0", | |||
"webpack-cli": "^3.1.2" | |||
}, | |||
"dependencies": { | |||
"css-loader": "^1.0.0", | |||
"lodash": "^4.17.11", | |||
"monaco-editor": "^0.14.3", | |||
"monaco-editor-webpack-plugin": "^1.5.4", | |||
"monaco-vim": "0.0.7", | |||
"style-loader": "^0.23.1" | |||
} | |||
} |
@@ -0,0 +1,21 @@ | |||
import _ from 'lodash'; | |||
import * as monaco from 'monaco-editor'; | |||
import { initVimMode } from 'monaco-vim'; | |||
function component() { | |||
let element = document.createElement('div'); | |||
element.innerHTML = _.join(['Hello', 'webpack'], ' '); | |||
return element; | |||
} | |||
document.body.appendChild(component()); | |||
const editor = monaco.editor.create(document.getElementById('container'), { | |||
value: 'int main() {} ', | |||
language: 'cpp' | |||
}); | |||
const vimMode = initVimMode(editor, document.getElementById('my-statusbar')) | |||
@@ -0,0 +1,20 @@ | |||
const path = require('path'); | |||
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); | |||
module.exports = { | |||
entry: './src/index.js', | |||
output: { | |||
filename: 'main.js', | |||
path: path.resolve(__dirname, 'dist') | |||
}, | |||
module: { | |||
rules: [{ | |||
test: /\.css$/, | |||
use: ['style-loader', 'css-loader'] | |||
}] | |||
}, | |||
plugins: [ | |||
new MonacoWebpackPlugin() | |||
] | |||
}; | |||