How to use the mirage.system.command function in mirage

To help you get started, we’ve selected a few mirage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shotastage / mirage-django-lts / mirage / generate / app.py View on Github external
def _create_app(self, name):
        with proj.MirageEnvironment(proj.MirageEnvironmentLevel.indjango):
            mys.command("python manage.py startapp " + name)
github shotastage / mirage-django-lts / mirage / projectstartup / minimum_app_create.py View on Github external
def _create_template_git_project(self):
        ignorance = gitignore.src()

        with open(".gitignore", "w") as f:
            f.write(ignorance)

        mys.command("git init")
github shotastage / mirage-django-lts / mirage / projectstartup / start_base.py View on Github external
def _create_template_git_project(self):
        ignorance = gitignore.src()

        with open(".gitignore", "w") as f:
            f.write(ignorance)

        mys.command("git init")
github shotastage / mirage-django-lts / mirage / projectstartup / start_base.py View on Github external
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!")
github shotastage / mirage-django-lts / mirage / projectstartup / start_base.py View on Github external
# 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/")
github shotastage / mirage-django-lts / mirage / projectstartup / react_app_create.py View on Github external
# 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")
github shotastage / mirage-django-lts / mirage / projectstartup / django_app_create.py View on Github external
# 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")
github shotastage / mirage-django-lts / mirage / projectstartup / django_app_create.py View on Github external
def _create_template_git_project(self):
        ignorance = gitignore.src()

        with open(".gitignore", "w") as f:
            f.write(ignorance)

        mys.command("git init")
github shotastage / mirage-django-lts / mirage / projectstartup / react_app_create.py View on Github external
# 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")
github shotastage / mirage-django-lts / mirage / projectstartup / django_app_create.py View on Github external
# 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/")