#!/bin/bash

# Creator: Jonatan Nadeau
# Requirement: Bash
# Put this file to the root of "C:\Users\${currentUser}\bin"

# How to use
# Run from lumed-angular-2-.... root projet
echo pwd;
if [[ ! -d $pwd\dist ]];
then
    echo  "There is no dist folder in $pwd";
    echo "Did you run npm packagr?";
else
fi

# CURRENT_PROJECT_DIR=${PWD##*/lumed-angular2-} # I assume every folder project start with: lumed-angular2-
# LUMED_WEB_FRONT_END_NODE_MODULE_LUMED_DIR=$lumed # Absolute path to: LumedWebFrontEnd\node_modules\@lumed
# # You can change this to the absolute path directly instead of using environnement variable

# DIR=$LUMED_WEB_FRONT_END_NODE_MODULE_LUMED_DIR\\$CURRENT_PROJECT_DIR
# if [[ -d $DIR ]];
# then
#     echo "Delete files in $DIR"
#     rimraf $DIR\\*
#     echo "Copy dist folder files of ${PWD##*/} to $LUMED_WEB_FRONT_END_NODE_MODULE_LUMED_DIR\\$CURRENT_PROJECT_DIR";
#     cp -R dist\\. $DIR
# else
#     echo  "$DIR doesn't exist"
# fi

# todo get CURRENT_PROJECT_DIR from current project package.json