Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Conversation

@webarthur
Copy link
Contributor

@webarthur webarthur commented Jul 26, 2016

loop statement

index.html

<body>
  @@loop('loop-article.html', [
    { "title": "My post title", "text": "<p>lorem ipsum...</p>" },
    { "title": "Another post", "text": "<p>lorem ipsum...</p>" },
    { "title": "One more post", "text": "<p>lorem ipsum...</p>" }
  ])
</body>

loop-article.html

<article>
  <h1>@@title</h1>
  @@text
</article>

loop statement + data.json

data.json

[
  { "title": "My post title", "text": "<p>lorem ipsum...</p>" },
  { "title": "Another post", "text": "<p>lorem ipsum...</p>" },
  { "title": "One more post", "text": "<p>lorem ipsum...</p>" }
]

loop-article.html

<body>
  @@loop("loop-article.html", "data.json")
</body>

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage decreased (-10.5%) to 86.286% when pulling c195716 on webarthur:master into b694c98 on coderhaoxin:master.

@haoxins
Copy link
Owner

haoxins commented Jul 26, 2016

@TrySound any advice?

Readme.md Outdated
```
@@loop('loop-article.html', [
{ "title": "My post title", "text": "<p>lorem ipsum...</p>" },
{ "title": "Another post", "text": "<p>lorem ipsum...</p>" },
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@coveralls
Copy link

coveralls commented Jul 26, 2016

Coverage Status

Coverage decreased (-10.5%) to 86.286% when pulling 90d741d on webarthur:master into b694c98 on coderhaoxin:master.

@haoxins haoxins self-assigned this Jul 26, 2016
@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-14.7%) to 82.065% when pulling 3322350 on webarthur:master into b694c98 on coderhaoxin:master.

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-14.7%) to 82.065% when pulling 3595842 on webarthur:master into b694c98 on coderhaoxin:master.

@webarthur
Copy link
Contributor Author

so?

@haoxins
Copy link
Owner

haoxins commented Jul 31, 2016

@webarthur can you add some test cases for this feature?

@webarthur
Copy link
Contributor Author

@coderhaoxin check in the files:

/example/index.txt
/example/c/c.txt

@coveralls
Copy link

coveralls commented Aug 2, 2016

Coverage Status

Coverage decreased (-14.4%) to 83.069% when pulling 2f2cc25 on webarthur:master into ff678de on coderhaoxin:master.

@coveralls
Copy link

coveralls commented Aug 2, 2016

Coverage Status

Coverage decreased (-14.4%) to 83.069% when pulling 2aeae58 on webarthur:master into ff678de on coderhaoxin:master.

@mishingo
Copy link

that @@loop function is what kept me using this plugin

@haoxins
Copy link
Owner

haoxins commented Aug 18, 2016

example is not tests. But NVM.

I'll merge this PR soon and add tests 😄

@haoxins haoxins closed this Sep 27, 2016
@haoxins
Copy link
Owner

haoxins commented Sep 27, 2016

land 9d888d6

published v1.0.0

@morrislaptop
Copy link

@coveralls @coderhaoxin would something like @@loop('loop-article.html', @@articles) be possible? 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants