#!/bin/bash

cd $(dirname "$0")/..

sourceDir=dist/public/*
jsSourceDir=dist/js/
scssSourdeDir=pwa/scss/

rm -rf src/scss/lib

mkdir -p src/js/lib/
mkdir -p src/scss/lib/



for d in "vendor/ainias/pwa"*/; do

    find $d$jsSourceDir -name '*.js' -exec cp -r '{}' src/js/lib/ \;
    find $d$scssSourdeDir -name '*.scss' -exec cp -r '{}' src/scss/lib/ \;
    cp -r -R $d$sourceDir public/
done

node bin/concatTranslator.js
node bin/createImportScss.js

bin/build.sh