Skip to content

Commit

Permalink
PS-2018.2.4 <shengyou@Kaith.local Update Laravel.xml Create SQL.xml, …
Browse files Browse the repository at this point in the history
…React.xml, PHP.xml, Angular.xml, JavaScript.xml, Zen CSS.xml, AngularJS .xml, Twig.xml, Zen XSL.xml, HTTP Request.xml, xsl.xml, JavaScript Testing.xml, html_xml.xml, Zen HTML.xml, Vue.xml
  • Loading branch information
shengyou committed Nov 1, 2018
1 parent 5b98033 commit 75de797
Show file tree
Hide file tree
Showing 16 changed files with 4,973 additions and 7 deletions.
236 changes: 236 additions & 0 deletions templates/Angular.xml

Large diffs are not rendered by default.

180 changes: 180 additions & 0 deletions templates/AngularJS .xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<templateSet group="AngularJS ">
<template name="ngdcf" value="function compile(tElement, tAttrs, transclude) { &#10; $END$&#10; return function (scope, element, attrs) { &#10; }&#10;}" description="A compile function" toReformat="false" toShortenFQNames="true">
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngdlf" value="function (scope, element, attrs$ctrl$) {&#10;$END$ &#10;}" description="A linking function in a directive." toReformat="true" toShortenFQNames="true">
<variable name="ctrl" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngdc" value="directive('$directiveName$', function factory($injectables$) {&#10; var directiveDefinitionObject = { &#10; $directiveAttrs$&#10; compile: function compile(tElement, tAttrs, transclude) { &#10; $END$&#10; return function (scope, element, attrs) { &#10; }&#10; }&#10; };&#10; return directiveDefinitionObject;&#10;})" description="A directive with a compile function" toReformat="true" toShortenFQNames="true">
<variable name="directiveName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="injectables" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="directiveAttrs" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngdl" value=".directive('$directiveName$', function($directiveDeps$) {&#10;&#10; return function(scope, element, attrs$ctrl$) {&#10; $END$&#10; }&#10;});" description="A directive with a linking function only." toReformat="true" toShortenFQNames="true">
<variable name="directiveName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="directiveDeps" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ctrl" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngc" value="var $controllerName$ = function($scope, $injectables$) {&#10; $END$&#10;} " description="Define a new Angular Controller. You can change the controller name and parameters." toReformat="true" toShortenFQNames="true">
<variable name="controllerName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="injectables" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngfor" value="angular.forEach($iterateOver$, function(value, key){&#10; $END$ &#10;});" description="angular.foreach loop" toReformat="true" toShortenFQNames="true">
<variable name="iterateOver" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngindex" value="&lt;html&gt;&#10; &lt;head&gt;&#10; &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/angularjs/$version$/angular.js&quot;&gt;&lt;/script&gt;&#10; &lt;/head&gt;&#10; &lt;body ng-app&gt;&#10; $END$&#10; &lt;/body&gt;&#10;&lt;/html&gt;" description="Simple way of bootstraping angular app for prototyping purposes" toReformat="true" toShortenFQNames="true">
<variable name="version" expression="" defaultValue="1.0.1" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngsa" value="&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/angularjs/$version$/angular$suffix$.js&quot;&gt;&lt;/script&gt;&#10;$END$" description="Script tag importing base AngularJS file from CDN" toReformat="true" toShortenFQNames="true">
<variable name="version" expression="" defaultValue="1.0.1" alwaysStopAt="true" />
<variable name="suffix" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngst" value="&lt;script type=&quot;text/ng-template&quot; id=&quot;$id$&quot;&gt;&#10; $END$&#10;&lt;/script&gt;" description="A script tag holding Angular's template" toReformat="true" toShortenFQNames="true">
<variable name="id" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngb" value="{{$binding$}}$END$" description="A binding in AngularJS" toReformat="true" toShortenFQNames="true">
<variable name="binding" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngm" value="angular.module('$moduleName$',[$moduleDependencies$]);&#10;$END$" description="A new angular module without a config function." toReformat="true" toShortenFQNames="true">
<variable name="moduleName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="moduleDependencies" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngma" value="var $moduleName$ = angular.module('$moduleName$',[$moduleDeps$]);&#10;$END$" description="A new angular module without a config function and a variable assigment." toReformat="true" toShortenFQNames="true">
<variable name="moduleName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="moduleDeps" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngmc" value="var $moduleName$ = angular.module('$moduleName$',[$moduleDeps$], function($configDeps$){&#10; $END$&#10;});" description="A new angular module with a config function" toReformat="true" toShortenFQNames="true">
<variable name="moduleName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="moduleDeps" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="configDeps" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngmfa" value="factory('$factoryName$', function($dependencies$){&#10; $END$&#10;});" description="A factory in a module" toReformat="true" toShortenFQNames="true">
<variable name="factoryName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="dependencies" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngms" value="service('$serviceName$', function($injectables$) {&#10; $END$&#10;});" description="Define an Angular Module Service to be attached to a previously defined module. You can change the service name and service injectables." toReformat="true" toShortenFQNames="true">
<variable name="serviceName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="injectables" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngmfi" value="filter('$filterName$', function($injectables$) {&#10; return function(input, $args$) {&#10; $END$&#10; };&#10;})" description="Define an Angular Module Filter to be attached to a previously defined module. You can change the filter name." toReformat="true" toShortenFQNames="true">
<variable name="filterName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="injectables" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="args" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngrw" value="$routeProvider.when('$url$', {&#10; templateUrl: '$templateUrl$', &#10; controller: '$controller$'&#10;});&#10;$END$" description="Defines a when condition of an AngularJS route." toReformat="true" toShortenFQNames="true">
<variable name="url" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="templateUrl" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="controller" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngrwr" value="$routeProvider.when('$url$', {&#10; templateUrl: '$templateUrl$', &#10; controller: '$controller$',&#10; resolve: {$END$&#10; }&#10;});" description="Defines a when condition of an AngularJS route with the resolve block." toReformat="true" toShortenFQNames="true">
<variable name="url" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="templateUrl" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="controller" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="ngro" value="$routeProvider.otherwise({redirectTo : '$url$'});&#10;$END$" description="Defines an otherwise condition of an AngularJS route." toReformat="true" toShortenFQNames="true">
<variable name="url" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$f" value="$scope.$functionName$ = function($args$) {&#10; $END$&#10;};" description="Define a new $scope'd function (usually inside an AngularJS Controller). You can change the function name and arguments." toReformat="true" toShortenFQNames="true">
<variable name="functionName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="args" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$v" value="$scope.$variable$ = $value$;&#10;$END$" description="Defines a new $scope'd variable inside an AngularJS controller." toReformat="true" toShortenFQNames="true">
<variable name="variable" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="value" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$va" value="$scope.$variable$ = $variable$;&#10;$END$" description="Defines a new $scope'd variable inside an AngularJS controller and assigns a value from a contstructor arguments." toReformat="true" toShortenFQNames="true">
<variable name="variable" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$w" value="$scope.$watch('$watchExpr$',function(newValue, oldValue){&#10; $END$&#10;});" description="Define a $watch for an expression. You can change the expression to be watched." toReformat="true" toShortenFQNames="true">
<variable name="watchExpr" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$on" value="$scope.$on('$eventName$', function(event, $args$) {&#10; $END$&#10;});" description="Define a $on for a $broadcast/$emit on the $scope inside an Angular Controller. You can change the event name to listen on." toReformat="true" toShortenFQNames="true">
<variable name="eventName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="args" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$b" value="$scope.$broadcast('$eventName$', $eventArgs$);&#10;$END$" description="Define a $broadcast for a $scope inside an Angular Controller / Angular Controller Function. You can change the event name and optional event arguments." toReformat="false" toShortenFQNames="true">
<variable name="eventName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="eventArgs" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
<template name="$e" value="$scope.$emit('$eventName$', $eventArgs$);&#10;$END$" description="Define an $emit for a $scope inside an Angular Controller / Angular Controller Function. You can change the event name and optional event arguments." toReformat="true" toShortenFQNames="true">
<variable name="eventName" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="eventArgs" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JSP" value="false" />
</context>
</template>
</templateSet>
49 changes: 49 additions & 0 deletions templates/HTTP Request.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<templateSet group="HTTP Request">
<template name="gtr" value="GET http://$HOST$/$PATH$&#10;$HEADER$: $HEADER_VALUE$&#10;&#10;###" description="GET http://example.com/get" toReformat="true" toShortenFQNames="false">
<variable name="HOST" expression="" defaultValue="&quot;localhost:80&quot;" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="&quot;api/item&quot;" alwaysStopAt="true" />
<variable name="HEADER" expression="" defaultValue="&quot;Accept&quot;" alwaysStopAt="true" />
<variable name="HEADER_VALUE" expression="" defaultValue="&quot;application/json&quot;" alwaysStopAt="true" />
<context />
</template>
<template name="gtrp" value="GET http://$HOST$/$PATH$?$PARAM$=$VALUE$&#10;$HEADER$: $HEADER_VALUE$&#10;&#10;###" description="GET http://example.com/get?id=99" toReformat="true" toShortenFQNames="false">
<variable name="HOST" expression="" defaultValue="&quot;localhost:80&quot;" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="&quot;api/item&quot;" alwaysStopAt="true" />
<variable name="PARAM" expression="" defaultValue="&quot;id&quot;" alwaysStopAt="true" />
<variable name="VALUE" expression="" defaultValue="&quot;99&quot;" alwaysStopAt="true" />
<variable name="HEADER" expression="" defaultValue="&quot;Accept&quot;" alwaysStopAt="true" />
<variable name="HEADER_VALUE" expression="" defaultValue="&quot;application/json&quot;" alwaysStopAt="true" />
<context />
</template>
<template name="ptr" value="POST http://$HOST$/$PATH$&#10;Content-Type: $HEADER_VALUE$&#10;&#10;$BODY$&#10;&#10;###" description="POST http://example.com/add..." toReformat="true" toShortenFQNames="false">
<variable name="HOST" expression="" defaultValue="&quot;localhost:80&quot;" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="&quot;api/item&quot;" alwaysStopAt="true" />
<variable name="HEADER_VALUE" expression="" defaultValue="&quot;application/json&quot;" alwaysStopAt="true" />
<variable name="BODY" expression="" defaultValue="&quot;{}&quot;" alwaysStopAt="true" />
<context />
</template>
<template name="ptrp" value="POST http://$HOST$/$PATH$&#10;Content-Type: application/x-www-form-urlencoded&#10;&#10;$PARAM1$=$VALUE1$&amp;$PARAM2$=$VALUE2$&#10;&#10;###" description="POST application/x-www-form-urlencoded" toReformat="true" toShortenFQNames="false">
<variable name="HOST" expression="" defaultValue="&quot;localhost:80&quot;" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="&quot;api/item&quot;" alwaysStopAt="true" />
<variable name="PARAM1" expression="" defaultValue="&quot;id&quot;" alwaysStopAt="true" />
<variable name="VALUE1" expression="" defaultValue="&quot;99&quot;" alwaysStopAt="true" />
<variable name="PARAM2" expression="" defaultValue="&quot;content&quot;" alwaysStopAt="true" />
<variable name="VALUE2" expression="" defaultValue="&quot;new-element&quot;" alwaysStopAt="true" />
<context />
</template>
<template name="mptr" value="POST http://$HOST$/$PATH$&#10;Content-Type: multipart/form-data; boundary=WebAppBoundary&#10;&#10;--WebAppBoundary&#10;Content-Disposition: form-data; name=&quot;$FIELD_NAME$&quot;&#10;&#10;$BODY$&#10;--WebAppBoundary--&#10;&#10;###" description="POST multipart/form-data" toReformat="true" toShortenFQNames="false">
<variable name="HOST" expression="" defaultValue="&quot;localhost:80&quot;" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="&quot;api/item&quot;" alwaysStopAt="true" />
<variable name="FIELD_NAME" expression="" defaultValue="&quot;field-name&quot;" alwaysStopAt="true" />
<variable name="BODY" expression="" defaultValue="&quot;field-value&quot;" alwaysStopAt="true" />
<context />
</template>
<template name="fptr" value="POST http://$HOST$/$PATH$&#10;Content-Type: multipart/form-data; boundary=WebAppBoundary&#10;&#10;--WebAppBoundary&#10;Content-Disposition: form-data; name=&quot;$FIELD_NAME$&quot; filename=&quot;$FILE_NAME$&quot;&#10;&#10;&lt; $FILE_PATH$&#10;--WebAppBoundary--&#10;&#10;###" description="POST file by multipart/form-data" toReformat="true" toShortenFQNames="false">
<variable name="HOST" expression="" defaultValue="&quot;localhost:80&quot;" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="&quot;api/item&quot;" alwaysStopAt="true" />
<variable name="FIELD_NAME" expression="" defaultValue="&quot;field-name&quot;" alwaysStopAt="true" />
<variable name="FILE_NAME" expression="" defaultValue="&quot;file.txt&quot;" alwaysStopAt="true" />
<variable name="FILE_PATH" expression="" defaultValue="&quot;./relative/path/to/local_file.txt&quot;" alwaysStopAt="true" />
<context />
</template>
</templateSet>
22 changes: 22 additions & 0 deletions templates/JavaScript Testing.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<templateSet group="JavaScript Testing">
<template name="descr" value="describe('$NAME$', function() {&#10; $END$&#10;});" description="Inserts describe() block" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="jsMethodName()" defaultValue="" alwaysStopAt="true" />
<context />
</template>
<template name="bfe" value="beforeEach(function() {&#10; $END$&#10;});" description="Inserts beforeEach() block" toReformat="true" toShortenFQNames="true">
<context />
</template>
<template name="it" value="it('should $NAME$', function() {&#10; $END$&#10;}); " description="Inserts it() block" toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context />
</template>
<template name="afe" value="afterEach(function() {&#10; $END$&#10;});" description="Inserts afterEach() block" toReformat="true" toShortenFQNames="true">
<context />
</template>
<template name="af" value="after(function() {&#10; $END$&#10;});" description="Inserts after() block" toReformat="true" toShortenFQNames="true">
<context />
</template>
<template name="bf" value="before(function() {&#10; $END$&#10;});" description="Inserts before() block" toReformat="true" toShortenFQNames="true">
<context />
</template>
</templateSet>
Loading

0 comments on commit 75de797

Please sign in to comment.