Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mys.command("yarn add --dev create-react-app")
if self._js_runtime == "--javascript":
mys.command("./node_modules/.bin/create-react-app shell")
else:
mys.command("./node_modules/.bin/create-react-app --scripts-version=react-scripts-ts shell")
logger.update("Installing additional packages...")
with proj.InDir("./shell"):
mys.command("yarn add redux react-redux")
mys.command("yarn add react-router react-router-dom")
# Cleaning
logger.update("Cleaning...", withLazy = True)
fileable.rm("yarn.lock")
fileable.rm("package.json")
fileable.rm("node_modules/")
with proj.InDir("./shell"):
fileable.rm(".gitignore")
fileable.rm("README.md")
# Completed
logger.update("Completed!")
self._create_package_json()
mys.command("yarn add --dev create-react-app")
if self._js_runtime == "--javascript":
mys.command("./node_modules/.bin/create-react-app shell")
else:
mys.command("./node_modules/.bin/create-react-app --scripts-version=react-scripts-ts shell")
logger.update("Installing additional packages...")
with proj.InDir("./shell"):
mys.command("yarn add redux react-redux")
mys.command("yarn add react-router react-router-dom")
# Cleaning
logger.update("Cleaning...", withLazy = True)
fileable.rm("yarn.lock")
fileable.rm("package.json")
fileable.rm("node_modules/")
with proj.InDir("./shell"):
fileable.rm(".gitignore")
fileable.rm("README.md")
# Completed
logger.update("Completed!")
if self._js_runtime == "--javascript":
mys.command("./node_modules/.bin/create-react-app shell")
else:
mys.command("./node_modules/.bin/create-react-app --scripts-version=react-scripts-ts shell")
logger.update("Installing additional packages...")
with proj.InDir("./shell"):
mys.command("yarn add redux react-redux")
mys.command("yarn add react-router react-router-dom")
# Cleaning
logger.update("Cleaning...", withLazy = True)
fileable.rm("yarn.lock")
fileable.rm("package.json")
fileable.rm("node_modules/")
with proj.InDir("./shell"):
fileable.rm(".gitignore")
fileable.rm("README.md")
# Completed
logger.update("Completed!")
mys.command("yarn add --dev create-react-app")
if self._js_runtime == "--javascript":
mys.command("./node_modules/.bin/create-react-app shell")
else:
mys.command("./node_modules/.bin/create-react-app --scripts-version=react-scripts-ts shell")
logger.update("Installing additional packages...")
with proj.InDir("./shell"):
mys.command("yarn add redux react-redux")
mys.command("yarn add react-router react-router-dom")
# Cleaning
logger.update("Cleaning...", withLazy = True)
fileable.rm("yarn.lock")
fileable.rm("package.json")
fileable.rm("node_modules/")
with proj.InDir("./shell"):
fileable.rm(".gitignore")
fileable.rm("README.md")
# Completed
logger.update("Completed!")
elif self._plugins == "--material":
logger.update("Installing material theme packages...")
with proj.InDir("./shell"):
mys.command("yarn add @angular/material @angular/cdk")
elif self._plugins == "--bootstrap":
logger.update("Installing Bootstrap theme packages...")
with proj.InDir("./shell"):
mys.command("yarn add ngx-bootstrap")
# Cleaning
logger.update("Cleaning...", withLazy = True)
fileable.rm("yarn.lock")
fileable.rm("package.json")
fileable.rm("node_modules/")
with proj.InDir("./shell"):
fileable.rm(".gitignore")
fileable.rm("README.md")
# Completed
logger.update("Completed!")
elif self._plugins == "--bootstrap":
logger.update("Installing Bootstrap theme packages...")
with proj.InDir("./shell"):
mys.command("yarn add ngx-bootstrap")
# Cleaning
logger.update("Cleaning...", withLazy = True)
fileable.rm("yarn.lock")
fileable.rm("package.json")
fileable.rm("node_modules/")
with proj.InDir("./shell"):
fileable.rm(".gitignore")
fileable.rm("README.md")
# Completed
logger.update("Completed!")