Commit fc7fb1f 1 parent 0c5c4fd commit fc7fb1f Copy full SHA for fc7fb1f
File tree 2 files changed +19
-11
lines changed
2 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 3
3
4
4
set -e
5
5
6
- npm run prod
6
+ container_id= $( docker ps -q -f name=dcmp-public ) ;
7
7
8
- git status --porcelain | cut -c 3- | while read -r line; do
8
+ if [ ! " $container_id " ]; then
9
+ echo " Docker Containers are not running. Use: 'docker compose up -d public'"
10
+ exit 1;
11
+ fi
12
+
13
+ eval " docker exec -d $container_id npm run production --workspaces" ;
14
+
15
+ git restore --staged .
16
+
17
+ git status --porcelain | cut -c 3- | grep -E " ^.public/" | while read -r line; do
9
18
git add " $line " ;
10
19
done
11
20
12
- if [ -n " $( git status --porcelain ) " ]; then
21
+ if [ -n " $( git diff --name-only --cached ) " ]; then
13
22
git commit -m " Assets recompiled for production"
14
23
fi
Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"scripts" : {
4
- "dev" : " cd ./resources/views/themes/bimbala && npm run dev" ,
5
- "development" : " cd ./resources/views/themes/bimbala && npm run dev" ,
6
- "watch" : " cd ./resources/views/themes/bimbala && npm run watch" ,
7
- "watch-poll" : " cd ./resources/views/themes/bimbala && npm run watch-poll" ,
8
- "hot" : " cd ./resources/views/themes/bimbala && npm run hot" ,
9
- "prod" : " npm run production" ,
10
- "production" : " cd ./resources/views/themes/bimbala && npm run production" ,
4
+ "dev" : " mix" ,
5
+ "watch" : " mix watch" ,
6
+ "watch-poll" : " mix watch -- --watch-options-poll=1000" ,
7
+ "hot" : " mix watch --hot" ,
8
+ "production" : " mix --production" ,
11
9
"prepare" : " husky install"
12
10
},
13
11
"devDependencies" : {
16
14
"laravel-mix" : " ^6.0.6" ,
17
15
"lodash" : " ^4.17.19" ,
18
16
"postcss" : " ^8.1.14"
19
- }
17
+ },
18
+ "workspaces" : [ " ./resources/views/themes/bimbala" ]
20
19
}
You can’t perform that action at this time.
0 commit comments