This repository has been archived by the owner on Sep 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add standard snippets for html import and polymer element definitions
- Loading branch information
1 parent
4a20153
commit 1f34368
Showing
5 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import {ElementSnippet} from './editor-service'; | ||
|
||
const snippets: ElementSnippet[] = [ | ||
{ | ||
'tagname': 'html-import', | ||
'description': 'Template definition of an HTML import.', | ||
'prefix': 'hi', | ||
'expandTo': '<link rel="import" href="bower_components/.html">', | ||
'expandToSnippet': '<link rel="import" href="${1:bower_components}/${2}/${2}.html">' | ||
}, | ||
{ | ||
'tagname': 'tdd-test', | ||
'description': 'Template definition for a TDD test suite', | ||
'prefix': 'tdd-test', | ||
'expandTo': '', | ||
'expandToSnippet': ` | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | ||
<title>$\{1:my-element}</title> | ||
<script src="\${2:bower_components}/webcomponentsjs/webcomponents-lite.js"></script> | ||
<script src="\${2:bower_components}/web-component-tester/browser.js"></script> | ||
<link rel="import" href="$3/$\{1:my-element}.html"> | ||
</head> | ||
<body> | ||
<test-fixture id="basic"> | ||
<template> | ||
<$\{1:my-element}><$\{1:my-element}> | ||
</template> | ||
</test-fixture> | ||
<script> | ||
suite('$\{1:my-element} tests', function() { | ||
var element; | ||
setup(function() { | ||
element = fixture('basic'); | ||
}); | ||
test('$6', function() { | ||
$0 | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> | ||
` | ||
} | ||
]; | ||
|
||
export {snippets}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters