Skip to content

Commit

Permalink
dependency bump, including webpack2 (#111)
Browse files Browse the repository at this point in the history
* dependency bump, including webpack2

* simplified wercker script - moved back to java box
* updated spring boot, gradle, and all npm dependencies
  • Loading branch information
gambtho committed Feb 27, 2017
1 parent de85467 commit de0dc72
Show file tree
Hide file tree
Showing 12 changed files with 5,463 additions and 85 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v7.4.0
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
springBootVersion = '1.4.2.RELEASE'
springBootVersion = '1.5.1.RELEASE'
}
repositories {
mavenCentral()
Expand Down Expand Up @@ -71,7 +71,7 @@ eclipse {
}

task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
gradleVersion = '3.4'
}

project.tasks.processResources.dependsOn('npmInstall')
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Oct 28 10:50:11 CDT 2016
#Mon Feb 27 10:17:20 EST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip
22 changes: 15 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
2 changes: 1 addition & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ applications:
- name: willitconnect
memory: 1G
path: build/libs/willitconnect-1.0.10.jar
buildpack: https://github.com/cloudfoundry/java-buildpack#v3.10
buildpack: https://github.com/cloudfoundry/java-buildpack#v3.13

78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,21 @@
"description": "Will It Connect?",
"main": "index.js",
"dependencies": {
"babel-core": "^6.21.0",
"babel-loader": "^6.2.10",
"babel-polyfill": "^6.20.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"babel-preset-stage-2": "^6.18.0",
"babel-runtime": "^6.20.0",
"bootstrap": "^3.3.7",
"bootstrap-webpack": "0.0.5",
"css-loader": "^0.26.1",
"exports-loader": "^0.6.3",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"imports-loader": "^0.7.0",
"isomorphic-fetch": "^2.2.1",
"jquery": "^3.1.1",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"less": "^2.7.2",
"lodash": "^4.17.4",
"octicons": "^5.0.1",
"react": "^15.4.1",
"react": "^15.4.2",
"react-bootstrap": "^0.30.7",
"react-dom": "^15.4.1",
"react-dom": "^15.4.2",
"react-model": "0.0.0",
"react-redux": "^5.0.1",
"react-redux": "^5.0.3",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0",
"superagent": "^3.3.1",
"testdouble": "^1.10.1"
"redux-thunk": "^2.2.0",
"superagent": "^3.5.0"
},
"scripts": {
"test": "karma start --single-run",
Expand Down Expand Up @@ -62,38 +47,53 @@
},
"homepage": "https://github.com/krujos/willitconnect#readme",
"devDependencies": {
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.18.0",
"babel-loader": "^6.3.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-es2015-native-modules": "^6.9.4",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-2": "^6.22.0",
"babel-runtime": "^6.23.0",
"chai": "^3.5.0",
"enzyme": "^2.6.0",
"eslint": "^3.12.2",
"eslint-config-airbnb": "^13.0.0",
"css-loader": "^0.26.2",
"enzyme": "^2.7.1",
"eslint": "^3.16.1",
"eslint-config-airbnb": "^14.1.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^2.2.3",
"eslint-plugin-react": "^6.8.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.10.0",
"expect": "^1.20.2",
"karma": "^1.3.0",
"exports-loader": "^0.6.4",
"expose-loader": "^0.7.3",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.10.1",
"imports-loader": "^0.7.1",
"karma": "^1.5.0",
"karma-babel-preprocessor": "^6.0.1",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.1",
"karma-mocha-reporter": "^2.2.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-sinon": "^1.0.5",
"karma-sinon-chai": "^1.2.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"lolex": "^1.5.2",
"karma-webpack": "^2.0.2",
"less-loader": "^2.2.3",
"lolex": "^1.6.0",
"mocha": "^3.2.0",
"phantomjs-prebuilt": "^2.1.14",
"react-addons-test-utils": "^15.4.1",
"react-addons-test-utils": "^15.4.2",
"react-test-utils": "0.0.1",
"react-testutils-additions": "^15.1.0",
"redux-devtools": "^3.3.1",
"sinon": "^1.17.6",
"redux-devtools": "^3.3.2",
"sinon": "^1.17.7",
"sinon-chai": "^2.8.0",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^1.14.0"
"style-loader": "^0.13.2",
"testdouble": "^1.11.1",
"url-loader": "^0.5.8",
"webpack": "^2.2.1"
}
}
11 changes: 4 additions & 7 deletions src/test/java/willitconnect/WillItConnectApplicationTest.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package willitconnect;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = WillItConnectApplication.class)
@WebAppConfiguration
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT)
public class WillItConnectApplicationTest {

@Test
Expand Down
42 changes: 32 additions & 10 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const path = require('path');
const debug = process.env.NODE_ENV !== "production";
const webpack = require('webpack');

module.exports = {
context: __dirname,
entry: [
'babel-polyfill',
"./src/main/script/Index.js"
Expand All @@ -11,25 +14,44 @@ module.exports = {
},
module: {
loaders: [
{ test: /\.css$/, exclude: '/node_modules/', loader: "style!css" },
{ test: /\.(js|jsx|es6)$/, exclude: /node_modules/, loader: 'babel',
{ test: /\.css$/, exclude: '/node_modules/', loader: 'style-loader!css-loader' },
{ test: /\.(js|jsx|es6)$/, exclude: /node_modules/, loader: 'babel-loader',
query: {
plugins: ['transform-runtime'],
presets: ['react','es2015', 'stage-0']
presets: ['react', 'stage-2', 'es2015']
}
},
{ test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff'},
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream'},
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file'},
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'}
{ test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff'},
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=application/octet-stream'},
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'},
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=image/svg+xml'}

]
},
resolve: {
moduleDirectories: [
modules: [
path.join(__dirname, `node_modules`),
path.join("./src/main/script/Index.js")
],
extensions: [``, `.js`]
}
extensions: [`.js`, `.jsx`]
},
plugins: debug ? [] : [
new webpack.optimize.UglifyJsPlugin({
mangle: false,
sourcemap: false,
compress: {
warnings: false,
screw_ie8: true,
conditionals: true,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
}
})
],
};

17 changes: 6 additions & 11 deletions wercker.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
box: rowanto/docker-java8-mvn-nodejs-npm
box: java
# Build definition
build:
# The steps that will be executed on build
steps:
- bigtruedata/install-node:
version: 7.6.0
- script:
name: show base information
code: |
./gradlew -v
javac -version
node -v
javac -version
export
- script:
name: install node
code: |
npm cache clean -f
npm -g install npm@next
npm install -g n
n latest
node -v
- npm-install
- script:
name: run tests
code: |
./gradlew --full-stacktrace -q --project-cache-dir=$WERCKER_CACHE_DIR test
- script:
name: run build
code: |
export NODE_ENV=production
./gradlew --full-stacktrace -q --project-cache-dir=$WERCKER_CACHE_DIR build
deploy:
steps:
- dlapiduz/cloud-foundry-deploy:
Expand Down
Loading

0 comments on commit de0dc72

Please sign in to comment.