ramybenaroya / ember-index Goto Github PK
View Code? Open in Web Editor NEWEmber addon for manipulating index.html
Home Page: https://github.com/ramybenaroya/ember-index/wiki
License: MIT License
Ember addon for manipulating index.html
Home Page: https://github.com/ramybenaroya/ember-index/wiki
License: MIT License
I'm using ember-cli 1.13.12, node 0.12.0, npm 2.14.10 and ember 2.1.0. I'm using ember-index to create a dynamic index.jsp file. It worked great until I updated my project to the latest ember-cli, node, and ember versions. While, it certainly could be something I screwed up in the configuration, I wonder if the api has changed that ember-index relies upon. I'm getting this exception when using ember-index:
TypeError: Arguments to path.join must be strings
at Object.posix.join (path.js:471:13)
at Class. (/myapp/node_modules/ember-index/index.js:31:32)
at Array.forEach (native)
at Class.module.exports.contentFor (/myapp/node_modules/ember-index/index.js:27:25)
at /myapp/node_modules/ember-cli/lib/broccoli/ember-app.js:1449:49
at Array.reduce (native)
at EmberApp.contentFor (/myapp/node_modules/ember-cli/lib/broccoli/ember-app.js:1448:33)
at replacement (/myapp/node_modules/ember-cli/node_modules/broccoli-config-replace/index.js:78:36)
at String.replace (native)
at /myapp/node_modules/ember-cli/node_modules/broccoli-config-replace/index.js:82:25
I was able to fix the issue by changing line 31 in index.js from this
var contentFilePath = path.join(this.app.project.root, this.app.options.trees.app, content.file);
to this:
var contentFilePath = path.join(this.app.project.root, this.app.options.trees.app._directoryPath, content.file);
Am I missing something or is this an actual bug?
ember-index
has a dependency on ember-cli-babel 5.x but the majority of ember modules have moved up to version 6. The project still tries to pull in version 5 and as a result we get a deprecation notice.
DEPRECATION: ember-cli-babel 5.x has been deprecated. Please upgrade to at least ember-cli-babel 6.6. Version 5.2.8 located: cafe-rouge -> ember-index -> ember-cli-babel
Please can you upgrade the module dependencies to remove this warning.
Using Ember v3 causes this message too.
When using this (during development) it outputs "ember-index-start…" "ember-index-end…" markes before and after the injected content.
I noticed that those markers used to be rendered HTML comments.
Since in ember-cli>=2.5.0 EmberAddon.app.options.trees.app
is an absolute path instead of a relative one, the content files can't be found.
Thanks to Dustin Wilhelmi for both finding this and help solving this one.
This happens because of broccoli-funnel upgrade from 0.2.3 to 0.2.4
when creating a broccoli-funnel instance, inputTree property is undefined
Is it possible to replace a marker with a simple string instead of a file content?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.