Skip to content

Commit 2c5d130

Browse files
committed
1.2.2
1 parent 09fd305 commit 2c5d130

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

packages/synthesis-jade/.versions

Lines changed: 3 additions & 3 deletions

packages/synthesis/.versions

Lines changed: 2 additions & 2 deletions

packages/synthesis/README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Synthesis is meteor + polymer
22
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/aruntk/meteorwebcomponents?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
33

4+
[![Donate](https://dantheman827.github.io/images/donate-button.svg)](https://www.paypal.me/arunkumartk)
5+
46
## About
57

68
Synthesis helps you use polymer inside meteor.
@@ -32,7 +34,10 @@ Remove `blaze-html-templates` (or remove the html compiler you are using).
3234
3335
Install synthesis
3436

35-
`meteor add mwc:synthesis`
37+
```sh
38+
meteor add mwc:synthesis #compiles html files
39+
meteor add mwc:synthesis-file #compiles asset files for <img src="image.png"> to work.
40+
```
3641

3742
synthesis is a meteor 1.3+ package. for 1.2 support use [mwc:compiler](https://github.com/meteorwebcomponents/compiler)
3843

@@ -71,7 +76,9 @@ You can import html using
7176

7277
2. `<link rel="import" href="./component.html"> `from html files
7378

74-
> Please note that `import 'package/package.html;'` imports from node_modules directory while `<link rel="import" href="package/package.html">` is the same as `import "./package/package.html";`. This is kept like this to go through polymer components in which dependency files inside the same folder are imported as `<link rel="import" href="dependency.html">`
79+
> Please note that `import 'package/package.html;'` imports from node_modules directory while `<link rel="import" href="package/package.html">` is the same as `import "./package/package.html";`. This is kept like this to go through polymer components in which dependency files inside the same folder are imported as `<link rel="import" href="dependency.html">`.
80+
81+
> If you want to import scripts/stylesheets/html from public use `src="/path/to/my/file"`. `src="path/to/my/file"` is interpreted as `import "./path/to/my/file"`.
7582
7683
Script
7784

@@ -209,6 +216,23 @@ import "@polymer/paper-button/paper-button.html";
209216
```
210217
>Please note that the @polymer packages are still in testing stage. And the polymer version is an older one.
211218
219+
### Assets
220+
221+
```html
222+
<img src="sample-image.png"> <!--Works!!-->
223+
<iron-image src="sample-image.png"><iron-image> <!--Works!!-->
224+
<any-element src="sample-image.png"><any-element> <!--Works!!-->
225+
<any-element src="[[image]]"><any-element> <!--Does not work!! if you want this to work use image = path/from/root/to/image.png -->
226+
<any-element src="{{image}}"><any-element> <!--Does not work!! if you want this to work use image = path/from/root/to/image.png -->
227+
```
228+
works inside html.
229+
230+
File types we supports https://github.com/meteorwebcomponents/synthesis/blob/master/packages/synthesis-file/plugin/synthesis-file.js#L19.
231+
232+
Feel free to add pr's if you want to supports more file types.
233+
234+
Relevant code https://github.com/meteorwebcomponents/synthesis/blob/master/packages/synthesis-compiler/synthesis-compiler.js#L166-L176 .
235+
212236
### Demo
213237

214238
#####Using Bower
@@ -220,10 +244,19 @@ Check out the [Synthesis Demo](https://github.com/meteorwebcomponents/synthesis-
220244
Check out the [synthesis-meteor-polymer-npm-demo](https://github.com/meteorwebcomponents/synthesis-meteor-polymer-npm-demo)
221245

222246
### Kickstart Your Meteor Polymer projects
223-
[Kickstart a Meteor/Polymer project](https://github.com/aruntk/kickstart-meteor-polymer) with Synthesis.
247+
[Kickstart a Meteor/Polymer project - FlowRouter](https://github.com/aruntk/kickstart-meteor-polymer) with Synthesis.
248+
249+
[KickStart Meteor/Polymer Project - Polymer App Route](https://github.com/aruntk/kickstart-meteor-polymer-with-app-route)
224250

225251
![synthesis1](https://cloud.githubusercontent.com/assets/6007432/14216652/9da7131a-f867-11e5-9f84-6dd75d60dd45.gif)
226252

253+
### Like it?
254+
255+
:star: this repo
256+
257+
### Found a bug?
258+
259+
Raise an issue!
227260

228261
### TODO
229262

@@ -255,7 +288,7 @@ Try to find out which package contains large number of js files. Delete unecessa
255288

256289
Q: Is it possible to use npm instead of bower for loading polymer and components
257290

258-
Ans : Yes there is. Refer [using polymer instead of bower](#using-polymer-from-npm-instead-of-bower)
291+
Ans : Yes there is. Refer [using npm instead of bower](#using-polymer-from-npm-instead-of-bower)
259292

260293
Q: Can I use Polymer and blaze together?
261294

0 commit comments

Comments
 (0)