Skip to content

Commit edc577c

Browse files
committed
do babel building for production
1 parent 757cc48 commit edc577c

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"env",
55
{
66
"targets": {
7-
"node": "9.5.0"
7+
"node": "current"
88
}
99
}
1010
],

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
*.env
3-
*.log
3+
*.log
4+
/dist/*

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ COPY . .
66

77
RUN yarn install
88

9-
ENTRYPOINT [ "yarn", "start" ]
9+
RUN yarn build
10+
11+
ENTRYPOINT [ "yarn", "serve" ]

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
"dev":
1111
"nodemon -L -e js,graphql src/index.js --exec \"node --require dotenv/config --require babel-register\"",
1212
"lint": "eslint .",
13-
"clean": "rm -rf build && mkdir build",
14-
"build": "babel -d build src -s",
15-
"now-start": "babel-node src/index.js"
13+
"build": "babel src -d dist -s",
14+
"serve": "node dist/index.js"
1615
},
1716
"dependencies": {
1817
"apollo-cache-inmemory": "^1.1.7",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
export default `
12
type Document {
23
editor: String
34
number: String
45
type: String
56
url: String
67
}
8+
`;

src/graphql/schemas/Procedure.graphql renamed to src/graphql/schemas/Procedure.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
enum ProcedureType {
23
PREPARATION
34
VOTING
@@ -24,3 +25,4 @@ type Query {
2425
procedures(type: ProcedureType!, pageSize: Int, offset: Int): [Procedure]
2526
searchProcedures(term: String!): [Procedure]
2627
}
28+
`;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
export default `
12
scalar Date
23
34
type Schema {
45
query: Query
56
}
7+
`;

0 commit comments

Comments
 (0)