How to use the mirage.fileable 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 / projectstartup / django_app_create.py View on Github external
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 / abstract_flow.py View on Github external
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!")
github shotastage / mirage-django-lts / mirage / projectstartup / start_base.py View on Github external
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 / angular_app_create.py View on Github external
mys.command("yarn add @nebular/theme @nebular/auth")

            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!")
github shotastage / mirage-django-lts / mirage / workspace / storage.py View on Github external
def initialize():

        with MirageEnvironment(MirageEnvironmentLevel.inproject):
            if not fileable.exists(".mirage"):
                mys.log("Creating Mirage workspace...")
                fileable.mkdir(".mirage")
                fileable.mkdir(".mirage/cache/")
                fileable.mkdir(".mirage/persistence/")
github shotastage / mirage-django-lts / mirage / configure / configure.py View on Github external
def _configure_addition(self):
        if fileable.exists("Miragefile.addon"):
            if log("Miragefile (Additional) is exists. Are you sure to overwrite?", withConfirm = True):
                os.remove("Miragefile.addon")
            else:
                log("Miragefile is already exists!", withError = True)
                raise FileExistsError
                return

        option_string = log("Additional option string", withInput = True)

        with open("Miragefile.addon", "w") as f:
            f.write(create_additional(option_string))
github shotastage / mirage-django-lts / mirage / projectstartup / react_app_create.py View on Github external
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
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 / abstract_flow.py View on Github external
mys.command("yarn add @nebular/theme @nebular/auth")

            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!")
github shotastage / mirage-django-lts / mirage / projectstartup / django_app_create.py View on Github external
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!")