willviles / ember-cli-markdown-resolver Goto Github PK
View Code? Open in Web Editor NEWEmber CLI addon for resolving markdown files and trees of md files.
Home Page: https://willviles.github.io/ember-cli-markdown-resolver
License: MIT License
Ember CLI addon for resolving markdown files and trees of md files.
Home Page: https://willviles.github.io/ember-cli-markdown-resolver
License: MIT License
I've recently updated to 4.7 and am running Babel v6.6.0, which is causing issues because this package uses 6.18.0.
Would this fix be to simply update the Babel version in this package?
Getting the below upon 'ember s':
The following outdated versions are found in your project:
* [email protected], currently used by:
* [email protected]
* Depends on ember-cli-babel@^6.6.0
Template Compiler Error (broccoli-persistent-filter:TemplateCompiler) in ember-cli-markdown-resolver/templates/components/markdown-menu-item.hbs
The `link-to` keyword was used incorrectly. It was used as a call expression, but its valid usages are:
- As an append statement, as in: {{link-to}}
- As a block statement, as in: {{#link-to}}{{/link-to}}
Error caused by:
|
| {{link-to item.attributes.title linkTo itemPath click=(action "onClick")}}
|
(error occurred in 'ember-cli-markdown-resolver/templates/components/markdown-menu-item.hbs' @ line 2 : column 2)
ember-engines.com (topic-md-resolver|โ6) $ yarn start
yarn run v1.13.0
$ ember serve
Cannot read property 'project' of undefined
yarn install
https://github.com/efx/ember-engines.com/commit/3fdf67a4e3118928551f2408592182bd5a872deeIt comes from both of these lines I think:
https://github.com/willviles/ember-cli-markdown-resolver/blob/master/index.js#L56
https://github.com/willviles/ember-cli-markdown-resolver/blob/master/index.js#L52
adding this.app &&
caused it to work. I can PR that if welcome.
Basically, looking for a way to have the markdown-menu
component optionally contain child references to a list of local anchor link within a file
So, given the following /app/guides/test.md
[services](#services) | [contact us](#contact_form)
... some text
### <a id="services"></a>Our Services
... some text
### <a id="contact_form"></a>Contact Form
This could build a markdown-menu
with the following structure
Test
Our Services
Contact Form
Now on the /test
route, the user can click "Our Services" and be taken to /test#services
or click the "Contact Form" link and be taken to /test#contact_form
Currently looking into what would be required to make this possible
To reproduce the bug create more than 1 markdown file with the inTree
properly set to false
and without an order
property assigned. In this scenario this line files = A(files).sortBy('attributes.order');
https://github.com/willviles/ember-cli-markdown-resolver/blob/v0.1.3/addon/services/markdown-resolver.js#L75 orders the files using a JS sort as follows
files = [
{ attributes: { inTree: false }, path: "app/guides/not-in-tree-1" },
{ attributes: { inTree: false }, path: "app/guides/not-in-tree-2" },
{ attributes: { order: 0 }, path: "app/guides/in-tree-1" },
{ attributes: { order: 1 }, path: "app/guides/in-tree-2" },
]
Then the synchronous forEach pulls out the items but still advances the index of the forEach loop so files get skipped in the loop.
See willviles/broccoli-markdown-resolver#4 -- when running on Windows, the file paths have backslashes, while the resolver expects 'em to be forward slashes.
The actual fix is in broccoli-markdown-resolver
, hence the PR there, but this'll need a dependency update once that's all taken care of.
The demo link just links to the repo. Where is the demo?
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.