Skip to content

Commit

Permalink
#43 Updating webpack and playground
Browse files Browse the repository at this point in the history
  • Loading branch information
mavarazy committed Dec 10, 2018
1 parent cac1f5b commit 62732f7
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 84 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"sinon": "^7.2.0",
"style-loader": "^0.23.1",
"webpack": "^4.27.1",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10",
"webpack-hot-middleware": "^2.19.1"
},
Expand Down
81 changes: 3 additions & 78 deletions playground/app/conf/index.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,7 @@
const schema = {
type: "object",
title: "Encounter",
required: ["firstName", "password", "nickName"],
properties: {
encounter: {
type: "string",
title: "Encounter",
},
firstName: {
type: "string",
title: "First name",
},
lastName: {
type: "string",
title: "Last name",
},
age: {
type: "integer",
title: "Age",
},
nickName: {
type: "string",
title: "nickname",
},
bio: {
type: "string",
title: "Bio",
},
password: {
type: "string",
title: "Password",
minLength: 3,
},
telephone: {
type: "string",
title: "Telephone",
minLength: 10,
},
},
};

const uiSchema = {
encounter: {
nav: "Encounter",
},
firstName: {
nav: "First name",
},
lastName: {
nav: "Last name",
},
age: {
nav: "Age",
},
nickName: {
type: "string",
nav: "nickname",
},
bio: {
type: "string",
nav: "Bio",
},
password: {
type: "string",
nav: "Password",
minLength: 3,
},
telephone: {
nav: "Telephone",
},
};
import schema from "./schema.json";
import uiSchema from "./uiSchema.json";

const formData = {
encounter: "Some",
lastName: "",
firstName: "",
age: 20,
};
const formData = {};

export default {
schema,
Expand Down
45 changes: 45 additions & 0 deletions playground/app/conf/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"type": "object",
"title": "Encounter",
"required": [
"firstName",
"password",
"nickName"
],
"properties": {
"encounter": {
"type": "string",
"title": "Encounter"
},
"firstName": {
"type": "string",
"title": "First name"
},
"lastName": {
"type": "string",
"title": "Last name"
},
"age": {
"type": "integer",
"title": "Age"
},
"nickName": {
"type": "string",
"title": "nickname"
},
"bio": {
"type": "string",
"title": "Bio"
},
"password": {
"type": "string",
"title": "Password",
"minLength": 3
},
"telephone": {
"type": "string",
"title": "Telephone",
"minLength": 10
}
}
}
30 changes: 30 additions & 0 deletions playground/app/conf/uiSchema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"encounter": {
"nav": "Encounter"
},
"firstName": {
"nav": "First name"
},
"lastName": {
"nav": "Last name"
},
"age": {
"nav": "Age"
},
"nickName": {
"type": "string",
"nav": "nickname"
},
"bio": {
"type": "string",
"nav": "Bio"
},
"password": {
"type": "string",
"nav": "Password",
"minLength": 3
},
"telephone": {
"nav": "Telephone"
}
}
6 changes: 3 additions & 3 deletions webpack.config.dist.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var webpack = require("webpack");
var path = require("path");
const webpack = require('webpack');
const path = require('path');

module.exports = {
cache: true,
Expand Down Expand Up @@ -29,7 +29,7 @@ module.exports = {
}
},
module: {
loaders: [
rules: [
{
test: /\.js$/,
loaders: ["babel-loader"],
Expand Down
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
var path = require("path");
var webpack = require("webpack");
const path = require('path');
const webpack = require('webpack');

module.exports = {
mode: 'development',
devtool: "eval-source-map",
entry: [
"./playground/app",
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var webpack = require("webpack");
var ExtractTextPlugin = require("extract-text-webpack-plugin");

module.exports = {
mode: 'development',
entry: path.join(__dirname, "playground/app"),
output: {
path: path.join(__dirname, "build"),
Expand All @@ -24,7 +25,7 @@ module.exports = {
extensions: [".js", ".jsx", ".css"],
},
module: {
loaders: [
rules: [
{
test: /\.jsx?$/,
loader: "babel-loader",
Expand Down

0 comments on commit 62732f7

Please sign in to comment.