Browse Source

Initial version

master
Ray Burgemeestre 6 years ago
commit
4bd7b1021e
8 changed files with 4402 additions and 0 deletions
  1. +49
    -0
      Dockerfile
  2. +2
    -0
      README.md
  3. +9
    -0
      build_docker.sh
  4. +12
    -0
      dist/index.html
  5. +4265
    -0
      package-lock.json
  6. +24
    -0
      package.json
  7. +21
    -0
      src/index.js
  8. +20
    -0
      webpack.config.js

+ 49
- 0
Dockerfile View File

@@ -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"

+ 2
- 0
README.md View File

@@ -0,0 +1,2 @@
Followed this readme
https://webpack.js.org/guides/getting-started/

+ 9
- 0
build_docker.sh View File

@@ -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


+ 12
- 0
dist/index.html View File

@@ -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>


+ 4265
- 0
package-lock.json
File diff suppressed because it is too large
View File


+ 24
- 0
package.json View File

@@ -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"
}
}

+ 21
- 0
src/index.js View File

@@ -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'))


+ 20
- 0
webpack.config.js View File

@@ -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()
]
};


Loading…
Cancel
Save