Coder Social home page Coder Social logo

Splitting to multiple files about envoy HOT 6 CLOSED

laravel avatar laravel commented on April 28, 2024 1
Splitting to multiple files

from envoy.

Comments (6)

driesvints avatar driesvints commented on April 28, 2024

Please see https://laravel.com/docs/5.8/envoy#setup

It's a PHP file so you can require whatever file you want.

from envoy.

vpratfr avatar vpratfr commented on April 28, 2024

@driesvints I did not manage to put my task definitions into other file.

Is the following supposed to work?

// Envoy.blade.php

@include('deployment/tasks.blade.php')

...

@story 
    foo
@endstory
// deployment/tasks.blade.php

@task('foo', [...])
    ls -al
@endtask 

from envoy.

driesvints avatar driesvints commented on April 28, 2024

Hmm, it seems this is indeed not possible which I believed otherwise. The include annotation works a bit different from Blade where it also parses the blade include. I believe if we could extend the include partial to also parse other files it might work. It's also a bit confusing that it's called Envoy.blade.php but Blade isn't actual used behind the hood.

from envoy.

vpratfr avatar vpratfr commented on April 28, 2024

from envoy.

LukaSikic avatar LukaSikic commented on April 28, 2024

Use @import instead of @include and it will work as you expected

from envoy.

driesvints avatar driesvints commented on April 28, 2024

@LukaSikic that indeed works. I'll try to add it to the docs soon but feel free to send in a PR before me.

from envoy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.