Skip to content

Commit da0d7e7

Browse files
committed
Begin open sourcing front end code for stubbornjava
1 parent 2a366b2 commit da0d7e7

84 files changed

Lines changed: 3323 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ config.local.properties
1616
gradlew
1717
gradlew.bat
1818

19-
ui/node_modules
20-
ui/assets
19+
**/ui/node_modules
20+
**/ui/assets

‎build.gradle‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ allprojects {
3737

3838
// Auto force all of our explicit dependencies.
3939
libs.each { k, v -> force(v) }
40-
40+
force('io.reactivex:rxjava:1.1.2')
41+
force('com.google.code.gson:gson:2.6.2')
42+
force('commons-logging:commons-logging:1.2')
43+
4144
// cache dynamic versions for 10 minutes
4245
cacheDynamicVersionsFor 10*60, 'seconds'
4346
// don't cache changing modules at all

‎settings.gradle‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
// {{start:settings}}
22
rootProject.name = 'stubbornjava-parent'
33

4-
include ':stubbornjava-undertow', ':stubbornjava-common', ':stubbornjava-examples'
4+
include ':stubbornjava-undertow'
5+
include ':stubbornjava-common'
6+
include ':stubbornjava-examples'
7+
include ':stubbornjava-webapp'
8+
9+
def rootProjectDescriptor = settings.rootProject
10+
settings.createProjectDescriptor(rootProjectDescriptor, 'stubbornjava-private', file('../stubbornjava'))
511
// {{end:settings}}

‎stubbornjava-webapp/build.gradle‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// {{start:dependencies}}
2+
dependencies {
3+
// Project reference
4+
compile project(':stubbornjava-undertow')
5+
compile project(':stubbornjava-common')
6+
compile project(':stubbornjava-private')
7+
8+
testCompile libs.junit
9+
}
10+
11+
shadowJar {
12+
baseName = 'stubbornjava-all'
13+
classifier = null
14+
version = null
15+
}
16+
17+
sourceSets {
18+
main {
19+
java {
20+
srcDirs = ["src/main/java"]
21+
}
22+
resources {
23+
srcDirs = ["src/main/resources", "ui/assets"]
24+
}
25+
}
26+
}
27+
28+
// {{end:dependencies}}

‎stubbornjava-webapp/deploy.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# Much less than ideal deploy script but it works enough for now.
3+
# Ideally it would keep versioned jars and symlink the current version for easy rollbacks
4+
# Another option is to use AWS code build / deploy eventually
5+
cd .. && gradle clean shadowJar &&
6+
ansible -i ansible/hosts stubbornjava -m copy -a "src=build/libs/stubbornjava-all.jar dest=~/" &&
7+
ansible -i ansible/hosts stubbornjava -m command -a "supervisorctl restart all"
52.1 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Apr 25 09:06:46 EDT 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = 'stubbornjava-webapp'
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "StubbornJava",
3+
"description": "StubbornJava",
4+
"author": "",
5+
"dependencies": {
6+
"anchor-js": "^3.2.1",
7+
"bootstrap": "^4.0.0-alpha.6",
8+
"font-awesome": "^4.5.0",
9+
"jquery": "^3.1.0",
10+
"prismjs": "^1.6.0"
11+
},
12+
"devDependencies": {
13+
"babel": "^6.23.0",
14+
"babel-core": "^6.23.1",
15+
"babel-loader": "^6.3.2",
16+
"babel-preset-es2015": "^6.22.0",
17+
"copy-webpack-plugin": "^4.0.1",
18+
"css-loader": "^0.26.1",
19+
"exports-loader": "^0.6.3",
20+
"extract-text-webpack-plugin": "^2.0.0-rc.3",
21+
"file-loader": "^0.10.0",
22+
"imports-loader": "^0.7.0",
23+
"node-sass": "^4.5.0",
24+
"optimize-css-assets-webpack-plugin": "^1.3.0",
25+
"raw-loader": "^0.5.1",
26+
"resolve-url-loader": "^2.0.0",
27+
"sass-loader": "^6.0.1",
28+
"style-loader": "^0.13.1",
29+
"url-loader": "^0.5.7",
30+
"webpack": "^2.2.1",
31+
"webpack-config": "^7.0.0"
32+
},
33+
"scripts": {}
34+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import $ from 'jquery';
2+
import AnchorJS from 'anchor-js';
3+
4+
// Bootstrap
5+
import 'bootstrap/scss/bootstrap.scss';
6+
import 'bootstrap/js/src/dropdown.js';
7+
8+
// PrismJs for code highlighting
9+
import Prism from 'prismjs';
10+
import 'prismjs/components/prism-java.js';
11+
//import 'prism-themes/themes/prism-base16-ateliersulphurpool.light.css';
12+
import 'prismjs/themes/prism-coy.css';
13+
import 'prismjs/plugins/toolbar/prism-toolbar.js';
14+
import 'prismjs/plugins/toolbar/prism-toolbar.css';
15+
import 'prismjs/plugins/show-language/prism-show-language.js';
16+
//import 'prismjs/plugins/show-language/prism-show-language.css';
17+
import 'prismjs/plugins/line-numbers/prism-line-numbers.js';
18+
import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
19+
20+
import 'font-awesome/scss/font-awesome.scss';
21+
22+
import './prism-coy-override.scss';
23+
24+
// Anchors stuff
25+
var anchors = new AnchorJS();
26+
anchors.options = {
27+
placement: 'left'
28+
};
29+
anchors.add('.anchored');
30+
31+
Prism.highlightAll();
32+
33+
$(document).ready(function() {
34+
// $('pre code').each(function(i, block) {
35+
// //console.log(block);
36+
// hljs.highlightBlock(block);
37+
// });
38+
});

0 commit comments

Comments
 (0)