You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
595 B
18 lines
595 B
|
|
COMPDIR="components/$2"
|
|
|
|
if [ ${1} = "add" ]
|
|
then
|
|
mkdir $COMPDIR
|
|
printf "<div class=\"component-$2\">\n <div class=\"row no-gutters\">\n </div>\n</div>" > "$COMPDIR/$2.html"
|
|
printf "@import \"../../src/scss/variables.scss\";\n@import \"../../src/scss/mixins.scss\";\n \n.component-$2 {\n\n}" > "$COMPDIR/$2.scss"
|
|
printf "\n\$(document).ready( () => {\n console.log('Load component - $2')\n\n})" > "$COMPDIR/$2.js"
|
|
echo "@import \"./components/$2/$2.scss\";" >> src/scss/main.scss
|
|
fi
|
|
|
|
if [ ${1} = "del" ]
|
|
then
|
|
rm -rf $COMPDIR
|
|
sed -i "\/$2\/$2.scss/d" src/scss/main.scss
|
|
fi
|
|
|