Giter Club home page Giter Club logo

vsc-expressionengine's People

Contributors

dependabot[bot] avatar mindpixel-labs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vsc-expressionengine's Issues

EE: Create commands do not work

Prerequisites

  • Have you tried to reproduce the problem in with the extension disabled?

    • This is not possible/applicable
  • Have you checked that your issue isn't already filed?

    • It's not filed yet

Description

EE: Create commands do not work.

Steps to Reproduce

  1. Open command palette with [CTRL] + [SHIFT] + p
  2. Type ee create in the command palette
  3. Select EE: Create Add-on Boilerplate
  4. Select any option (Extension, Module or Plugin)
  5. Enter my vendor name
  6. Enter my add-on name

Expected behavior:

Expected folder(s) and files to be created and the boilerplate to open in the editor.

Actual behavior:

In the case of creating an add-on nothing, really nothing, happens. No error message and no folder(s) and files are created. Subsequently no boilerplate opens in the editor.

In the case of the other commands nothing happens other than an error message appearing.

Reproduces how often:

100%. All the time.

Versions

  • vsc-expressionengine: v2.1.3
  • OS: Windows 10 Pro
  • OS version: 21H1 build 19043.1348

Additional Information

I edited all the necessary settings as per the README file.

When trying to create a template an error message appeared and it pointed out the issue.
My workspace is located at D:\webdev\EE-Dev\sites\ee6u\ and the extension prefixes the workspace path with C:\.

The error message:

The template could not be created: Error: EINVAL: invalid argument, mkdir 'C:\d:\webdev\EE-Dev\sites\ee6u\system\user\templates\default_site\blog.group'

Solution (temporary)

Use a hardcoded path for the Ee: User Path setting (e.g. "ee.userPath" : "D:/webdev/EE-Dev/sites/ee6u/system/user" ).
This works fine for the time being.

Interested in extending this project to include code formatting options for EE inside of HTML files

Prerequisites

  • Have you tried to reproduce the problem in with the extension disabled? n/a
  • Have you checked that your issue isn't already filed? n/a

Description

I wasn't sure how to reach you so I'm filling this out as an alternative to a direct message or email.

I am exploring ways to build my own extension or a 'custom data format' for vs code to help with the code formatting of EE template tags.

I'd like it to support multi line wrapping similar to the "html.format.wrapAttributes": "force-expand-multiline" option in VS Code HTML Formatting settings.

An example of mult-line formatting in HTML:

Before:

<button mat-icon-button color="primary" class="menu-button" (click)="openMenu()">
    <mat-icon>menu</mat-icon>
</button>

After:

<button
    mat-icon-button
    color="primary"
    class="menu-button"
    (click)="openMenu()"
>
    <mat-icon>menu</mat-icon>
</button>

Here's an example of a EE tags and HTML content:

<ul>
	{exp:channel:entries
		channel="home_page"
		status="open"
		orderby="date"
		sort="desc"
		limit="1"
		dynamic="off"
		disable="categories|pagination|trackbacks"
		cache="yes"
		refresh="10"
	}
		<li class="widget-box widget-box-large no-link-expand">
			<div class="widget-inner">
				{exp:jcogs_img:pair 
					src="{featured_image:url}" 
					max_width="630" 
					max_height="360" 
					crop="yes" 
					allow_scale_larger="yes"  
					save_type="jpg" 
				}
					<div class="widget-image container-fullsize" style="background-image: url('{made}');">
						<img src="{made}" width="{width}" height="{height}" alt="{title}" class="fullsize-bg hidden"/>
					</div><!-- /.widget-image -->
				{/exp:jcogs_img:pair}
				<div class="widget-content">
					{featured_text}{EDIT_THIS}
				</div><!-- /.widget-content -->
			</div><!-- /.widget-inner -->
		</li><!-- /.widget -->
	{/exp:channel:entries}
</ul>

Presently, the HTML formatting options when run on this code produces the following:

<ul>
    {exp:channel:entries
    channel="home_page"
    status="open"
    orderby="date"
    sort="desc"
    limit="1"
    dynamic="off"
    disable="categories|pagination|trackbacks"
    cache="yes"
    refresh="10"
    }
    <li class="widget-box widget-box-large no-link-expand">
        <div class="widget-inner">
            {exp:jcogs_img:pair
            src="{featured_image:url}"
            max_width="630"
            max_height="360"
            crop="yes"
            allow_scale_larger="yes"
            save_type="jpg"
            }
            <div
                class="widget-image container-fullsize"
                style="background-image: url('{made}');"
            >
                <img
                    src="{made}"
                    width="{width}"
                    height="{height}"
                    alt="{title}"
                    class="fullsize-bg hidden"
                />
            </div><!-- /.widget-image -->
            {/exp:jcogs_img:pair}
            <div class="widget-content">
                {featured_text}{EDIT_THIS}
            </div><!-- /.widget-content -->
        </div><!-- /.widget-inner -->
    </li><!-- /.widget -->
    {/exp:channel:entries}
</ul>

You can see that the EE Tags indentation is removed, and the tags are considered content of the html tag wrapper.

I'd like to be able to run a formatter on an EE template and have it retain or improve EE code indentation as well as HTML indentation.

Is this something you'd be interested in collaborating on? Perhaps we could fork your existing extension, or do a PR to add what we come up with.

I think what you've got here is a really great start and also could use some updating and new features.

Let me know if you are open to discussing this and if you have any thoughts on the formatting/indentation.

Steps to Reproduce

n/a

Expected behavior:

n/a

Actual behavior:

n/a

Reproduces how often:

n/a

Versions

Please include the current extension version. Also, please include the OS and what version of the OS you're running.

Additional Information

Please feel free to reach out [email protected] or reply to this issue.

Thanks
Rowan

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.