Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _create_app(self, name):
with proj.MirageEnvironment(proj.MirageEnvironmentLevel.indjango):
mys.command("python manage.py startapp " + name)
def _create_template_git_project(self):
ignorance = gitignore.src()
with open(".gitignore", "w") as f:
f.write(ignorance)
mys.command("git init")
def _create_template_git_project(self):
ignorance = gitignore.src()
with open(".gitignore", "w") as f:
f.write(ignorance)
mys.command("git init")
mys.command("git remote add origin " + git_url)
# Create React App
logger.update("Creating React app...")
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!")
# Generate README.md
logger.update("Generating readme...", withLazy = True)
self._create_docs(author, description, license_name)
# Generate Miragefile
logger.update("Generating Miragefile...", withLazy = True)
self._create_miragefile(version, author, email, git_url, license_name, license_url, description, copyrightor)
# Add remote repo
logger.update("Adding remote repository...", withLazy = True)
mys.command("git remote add origin " + git_url)
# Create React App
logger.update("Creating React app...")
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/")
# Generate .gitignore
#log("Generating gitignore...")
logger.write("Generating gitignore...", withLazy = True)
self._create_template_git_project()
# Generate README.md
logger.update("Generating readme...", withLazy = True)
self._create_docs(author, description, license_name)
# Generate Miragefile
logger.update("Generating Miragefile...", withLazy = True)
self._create_miragefile(version, author, email, git_url, license_name, license_url, description, copyrightor)
# Add remote repo
logger.update("Adding remote repository...", withLazy = True)
mys.command("git remote add origin " + git_url)
# Create React App
logger.update("Creating React app...")
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")
# Generate .gitignore
#log("Generating gitignore...")
logger.write("Generating gitignore...", withLazy = True)
self._create_template_git_project()
# Generate README.md
logger.update("Generating readme...", withLazy = True)
self._create_docs(description)
# Generate Miragefile
logger.update("Generating Miragefile...", withLazy = True)
self._create_miragefile(version, author, email, git_url, license_name, description, copyrightor)
# Add remote repo
logger.update("Adding remote repository...", withLazy = True)
mys.command("git remote add origin " + git_url)
# Create React App
logger.update("Creating React app...")
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")
def _create_template_git_project(self):
ignorance = gitignore.src()
with open(".gitignore", "w") as f:
f.write(ignorance)
mys.command("git init")
# Generate Miragefile
logger.update("Generating Miragefile...", withLazy = True)
self._create_miragefile(version, author, email, git_url, license_name, license_url, description, copyrightor)
# Add remote repo
logger.update("Adding remote repository...", withLazy = True)
mys.command("git remote add origin " + git_url)
# Create React App
logger.update("Creating React app...")
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")
# Generate README.md
logger.update("Generating readme...", withLazy = True)
self._create_docs(description)
# Generate Miragefile
logger.update("Generating Miragefile...", withLazy = True)
self._create_miragefile(version, author, email, git_url, license_name, description, copyrightor)
# Add remote repo
logger.update("Adding remote repository...", withLazy = True)
mys.command("git remote add origin " + git_url)
# Create React App
logger.update("Creating React app...")
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/")