Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
374efbd
Setup webpack, loaders, and build process
sabicalija Mar 13, 2019
c5344db
Remove merge conflicts
sabicalija Mar 13, 2019
cb7a8e4
Remove legacy from index.html template: css, favicon
sabicalija Mar 13, 2019
d35c884
Install external dependencies
sabicalija Mar 13, 2019
356be44
Create src/, add webACS.js
sabicalija Mar 13, 2019
490cd8c
Migrate dependencies and import functions needed in webACS.js (and th…
sabicalija Mar 14, 2019
eb3d53f
Migrate most of the original WebACS functionality. Thorough testing f…
sabicalija Mar 15, 2019
0c2bda5
Remove rest of global access (ACS), move tests to src subfolder
sabicalija Mar 15, 2019
c55a15e
Remove old image location
sabicalija Mar 15, 2019
7b31fda
Remove rest of global access (ACS), move tests to src subfolder
sabicalija Mar 15, 2019
839da4d
Change test framework from QUnit to jest, migrate all test, implement…
sabicalija Mar 16, 2019
07824d2
Move pretty-data to dev dependencies
sabicalija Mar 16, 2019
8394a31
Remove obsolete files
sabicalija Mar 16, 2019
3257737
Move stylesheet to assets folder
sabicalija Mar 16, 2019
a310628
Add draft Jenkinsfile
sabicalija Mar 16, 2019
6afcaf6
Add yarn install step
sabicalija Mar 16, 2019
21422d7
Install http-server, host files
sabicalija Mar 16, 2019
431d7ea
Jenkinsfile: Change http-server install location
sabicalija Mar 16, 2019
5f3b039
Jenkinsfile: Change http-server install location
sabicalija Mar 16, 2019
049cbe0
Jenkinsfile: correct http-server call
sabicalija Mar 16, 2019
d45374e
Jenkinsfile: add step Bundle
sabicalija Mar 16, 2019
98b69a1
Jenkinsfile: move step Test to front
sabicalija Mar 16, 2019
007423b
Jenkinsfile: change zip command (FIXME: no cross-env support)
sabicalija Mar 16, 2019
46d68bb
Jenkinsfile: host assets resources directory for test
sabicalija Mar 16, 2019
ef65f89
Jenkinsfile: move step Build to front
sabicalija Mar 16, 2019
e9fd631
Jenkinsfile: install zip in docker container
sabicalija Mar 16, 2019
a1cb2d0
Jenkinsfile: change http-server kill command
sabicalija Mar 16, 2019
cd1016f
Jenkinsfile: remove unnecessary bin folder creation
sabicalija Mar 16, 2019
d837ce8
Jenkinsfile: remove kill command
sabicalija Mar 16, 2019
ea844e8
Jenkinsfile: remove zip section
sabicalija Mar 16, 2019
4ef5043
Jenkinsfile: correct archive source
sabicalija Mar 16, 2019
337d620
Change to different agent per stage, rename stage Bundle to Deploy
sabicalija Mar 17, 2019
ab55468
Jenkinsfile: correct archive name
sabicalija Mar 17, 2019
6ede41f
Jenkinsfile: add stage Cleanup, change zip folder creation to use onl…
sabicalija Mar 17, 2019
57760da
Jenkinsfile: remove post steps
sabicalija Mar 17, 2019
025b4cf
Jenkinsfile: create file for pipeline
sabicalija Mar 20, 2019
851cfb2
Jenkinsfile: correct build stage
sabicalija Mar 20, 2019
72ef080
Jenkinsfile: remove post actions
sabicalija Mar 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
"@babel/preset-env"
],
"env": {
"test": {
"plugins": ["transform-imports"]
}
}
}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Ignore
node_modules/
dist/

classdiagram_v2.dia.autosave
classdiagram_v2.dia~
view/images/Thumbs.db
Documentation/Quickstart/pic/Thumbs.db
*.iml

# Allow
77 changes: 77 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

pipeline {
parameters {
choice(name: 'destination', description: 'Destination folder', choices: ['asterics-web-devlinux/WebACS', 'asterics-web-devwindows/WebACS', 'asterics-web-production/WebACS' ])
choice(name: 'agent', description: 'Agent', choices: ['Linux', 'Win'])
choice(name: 'image', description: 'Docker Image', choices: ['node:10', 'node:11'])
gitParameter(name: 'BRANCH', branchFilter: 'origin.*?/(.*)', defaultValue: 'master', type: 'PT_BRANCH_TAG', useRepository: 'WebACS')
}
agent none
stages {
stage('Cleanup') {
agent {
label params.agent
}
steps {
deleteDir()
}
}
stage('Build') {
agent {
docker {
image params.image
label params.agent
}
}
steps {
sh '''
yarn install
yarn build
'''
}
}
stage('Test') {
agent {
docker {
image params.image
label params.agent
}
}
steps {
sh '''
yarn global add http-server --prefix deps/
./deps/bin/hs dist/ &
yarn test
'''
}
}
stage('Archive') {
agent {
label params.agent
}
steps {
sh 'cd dist && zip -r ../WebACS.zip *'
archiveArtifacts artifacts: 'WebACS.zip', fingerprint: true
}
}
stage('Deploy') {
environment {
SERVER = credentials('server')
}
agent {
label params.agent
}
steps {
sh '''
mkdir build
mv dist build/WebACS
'''
script {
def remote = [ name: 'studyathome', host: 'studyathome.technikum-wien.at', user: env.SERVER_USR, password: env.SERVER_PSW, allowAnyHosts: true ]
sshRemove remote: remote, path: "/var/www/html/${params.destination}", failOnError: false
sshPut remote: remote, from: 'build/WebACS', into: "/var/www/html/${params.destination.replace("/WebACS", "")}"
}
}
}
}
}
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed favicons/android-chrome-192x192.png
Diff not rendered.
Binary file removed favicons/apple-touch-icon.png
Diff not rendered.
9 changes: 0 additions & 9 deletions favicons/browserconfig.xml

This file was deleted.

Binary file removed favicons/favicon-16x16.png
Diff not rendered.
Binary file removed favicons/favicon-32x32.png
Diff not rendered.
Binary file removed favicons/favicon.ico
Binary file not shown.
18 changes: 0 additions & 18 deletions favicons/manifest.json

This file was deleted.

Binary file removed favicons/mstile-150x150.png
Diff not rendered.
23 changes: 0 additions & 23 deletions favicons/safari-pinned-tab.svg
Diff not rendered.
213 changes: 101 additions & 112 deletions index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import "webpack-jquery-ui";
import "webpack-jquery-ui/css";

import "./src/assets.js";

import "./assets/css/webACS.css";

import webACS from "./src/webACS.js";

// import "./node_modules/jquery-ui/ui/"

webACS();
20 changes: 20 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
collectCoverageFrom: ['src/**/*.{js,jsx,mjs}'],
verbose: true,
setupFiles: [
"<rootDir>/jest.setup.js",
"jest-canvas-mock"
],
testURL: 'http://localhost:8080',
transformIgnorePatterns: ['<rootDir>/node_modules/'],
testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
testPathIgnorePatterns: ['\\\\node_modules\\\\'],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
beforeParse (window) {
window.alert = (msg) => { console.warn(msg); };
window.matchMedia = () => ({});
window.scrollTo = () => { };
}
},
}
13 changes: 13 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import fs from "fs";
import path from "path";

import $ from "jquery";

global.$ = global.jQuery = $;


import { JSDOM } from "jsdom";

const doc = fs.readFileSync(path.join(__dirname, "src/tests/index.html"),"utf-8");
const dom = new JSDOM(doc);
global.document.body.innerHTML = dom.window.document.body.innerHTML;
Loading