2018-01-09 07:36:02 +00:00
|
|
|
#!/bin/bash
|
|
|
|
if [ ! -e SheetJSIonic ]; then
|
|
|
|
ionic start SheetJSIonic blank --cordova --no-git --no-link </dev/null
|
|
|
|
cd SheetJSIonic
|
|
|
|
ionic cordova platform add browser </dev/null
|
|
|
|
ionic cordova platform add ios </dev/null
|
|
|
|
ionic cordova plugin add cordova-plugin-file </dev/null
|
2018-02-03 20:46:32 +00:00
|
|
|
npm install --save @ionic-native/file
|
2018-01-09 07:36:02 +00:00
|
|
|
npm install --save xlsx
|
|
|
|
|
|
|
|
cp src/app/app.module.ts{,.bak}
|
|
|
|
cat src/app/app.module.ts.bak | awk 'BEGIN{p=0} !/import/ && !p { ++p; print "import { File } from '"'"'@ionic-native/file'"'"';"; } 1; /providers: \[/ {print " File,"}' > src/app/app.module.ts
|
|
|
|
cd -
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp ionic.ts SheetJSIonic/src/pages/home/home.ts
|
|
|
|
rm -f SheetJSIonic/src/pages/home/home.html
|