Skip to content

Commit

Permalink
Merge pull request #36 from berdal84/react
Browse files Browse the repository at this point in the history
React
  • Loading branch information
berdal84 committed Jul 15, 2022
2 parents f7fb09e + 9a0ee52 commit 60ed28e
Show file tree
Hide file tree
Showing 157 changed files with 52,448 additions and 23,329 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -26,4 +26,4 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build-front
- run: npm run build
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
**/dist
**/build
/dev
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules
**/node_modules

# profiling files
chrome-profiler-events*.json
Expand Down Expand Up @@ -41,6 +42,4 @@ testem.log
Thumbs.db

# should never be commited
src/backend/config.php
src/backend/config.prod.php
src/backend/config.dev.php
projects/backend/conf/config.*.php
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

# Jeu de mots (Angular 2+ version)
# Jeu de mots (PHP Backend, Angular/React Front-ends)

<a href="https://github.com/berdal84/jeudemots-ng/actions?query=workflow Node.js CI" title="ng build">
<img src="https://github.com/berdal84/jeudemots-ng/workflows/Node.js CI/badge.svg" />
</a>

This is the source repository for the website [www.relativementutile.fr/jeudemots](https://www.relativementutile.fr/jeudemots)
This is the source repository for the website [www.relativementutile.fr/jeudemots](https://www.relativementutile.fr/jeudemots).

This repository contains source code for different part of the project:
- projects/backend: PHP sources for the backend part.
- projects/frontend-ng: Angular project (initial front-end)
- projects/frontend-react: React project (wip front-end, learning...)

WIP React Front-end: [www.relativementutile.fr/jeudemots-react](https://www.relativementutile.fr/jeudemots-react).

# History
This project was first (old repository is [here](https://www.github.com/berdal84/jeudemots)) developped using AngularJS 1.7.x and has been translated for Angular 2+.
Expand Down
59 changes: 59 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

ERRC=0;

error(){
echo "ERROR: " $1;
ERRC=${ERRC+1};
}

echo "Packing files ..."

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

cd ${SCRIPT_DIR};


BASE_DIR=dist
NG_DIR=${BASE_DIR}/jeudemots
REACT_DIR=${BASE_DIR}/jeudemots-react
BACKEND_DIR=${BASE_DIR}/jeudemots-api

rm -rf ${BASE_DIR}

# Backend
mkdir -p ${BACKEND_DIR}
cp -vr projects/backend/build/* ${BACKEND_DIR} && echo "Backend OK" || (echo "Unable to copy Backend files!" && exit )

# FrontEnd Angular

mkdir -p ${NG_DIR}

if( cp -vr projects/frontend-ng/build/* ${NG_DIR} )
then
echo "Front (Angular) OK";
else
error "Unable to copy Angular files!" ;
fi

# FrontEnd React

mkdir -p ${REACT_DIR}

if( cp -vr projects/frontend-react/build/* ${REACT_DIR} )
then
echo "Front (React) OK";
else
error "Unable to copy React files!";
fi

# Check errors and exit
if [[ "${ERRC}" -eq "0" ]];
then
echo "Packing OK - output: ${SCRIPT_DIR}/${BASE_DIR}"
exit
fi

echo "Packing ERROR! (check logs above)"
exit 1

Loading

0 comments on commit 60ed28e

Please sign in to comment.