I have managed to integrate Polymer 1.0 to my Ember-cli project. This my Brocfile
var vulcanize = require('broccoli-vulcanize');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
compassOptions: {
sassDir: "app/styles/main",
outputStyle: 'expanded'
}
});
//app.import("./bower_components/webcomponentsjs/webcomponents-lite.min.js");
var polymerVulcanize = vulcanize('app', {
input: 'elements.html',
output: 'assets/vulcanized.html',
/* inline: true,
strip: false,*/
excludes: [/*/^data:/, /^http[s]?:/, /^\//*/],
/* stripExcludes: false,
stripComments: false,
inlineScripts: false,*/
inlineCss: true
})
;
var polymer = pickFiles('bower_components/', {
srcDir: '',
files: [
'webcomponentsjs/webcomponents-lite.min.js',
'polymer/polymer.html'
// 'polymer/polymer.js'
],
destDir: '/assets'
});
//Bootstrap
app.import('./bower_components/bootstrap/dist/js/bootstrap.js');
app.import('./bower_components/bootstrap/dist/css/bootstrap.css');
This how I include everything:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Front</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="assets/webcomponentsjs/webcomponents-lite.min.js"></script>
{{content-for 'head'}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/front.css">
<script src="assets/vendor.js"></script>
<script src="assets/front.js"></script>
<link rel="import" href="assets/vulcanized.html">
{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}
{{content-for 'body-footer'}}
</body>
</html>
And this my buttons in index.hbs
<paper-spinner active></paper-spinner>
<paper-button>flat button</paper-button>
<paper-button raised>raised button</paper-button>
What I have in result is wrong rendered buttons 1 of 4/5 times.
This how it looks:
And normal:
If Im right the problem in paper-material, but I have no idea what to do.
Any ideas?
Aucun commentaire:
Enregistrer un commentaire