-
Notifications
You must be signed in to change notification settings - Fork 17
/
npm.sh
executable file
·52 lines (50 loc) · 1.86 KB
/
npm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
#
######################################################################
# FUNÇÃO SCRIPT.: COPIAR ARQUIVOS PARA O DIRETORIO npm #
# PUBLICAR COMPONENTE NO NPM #
#------------------------------------------------------------------- #
# #
# DESENVOLVIMENTO.: JUAREZ NASATO #
# EMAIL.: JUAREZNASATO@GMAIL.COM #
# DATA CRIACAO.: 11/05/2019 #
# VERSAO.: 0.0.1 #
# #
######################################################################
#
# --> COMANDOS <--
# $ npm login login in npm
# $ sh npm.sh -pk pack
# $ sh npm.sh -pb publish
#
echo "\033[1;36m # # ##### # # ##### # # ##### \033[0m";
echo "\033[1;36m ## # # # ## ## # # # # # # \033[0m";
echo "\033[1;36m # # # # # # ## # # # # # # # \033[0m";
echo "\033[1;36m # # # ##### # # # ### ##### # # ##### \033[0m";
echo "\033[1;36m # ## # # # # # # # # \033[0m";
echo "\033[1;36m # # # # # # # # # # \033[0m";
echo "\033[1;36m # # # # # # ###### ##### \033[0m";
echo
echo "Copiando arquivos...";
cp package.json npm;
cp README.md npm;
cp src/components/* npm;
echo "Copiado.";
if [ $1 = "-pk" ];
then
echo "Empacotando arquivos...";
npm pack ./npm;
echo "Empacotado.";
fi;
if [ $1 = "-pb" ];
then
echo "npm login...";
npm login;
echo "Publicando no npm...";
npm publish ./npm;
echo "Publicado."
fi;
echo "Excluindo arquivos...";
rm npm/*
echo "Arquivos excluidos.";
echo "Fim.";