forked from api-platform/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-js.sh
More file actions
executable file
·37 lines (31 loc) · 1.02 KB
/
update-js.sh
File metadata and controls
executable file
·37 lines (31 loc) · 1.02 KB
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
#!/bin/sh
yarn add --production --no-lockfile swagger-ui-dist es6-promise fetch react react-dom graphiql redoc
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/react/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/react/umd/react.production.min.js $dest
cp node_modules/react-dom/umd/react-dom.production.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
dest=src/Bridge/Symfony/Bundle/Resources/public/redoc/
if [ -d $dest ]; then
rm -Rf $dest
fi
mkdir -p $dest
cp node_modules/redoc/bundles/redoc.standalone.js $dest
rm -Rf package.json node_modules/