magento / magento2-phpstorm-plugin

PHPStorm Plugin for Magento 2
Open Software License 3.0
436 stars 102 forks source link

Support for PWA Studio Live Templates #352

Closed larsroettig closed 4 years ago

larsroettig commented 4 years ago

Is your feature request related to a problem? Please describe. As Developer i want to have live template support for Magento PWA

Describe the solution you'd like (*)

https://jetbrains.org/intellij/sdk/docs/tutorials/live_templates/template_support.html

<templateSet group="MagentoPWA">
  <template name="pwa_pure" value="import React from 'react';&#10;import {mergeClasses} from '@magento/venia-ui/lib/classify';&#10;import { shape, string } from 'prop-types';&#10;&#10;import defaultClasses from './$CSS_FILENAME_BASE$.css';&#10;&#10;const $TM_FILENAME_BASE$ = props =&gt; {&#10;    const classes = mergeClasses(defaultClasses, props.classes);&#10;    return (&lt;div className={classes.root}&gt;$END$&lt;/div&gt;);&#10;}&#10;&#10;$TM_FILENAME_BASE$.propTypes = {&#10;  classes: shape({root: string})&#10;};&#10;$TM_FILENAME_BASE$.defaultProps = {};&#10;export default $TM_FILENAME_BASE$;" description="" toReformat="true" toShortenFQNames="true">
    <variable name="CSS_FILENAME_BASE" expression="decapitalize(camelCase(fileNameWithoutExtension()))" defaultValue="" alwaysStopAt="true" />
    <variable name="TM_FILENAME_BASE" expression="capitalize(camelCase(fileNameWithoutExtension()))" defaultValue="" alwaysStopAt="true" />
    <context>
      <option name="JAVA_SCRIPT" value="true" />
      <option name="TypeScript" value="true" />
    </context>
  </template>
</templateSet>

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

m2-assistant[bot] commented 4 years ago

Hi @larsroettig. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this