forked from api-platform/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-js.sh
executable file
·44 lines (37 loc) · 1.16 KB
/
update-js.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
#!/bin/sh
yarn add --production --no-lockfile swagger-ui-dist es6-promise fetch react react-dom graphiql
dest=src/Bridge/Symfony/Bundle/Resources/public/swagger-ui/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/swagger-ui-dist/swagger-ui-bundle.js $dest
cp node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js $dest
cp node_modules/swagger-ui-dist/swagger-ui.css $dest
dest=src/Bridge/Symfony/Bundle/Resources/public/es6-promise/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/es6-promise/dist/es6-promise.auto.min.js $dest
dest=src/Bridge/Symfony/Bundle/Resources/public/fetch/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/fetch/lib/fetch.js $dest
dest=src/Bridge/Symfony/Bundle/Resources/public/react/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/react/dist/react.min.js $dest
cp node_modules/react-dom/dist/react-dom.min.js $dest
dest=src/Bridge/Symfony/Bundle/Resources/public/graphiql/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/graphiql/graphiql.min.js $dest
cp node_modules/graphiql/graphiql.css $dest
rm -Rf package.json node_modules/