Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
local-cdn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
local-cdn
Commits
1a6a6195
Commit
1a6a6195
authored
Nov 24, 2017
by
Дмитрий Никулин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not delete everything on update
parent
f9af4d10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
functions.sh
functions.sh
+9
-9
No files found.
functions.sh
View file @
1a6a6195
...
...
@@ -9,12 +9,14 @@ add_package () {
local
main
=
"
$3
"
local
minified
=
"
$4
"
if
[
-e
"packages/
$library
/
$version
"
]
;
then
rm
-rf
"packages/
$library
/
$version
"
echo
"Removed old version (packages/
$library
/
$version
)"
#if [ -e "packages/$library/$version" ]; then
# rm -rf "packages/$library/$version"
# echo "Removed old version (packages/$library/$version)"
#fi
if
!
[
-e
"packages/
$library
/
$version
"
]
;
then
create_package_version
"
$library
"
"
$version
"
echo
"Created packages/
$library
/
$version
/package.json"
fi
create_package_version
"
$library
"
"
$version
"
echo
"Created packages/
$library
/
$version
/package.json"
install_or_update_package
"
$library
"
"
$version
"
create_dist_link
"
$library
"
"
$version
"
"
$main
"
"
$minified
"
echo
"Installed
$library
@
$version
"
...
...
@@ -23,8 +25,8 @@ add_package () {
create_dist_link
()
{
local
library
=
"
$1
"
local
version
=
"
$2
"
local
main
=
"
$3
"
local
minified
=
"
$4
"
local
main
_file
=
"
$3
"
local
m
ain_file_m
inified
=
"
$4
"
public_base
=
"public/
$library
/
$version
"
library_base
=
"packages/
$library
/
$version
/node_modules/
$library
"
...
...
@@ -33,8 +35,6 @@ create_dist_link () {
#if [ -z "$3" ]; then
# main_file=$(npm view "$1" main)
#else
local
main_file
=
"
$3
"
local
main_file_minified
=
"
$4
"
#fi
link_and_print
"
$library_base
/
$main_file_minified
"
"
$public_base
/
$library
.min.js"
link_and_print
"
$public_base
/
$library
.min.js"
"
$public_base
/
$library
.js"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment