Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
code
Public Stack Site
Commits
f3d22b34
Commit
f3d22b34
authored
Aug 05, 2020
by
alain
🐙
Browse files
build only in production env
parent
654469db
Changes
7
Hide whitespace changes
Inline
Side-by-side
backend/api/about/models/about.js
View file @
f3d22b34
...
...
@@ -5,4 +5,12 @@
* to customize this model
*/
module
.
exports
=
{};
module
.
exports
=
{
lifecycles
:
{
async
afterUpdate
()
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
strapi
.
services
.
util
.
build
()
}
},
},
};
backend/api/alternative/models/alternative.js
View file @
f3d22b34
...
...
@@ -5,4 +5,12 @@
* to customize this model
*/
module
.
exports
=
{};
module
.
exports
=
{
lifecycles
:
{
async
afterUpdate
()
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
strapi
.
services
.
util
.
build
()
}
},
},
};
backend/api/domain/models/domain.js
View file @
f3d22b34
...
...
@@ -8,9 +8,9 @@
module
.
exports
=
{
lifecycles
:
{
async
afterUpdate
()
{
strapi
.
services
.
util
.
build
()
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
strapi
.
services
.
util
.
build
()
}
},
},
};
backend/api/menu-item/models/menu-item.js
View file @
f3d22b34
...
...
@@ -5,4 +5,12 @@
* to customize this model
*/
module
.
exports
=
{};
module
.
exports
=
{
lifecycles
:
{
async
afterUpdate
()
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
strapi
.
services
.
util
.
build
()
}
},
},
};
backend/api/use-case/models/use-case.js
View file @
f3d22b34
...
...
@@ -8,9 +8,9 @@
module
.
exports
=
{
lifecycles
:
{
async
afterUpdate
()
{
strapi
.
services
.
util
.
build
()
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
strapi
.
services
.
util
.
build
()
}
},
},
};
backend/package.json
View file @
f3d22b34
...
...
@@ -5,7 +5,7 @@
"description"
:
"Strapi backend for publicstack.net"
,
"scripts"
:
{
"develop"
:
"strapi develop"
,
"start"
:
"strapi start"
,
"start"
:
"
NODE_ENV=production
strapi start"
,
"build"
:
"strapi build"
,
"strapi"
:
"strapi"
},
...
...
frontend/src/pages/domains.js
View file @
f3d22b34
...
...
@@ -8,14 +8,14 @@ const DomainsPage = ({ data }) => (
<
Layout
>
<
SEO
title
=
"
Domains
"
/>
<
h1
>
Domains
<
/h1
>
<
ul
>
<
div
className
=
"
items
"
>
{
data
.
allStrapiDomain
.
nodes
.
map
(
node
=>
(
<
li
key
=
{
node
.
id
}
>
<
div
key
=
{
node
.
id
}
className
=
"
item
"
>
<
h3
>
{
node
.
title
}
<
/h3
>
<
p
>
{
node
.
description
}
<
/p
>
<
/
li
>
<
/
div
>
))
}
<
/
ul
>
<
/
div
>
<
/Layout
>
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment