diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 000000000..984e2d8c2
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,17 @@
+# minified
+*.min.js
+
+# test
+*actual*
+*expected*
+input.js
+
+# generated
+*dist*
+*generated*
+*.marko.js
+*.marko.*.js
+*.html.js
+~vdom.skip
+
+node_modules
\ No newline at end of file
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 000000000..c3c29e51a
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,14 @@
+{
+ "extends": [
+ "eslint:recommended",
+ "prettier"
+ ],
+ "env": {
+ "node": true,
+ "es6": true
+ },
+ "globals": {
+ "document": true,
+ "ShadowRoot": true
+ }
+}
\ No newline at end of file
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
index 24408f9b2..43a80c9b1 100644
--- a/.github/CODE_OF_CONDUCT.md
+++ b/.github/CODE_OF_CONDUCT.md
@@ -3,20 +3,20 @@
This project adheres to the [eBay Code of Conduct](http://ebay.github.io/codeofconduct).
By participating in this project you agree to abide by its terms.
-- Be friendly and patient.
+* Be friendly and patient.
-- Be welcoming: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
+* Be welcoming: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, color, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability.
-- Be considerate: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language.
+* Be considerate: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we’re a world-wide community, so you might not be communicating in someone else’s primary language.
-- Be respectful: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one.
+* Be respectful: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one.
-- Be careful in the words that we choose: we are a community of professionals, and we conduct ourselves professionally.
+* Be careful in the words that we choose: we are a community of professionals, and we conduct ourselves professionally.
-- Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable.
+* Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren’t acceptable.
-- Try to understand why we disagree: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively.
+* Try to understand why we disagree: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively.
-- Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
+* Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes.
Please visit http://ebay.github.io/codeofconduct for the full code of conduct.
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index ef3f4a9e5..15a11baf3 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -10,9 +10,10 @@
## I just have a question
-Before you ask, check our [existing questions](https://github.com/marko-js/marko/issues?page=2&q=is%3Aissue+label%3Atype%3Aquestion&utf8=%E2%9C%93) to see if your question has already been answered. If not, go ahead an open an issue or join us in [gitter](https://gitter.im/marko-js/marko) to ask a question.
+Before you ask, check our [existing questions](https://github.com/marko-js/marko/issues?page=2&q=is%3Aissue+label%3Atype%3Aquestion&utf8=%E2%9C%93) to see if your question has already been answered. If not, go ahead an open an issue or join us in [gitter](https://gitter.im/marko-js/marko) to ask a question.
Please be sure to use [markdown code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) when posting code on GitHub or Gitter:
+
````
```marko
some marko ${code}
@@ -29,25 +30,27 @@ Not sure if that typo is worth a pull request? Found a bug and know how to fix i
We are always thrilled to receive pull requests. We do our best to process them quickly. If your pull request is not accepted on the first try, don't get discouraged! We'll work with you to come to an acceptable solution.
-Prior to merging your PR, you will need to sign the [JS Foundation CLA](https://cla.js.foundation/marko-js/marko). It's pretty straight-forward and only takes a minute. You can even sign it now if you're thinking about contributing.
+Prior to merging your PR, you will need to sign the [JS Foundation CLA](https://cla.js.foundation/marko-js/marko). It's pretty straight-forward and only takes a minute. You can even sign it now if you're thinking about contributing.
> **TIP:** If you're new to GitHub or open source you can check out this [free course](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) on how to contribute to an open source project.
### Running tests
Before submitting your PR, make sure that all new and previous tests pass and that [coverage](https://coveralls.io/github/marko-js/marko?branch=master) has not decreased:
+
```
npm run test-coverage
```
While developing you can run a single test group and use [grep](https://mochajs.org/#-g---grep-pattern) to filter the tests:
+
```
npm run mocha -- --grep=lifecycle
```
### Adding tests
-Marko makes use of directory based test suites. Take a look at the `render` test suite:
+Marko makes use of directory based test suites. Take a look at the `render` test suite:
test/
@@ -66,15 +69,16 @@ Marko makes use of directory based test suites. Take a look at the `render` tes
The `html.test.js` file will run and read all the directories under `render/fixtures` and for each directory (`attrs`, `for-tag`, etc.) it will run `test.js`, render `template.marko` and assert that it is equivalent to the content of `expected.html`.
To add a new test, you'll find the appropriate test suite, copy a fixture, and modify it to add the new test.
+
#### Skipping a test
-A few of the tests suites use the same fixtures for multiple test scenarios. For example, the `component-browser` tests run once rendering the component in a browser environment and a second time rendering in a server environment, then hydrating in the browser.
+A few of the tests suites use the same fixtures for multiple test scenarios. For example, the `component-browser` tests run once rendering the component in a browser environment and a second time rendering in a server environment, then hydrating in the browser.
-For some tests, it might be necessary to skip the test in one of these scenarios. This is done by exporting a `skipHydrate` (or similiarly named) property from the fixture. The value of the property should be a string explaining why the test is skipped.
+For some tests, it might be necessary to skip the test in one of these scenarios. This is done by exporting a `skipHydrate` (or similiarly named) property from the fixture. The value of the property should be a string explaining why the test is skipped.
#### Adding a failing test case
-If you've discovered an issue and are able to reproduce it, but don't have a fix, consider submitting a PR with a failing test case. You can mark a fixture as expected to fail by appending `.fails` to the directory name:
+If you've discovered an issue and are able to reproduce it, but don't have a fix, consider submitting a PR with a failing test case. You can mark a fixture as expected to fail by appending `.fails` to the directory name:
```
⤷ fixtures/
@@ -87,7 +91,8 @@ Expected failures won't cause [Travis CI](https://travis-ci.org/marko-js/marko)
### Debugging tests
-If you need to dig a bit deeper into a failing test, use the `--inspect-brk` flag, open Chrome DevTools, and click on the green nodejs icon ( ) to start debugging. Learn more about [debugging node](https://www.youtube.com/watch?v=Xb_0awoShR8&t=103s) from this video.
+If you need to dig a bit deeper into a failing test, use the `--inspect-brk` flag, open Chrome DevTools, and click on the green nodejs icon ( ) to start debugging. Learn more about [debugging node](https://www.youtube.com/watch?v=Xb_0awoShR8&t=103s) from this video.
+
```
npm run mocha -- --grep=test-name --inspect-brk
```
@@ -101,9 +106,9 @@ $ debugger;
### Updating snapshots
-A number of the test suites make use snapshot comparisons. For example, the `render` tests compare the rendered html against a stored snapshot. Similarly, the `compiler` tests compare the generated JavaScript module againt a stored snapshot. Any changes compared to the snapshot should be looked at closely, but there are some cases where it is fine that the output has changed and the snapshot needs to be updated.
+A number of the test suites make use snapshot comparisons. For example, the `render` tests compare the rendered html against a stored snapshot. Similarly, the `compiler` tests compare the generated JavaScript module againt a stored snapshot. Any changes compared to the snapshot should be looked at closely, but there are some cases where it is fine that the output has changed and the snapshot needs to be updated.
-To update a snapshot, you can copy the contents from the `actual` file to the `expected` file in the fixture directory. You can also use the `UPDATE_EXPECTATIONS` env variable to cause the test runner to update the `expected` file for all currently failing tests in a suite:
+To update a snapshot, you can copy the contents from the `actual` file to the `expected` file in the fixture directory. You can also use the `UPDATE_EXPECTATIONS` env variable to cause the test runner to update the `expected` file for all currently failing tests in a suite:
```
UPDATE_EXPECTATIONS=1 npm run mocha
@@ -115,17 +120,17 @@ Comment on the issue and let us know you'd like to tackle it. If for some reason
Here's some to get started with:
-- [good first issue](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22): great for new contributors
-- [help wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issues: won't be tackled in the near future by the maintainers... we need your help!
-- [unassigned](https://github.com/marko-js/marko/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20no%3Aassignee%20) issues: open issues that no one has claimed... yet
+* [good first issue](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22): great for new contributors
+* [help wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) issues: won't be tackled in the near future by the maintainers... we need your help!
+* [unassigned](https://github.com/marko-js/marko/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20no%3Aassignee%20) issues: open issues that no one has claimed... yet
## Reporting bugs and other issues
-A great way to contribute to the project is to send a detailed report when you encounter an issue. Even better: submit a PR with a failing test case ([see how](#adding-a-failing-test-case)).
+A great way to contribute to the project is to send a detailed report when you encounter an issue. Even better: submit a PR with a failing test case ([see how](#adding-a-failing-test-case)).
-Check that [our issue database](https://github.com/marko-js/marko/issues) doesn't already include that problem or suggestion before submitting an issue. If you find a match, you can use the "subscribe" button to get notified on updates. Rather than leaving a "+1" or "I have this too" comment, you can add a [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) to let us know that this is also affecting you without cluttering the conversation. However, if you have ways to reproduce the issue or have additional information that may help resolving the issue, please leave a comment.
+Check that [our issue database](https://github.com/marko-js/marko/issues) doesn't already include that problem or suggestion before submitting an issue. If you find a match, you can use the "subscribe" button to get notified on updates. Rather than leaving a "+1" or "I have this too" comment, you can add a [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) to let us know that this is also affecting you without cluttering the conversation. However, if you have ways to reproduce the issue or have additional information that may help resolving the issue, please leave a comment.
-We have an [ISSUE_TEMPLATE](ISSUE_TEMPLATE.md) that will populate your textarea when you go to open an issue. Use the relevant section and remove the rest.
+We have an [ISSUE_TEMPLATE](ISSUE_TEMPLATE.md) that will populate your textarea when you go to open an issue. Use the relevant section and remove the rest.
Please provide as much detail as possible.
@@ -140,6 +145,7 @@ Security reports are greatly appreciated and we will publicly thank you for it.
Once you post an issue, a maintainer will add one or more labels to it. Below is a guideline for the maintainers and anyone else who is interested in what the various labels mean.
### Type
+



@@ -150,15 +156,16 @@ Once you post an issue, a maintainer will add one or more labels to it. Below is
Every issue should be assigned one of these.
-- **bug**: A bug report
-- **unverified-bug**: A bug report that has not been verified
-- **feature**: A feature request
-- **question**: A question about how to do something in Marko
-- **community**: Related to community building, improving the contribution process, etc.
-- **tech debt**: Related to refactoring code, test structure, etc.
-- **docs**: Related to documentation/website
+* **bug**: A bug report
+* **unverified-bug**: A bug report that has not been verified
+* **feature**: A feature request
+* **question**: A question about how to do something in Marko
+* **community**: Related to community building, improving the contribution process, etc.
+* **tech debt**: Related to refactoring code, test structure, etc.
+* **docs**: Related to documentation/website
### Scope
+



@@ -168,47 +175,51 @@ Every issue should be assigned one of these.
What part of the Marko stack does this issue apply to? In most cases there should only be one of these.
-- **parser**: Relates to [`htmljs-parser`](https://github.com/marko-js/htmljs-parser)
-- **compiler**: Relates to the [compiler](../src/compiler) (server only)
-- **runtime**: Relates to the [runtime](../src/runtime) (isomorphic/universal)
-- **core-taglib**: Relates to [custom tags](../src/taglib) that ship with Marko
-- **components**: Relates to [components](../src/components)
-- **tools**: Relates to editor plugins, commandline tools, etc.
+* **parser**: Relates to [`htmljs-parser`](https://github.com/marko-js/htmljs-parser)
+* **compiler**: Relates to the [compiler](../src/compiler) (server only)
+* **runtime**: Relates to the [runtime](../src/runtime) (isomorphic/universal)
+* **core-taglib**: Relates to [custom tags](../src/taglib) that ship with Marko
+* **components**: Relates to [components](../src/components)
+* **tools**: Relates to editor plugins, commandline tools, etc.
### Status
+



-In many cases, additional *actions* should be taken when applying one of these.
+In many cases, additional _actions_ should be taken when applying one of these.
-- **backlog**: Tasks planned to be worked on
-- **in progress**: This is currently being worked on.
-- **needs review**: This issue needs to be followed up on.
+* **backlog**: Tasks planned to be worked on
+* **in progress**: This is currently being worked on.
+* **needs review**: This issue needs to be followed up on.
### Reason closed
+






-- **resolved**: The question was answered, the bug was fixed, or the feature was implemented.
-- **duplicate**: Someone has already posted the same or a very similar issue. A comment should be added that references the original issue.
-- **declined**: This feature will not be implemented.
-- **not a bug**: This is not a bug, but either user error or intended behavior.
-- **inactivity**: There was not enough info to reproduce the bug or not enough interest in the feature to hash out an implementation plan and the conversation has stalled.
-- **no issue**: This wasn't so much an issue as a comment
+
+* **resolved**: The question was answered, the bug was fixed, or the feature was implemented.
+* **duplicate**: Someone has already posted the same or a very similar issue. A comment should be added that references the original issue.
+* **declined**: This feature will not be implemented.
+* **not a bug**: This is not a bug, but either user error or intended behavior.
+* **inactivity**: There was not enough info to reproduce the bug or not enough interest in the feature to hash out an implementation plan and the conversation has stalled.
+* **no issue**: This wasn't so much an issue as a comment
### Other
+





-- **good first issue**: Small tasks that would be good for first time contributors.
-- **help wanted**: Not on the roadmap, but we'd love for someone in the community to tackle it.
-- **blocked**: Cannot be completed until something else happens first. This should be described in a comment with a link to the blocking issue.
-- **needs more info**: The original poster needs to provide more information before action can be taken.
-- **user land**: Something that probably won't be added to core, but could be implemented/proved out as a separate module.
+* **good first issue**: Small tasks that would be good for first time contributors.
+* **help wanted**: Not on the roadmap, but we'd love for someone in the community to tackle it.
+* **blocked**: Cannot be completed until something else happens first. This should be described in a comment with a link to the blocking issue.
+* **needs more info**: The original poster needs to provide more information before action can be taken.
+* **user land**: Something that probably won't be added to core, but could be implemented/proved out as a separate module.
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 435d3a815..3c355c6a4 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,40 +1,52 @@
+
## Bug Report
### Marko Version: x.x.x
+
### Details
+
### Expected Behavior
+
### Actual Behavior
+
### Possible Fix
+
Additional Info
### Your Environment
+
+
* Environment name and version (e.g. Chrome 39, node.js 5.4):
* Operating System and version (desktop or mobile):
* Link to your project:
### Steps to Reproduce
+
+
-1.
-2.
-3.
-4.
+
+1. first...
+2.
+3.
+4.
### Stack Trace
+
@@ -42,18 +54,25 @@
+
## New Feature
### Description
+
### Why
+
+
### Possible Implementation & Open Questions
+
+
### Is this something you're interested in working on?
+
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 9cf1e68f6..7ce32087b 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,21 +1,27 @@
## Description
+
## Motivation and Context
+
+
## Screenshots (if appropriate):
## Checklist:
+
+
-- [ ] My code follows the code style of this project.
-- [ ] I have updated/added documentation affected by my changes.
-- [ ] I have read the **CONTRIBUTING** document.
-- [ ] I have added tests to cover my changes.
-- [ ] All new and existing tests passed.
+
+* [ ] My code follows the code style of this project.
+* [ ] I have updated/added documentation affected by my changes.
+* [ ] I have read the **CONTRIBUTING** document.
+* [ ] I have added tests to cover my changes.
+* [ ] All new and existing tests passed.
_Disclaimer: Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so._
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index 0c81e9505..000000000
--- a/.jshintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/src/taglibs/async/client-reorder-runtime.js
-/src/taglibs/async/client-reorder-runtime.min.js
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index f7e99cfc4..000000000
--- a/.jshintrc
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "predef": [
- "document",
- "ShadowRoot"
- ],
- "node" : true,
- "esnext": true,
- "boss" : false,
- "curly": false,
- "debug": false,
- "devel": false,
- "eqeqeq": true,
- "evil": true,
- "forin": false,
- "immed": true,
- "laxbreak": false,
- "newcap": true,
- "noarg": true,
- "noempty": false,
- "nonew": true,
- "nomen": false,
- "onevar": false,
- "plusplus": false,
- "regexp": false,
- "undef": true,
- "sub": false,
- "white": false,
- "eqeqeq": false,
- "latedef": "func",
- "unused": "vars",
- "strict": false,
- "eqnull": true
-}
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..5a531e2ac
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,22 @@
+# minfied
+*.min.js
+
+# tests
+*actual*
+*expected*
+input.*
+
+# generated
+/dist/
+/test-dist/
+/test-generated/
+*.marko.js
+*.html.js
+*.xml.js
+*.generated.js
+.nyc_output
+coverage
+
+# controlled by npm's formatter
+package-lock.json
+package.json
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b4019920c..fa303dc34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,4 @@
-Changelog
-=========
+# Changelog
# 4.x
@@ -7,411 +6,410 @@ Changelog
### 4.9.0
-- Fixes related to hydration, split components, and the legacy compatibility layer [#1010](https://github.com/marko-js/marko/pull/1010)
+* Fixes related to hydration, split components, and the legacy compatibility layer [#1010](https://github.com/marko-js/marko/pull/1010)
-- Fix paths for vdom dependencies [#1011](https://github.com/marko-js/marko/pull/1011)
+* Fix paths for vdom dependencies [#1011](https://github.com/marko-js/marko/pull/1011)
## 4.8.x
### 4.8.0
-- Add `once-[event]` directive [#990](https://github.com/marko-js/marko/pull/990)
+* Add `once-[event]` directive [#990](https://github.com/marko-js/marko/pull/990)
-- Improve testing setup [#989](https://github.com/marko-js/marko/pull/989)
+* Improve testing setup [#989](https://github.com/marko-js/marko/pull/989)
## 4.7.x
### 4.7.5
-- Update docs for advanced attribute definition [#968](https://github.com/marko-js/marko/pull/968)
+* Update docs for advanced attribute definition [#968](https://github.com/marko-js/marko/pull/968)
-- Improve error message for async rendering [#958](https://github.com/marko-js/marko/pull/958)
+* Improve error message for async rendering [#958](https://github.com/marko-js/marko/pull/958)
### 4.7.4
-- Make jQuery optional for legacy components [#951](https://github.com/marko-js/marko/pull/951)
+* Make jQuery optional for legacy components [#951](https://github.com/marko-js/marko/pull/951)
### 4.7.3
-- Prevent onRender running on the server for legacy widgets
+* Prevent onRender running on the server for legacy widgets
### 4.7.2
-- Fixes [#946](https://github.com/marko-js/marko/issues/946) - don't put legacy init code in a separate lasso bundle
+* Fixes [#946](https://github.com/marko-js/marko/issues/946) - don't put legacy init code in a separate lasso bundle
-- Fixes allowing conditionally binding to different roots in a legacy widget [#944](https://github.com/marko-js/marko/pull/944)
+* Fixes allowing conditionally binding to different roots in a legacy widget [#944](https://github.com/marko-js/marko/pull/944)
### 4.7.1
-- Fix issue with multiple top level elements being removed twice. [#940](https://github.com/marko-js/marko/pull/940)
+* Fix issue with multiple top level elements being removed twice. [#940](https://github.com/marko-js/marko/pull/940)
### 4.7.0
-- Add jQuery legacy compatibility layer support [#937](https://github.com/marko-js/marko/pull/937)
+* Add jQuery legacy compatibility layer support [#937](https://github.com/marko-js/marko/pull/937)
-- Reorganize Marko tests [#934](https://github.com/marko-js/marko/pull/934)
+* Reorganize Marko tests [#934](https://github.com/marko-js/marko/pull/934)
-- Switch to using jsdom in test suite [#935](https://github.com/marko-js/marko/pull/935)
+* Switch to using jsdom in test suite [#935](https://github.com/marko-js/marko/pull/935)
-- Decouple component hydration from Lasso [#929](https://github.com/marko-js/marko/pull/929)
+* Decouple component hydration from Lasso [#929](https://github.com/marko-js/marko/pull/929)
## 4.6.x
### 4.6.0
-- Fixes [#914](https://github.com/marko-js/marko/issues/914) and [#920](https://github.com/marko-js/marko/issues/920) -
-Resolves top-level component bugs
+* Fixes [#914](https://github.com/marko-js/marko/issues/914) and [#920](https://github.com/marko-js/marko/issues/920) -
+ Resolves top-level component bugs
-- Setup `marko.load()` to prefer precompiled templates from [marko-cli](https://github.com/marko-js/marko-cli)
+* Setup `marko.load()` to prefer precompiled templates from [marko-cli](https://github.com/marko-js/marko-cli)
-- Various compiler changes to improve [marko-migrate](https://github.com/marko-js/marko-migrate)
+* Various compiler changes to improve [marko-migrate](https://github.com/marko-js/marko-migrate)
-- Fixes [#916](https://github.com/marko-js/marko/pull/916) - Add Marko debug mode.
-Adds babel plugin to remove and statically evaluate 'MARKO_DEBUG' literals for
-adding deprecation warnings and hints for the runtime without a performance
-penalty for production builds.
+* Fixes [#916](https://github.com/marko-js/marko/pull/916) - Add Marko debug mode.
+ Adds babel plugin to remove and statically evaluate 'MARKO_DEBUG' literals for
+ adding deprecation warnings and hints for the runtime without a performance
+ penalty for production builds.
## 4.5.x
### 4.5.6
-- Fixes [#909](https://github.com/marko-js/marko/issues/909) - Fix condition preventing bubbling DOM events from properly being attached to a component.
+* Fixes [#909](https://github.com/marko-js/marko/issues/909) - Fix condition preventing bubbling DOM events from properly being attached to a component.
### 4.5.5
-- Add 10 Awesome Marko Features article to documentation
+* Add 10 Awesome Marko Features article to documentation
### 4.5.4
-- Fixes [#904](https://github.com/marko-js/marko/issues/904) - The loop status variable is not compiling when the equal sign is padded in spacing
+* Fixes [#904](https://github.com/marko-js/marko/issues/904) - The loop status variable is not compiling when the equal sign is padded in spacing
### 4.5.3
-- Fixes [#903](https://github.com/marko-js/marko/issues/903) - Special unicode chars (\u2028 and \u2029) need to be escaped if within script tag
+* Fixes [#903](https://github.com/marko-js/marko/issues/903) - Special unicode chars (\u2028 and \u2029) need to be escaped if within script tag
### 4.5.2
-- Fixes [#899](https://github.com/marko-js/marko/issues/899) - Keyed element could be incorrectly removed after DOM diffing/patching in case of HTML element mismatch for elements with the same key. [PR #900](https://github.com/marko-js/marko/pull/900)
+* Fixes [#899](https://github.com/marko-js/marko/issues/899) - Keyed element could be incorrectly removed after DOM diffing/patching in case of HTML element mismatch for elements with the same key. [PR #900](https://github.com/marko-js/marko/pull/900)
### 4.5.1
-- Fixes [#893](https://github.com/marko-js/marko/issues/893) - Keyed element could be incorrectly removed after DOM diffing/patching in case of HTML element mismatch for elements with the same key. [PR #894](https://github.com/marko-js/marko/pull/894) by [@westtrade](https://github.com/westtrade)
+* Fixes [#893](https://github.com/marko-js/marko/issues/893) - Keyed element could be incorrectly removed after DOM diffing/patching in case of HTML element mismatch for elements with the same key. [PR #894](https://github.com/marko-js/marko/pull/894) by [@westtrade](https://github.com/westtrade)
### 4.5.0
Summary of changes across all beta releases for the `4.5.0` release:
-- Fixes [#886](https://github.com/marko-js/marko/issues/886) - Write component initialization code when async out and all of its nested async outs finish
-- Fixes [#854](https://github.com/marko-js/marko/issues/854) - Make every .marko file a UI component ([PR #855](https://github.com/marko-js/marko/pull/855))
-- Added support for the `:scoped` modifier on attributes and deprecated `:key`:
+* Fixes [#886](https://github.com/marko-js/marko/issues/886) - Write component initialization code when async out and all of its nested async outs finish
+* Fixes [#854](https://github.com/marko-js/marko/issues/854) - Make every .marko file a UI component ([PR #855](https://github.com/marko-js/marko/pull/855))
+* Added support for the `:scoped` modifier on attributes and deprecated `:key`:
```marko
Name
```
-- Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements
-- Marko no longer attaches `id` attributes to elements for purposes of keyed matching
- - Keyed elements are maintained in an internal, per-component lookup
-- Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing
-- Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack)
-- DOM diffing/patching changes:
- - Significant performance improvements
- - morphdom is now UI component-aware
+* Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements
+* Marko no longer attaches `id` attributes to elements for purposes of keyed matching
+ * Keyed elements are maintained in an internal, per-component lookup
+* Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing
+* Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack)
+* DOM diffing/patching changes:
+ * Significant performance improvements
+ * morphdom is now UI component-aware
### 4.5.0-beta.3
-- Fixes [#854](https://github.com/marko-js/marko/issues/854) - Make every .marko file a UI component ([PR #855](https://github.com/marko-js/marko/pull/855))
+* Fixes [#854](https://github.com/marko-js/marko/issues/854) - Make every .marko file a UI component ([PR #855](https://github.com/marko-js/marko/pull/855))
### 4.5.0-beta.2
-- Add ids for any key when component.elId/getElId is used as an attribute value
-- Use indexOf instead of includes to support Node 4
-- [docs] Fixes [#841](https://github.com/marko-js/marko/issues/841) - `docs/components.md` refers to deprecated "data" variable (#842)
+* Add ids for any key when component.elId/getElId is used as an attribute value
+* Use indexOf instead of includes to support Node 4
+* [docs] Fixes [#841](https://github.com/marko-js/marko/issues/841) - `docs/components.md` refers to deprecated "data" variable (#842)
### 4.5.0-beta.1
-- Add back (legacy) support for component.elId + key in template
-- Fixes [#837](https://github.com/marko-js/marko/issues/837) - Update esprima to the latest to support async/await and ES2017 inside of components. ([PR #839](https://github.com/marko-js/marko/pull/839))
-- Fixes key/scope for attributes that have dashes in the name
+* Add back (legacy) support for component.elId + key in template
+* Fixes [#837](https://github.com/marko-js/marko/issues/837) - Update esprima to the latest to support async/await and ES2017 inside of components. ([PR #839](https://github.com/marko-js/marko/pull/839))
+* Fixes key/scope for attributes that have dashes in the name
### 4.5.0-beta.0
-- Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements
-- Marko no longer attaches `id` attributes to elements for purposes of keyed matching
- - Keyed elements are maintained in an internal, per-component lookup
-- Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing
-- Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack)
-- DOM diffing/patching changes:
- - Significant performance improvements
- - morphdom is now UI component-aware
+* Fixes [#817](https://github.com/marko-js/marko/issues/817) - Support dynamic root elements
+* Marko no longer attaches `id` attributes to elements for purposes of keyed matching
+ * Keyed elements are maintained in an internal, per-component lookup
+* Keys are now assigned to all custom tags and HTML elements at compile-time to improve reliability and performance of DOM diffing
+* Optimized internal bookkeeping required during rendering a UI component tree (no more UI component stack)
+* DOM diffing/patching changes:
+ * Significant performance improvements
+ * morphdom is now UI component-aware
## 4.4.x
### 4.4.28
-- fix undefined reference error in Component.js
-- Increase mocha timeout to avoid CI build's failing (#821)
+* fix undefined reference error in Component.js
+* Increase mocha timeout to avoid CI build's failing (#821)
### 4.4.27
-- Add ability to update globals by setting new input.
-- [docs] Remove uneeded command from installation docs
-- [docs] Update installing.md
+* Add ability to update globals by setting new input.
+* [docs] Remove uneeded command from installation docs
+* [docs] Update installing.md
### 4.4.26
-- Add better interop for importing modules with default exports (#803)
+* Add better interop for importing modules with default exports (#803)
### 4.4.25
-- Fixes #778 - Fix Marko compiler generating incorrect path for requires on Windows.
+* Fixes #778 - Fix Marko compiler generating incorrect path for requires on Windows.
### 4.4.24
-- [docs] Update installing.md
+* [docs] Update installing.md
### 4.4.23
-- Fixes #796 - Fix events for event targets that are SVGElementInstance types in IE11.
-- Used shortcut for escapeAtTags;
-- Added `escapeAtTags` options in order to render `<@tags>` as they are;
-- simplify a condition judgement in components-jquery
-- Fixes #790 - Class tag should not allow nested body content.
-- Update `compile/index.js` test description
-- Update handleRootNodes.js (#747)
-- [docs] Fix reference to lifecycle section in docs.
+* Fixes #796 - Fix events for event targets that are SVGElementInstance types in IE11.
+* Used shortcut for escapeAtTags;
+* Added `escapeAtTags` options in order to render `<@tags>` as they are;
+* simplify a condition judgement in components-jquery
+* Fixes #790 - Class tag should not allow nested body content.
+* Update `compile/index.js` test description
+* Update handleRootNodes.js (#747)
+* [docs] Fix reference to lifecycle section in docs.
### 4.4.22
-- Fixes #784 - Fix compiled preserve-attrs path.
-- [testing] Fix express tests (#779)
-- [docs] Update webpack.md
+* Fixes #784 - Fix compiled preserve-attrs path.
+* [testing] Fix express tests (#779)
+* [docs] Update webpack.md
### 4.4.21
-- Updated description in `package.json`
+* Updated description in `package.json`
### 4.4.20
-- update bindComponentVar to use dynamic location
-- updating location of bindComponent helper
+* update bindComponentVar to use dynamic location
+* updating location of bindComponent helper
### 4.4.19
-- [testing] Fix key suffix test assertions.
-- Address key suffix feedback. Additional tests.
-- [morphdom] Removed bad and unhelpful optimization to avoid infinite loops
-- [morphdom] Ensure `onBeforeNodeDiscarded` is only called once by looking to see if the node is still attached.
-- [morphdom] Infinite loop fix in morphdom
-- Fixes #761 - component.elId() does not work on the server
-- Fixes #755 - Allow diffing of HTML, head, and body. (#756)
-- [docs] Updated component docs
-- [docs] Use relative link for image
-- [testing] User default npm version for each Node.js version
+* [testing] Fix key suffix test assertions.
+* Address key suffix feedback. Additional tests.
+* [morphdom] Removed bad and unhelpful optimization to avoid infinite loops
+* [morphdom] Ensure `onBeforeNodeDiscarded` is only called once by looking to see if the node is still attached.
+* [morphdom] Infinite loop fix in morphdom
+* Fixes #761 - component.elId() does not work on the server
+* Fixes #755 - Allow diffing of HTML, head, and body. (#756)
+* [docs] Updated component docs
+* [docs] Use relative link for image
+* [testing] User default npm version for each Node.js version
### 4.4.18
-- Fixes #749 #690 - Do not rely on root node having an ID on rerender and properly handle style root nodes.
+* Fixes #749 #690 - Do not rely on root node having an ID on rerender and properly handle style root nodes.
### 4.4.17
-- Put package (`browser.json`) deps before others and parent deps before child deps (#750)
-- [docs] Fix typo in redux.md
-- [docs] Add redux document to structure.json
-- [docs] Add doc describing how to use Redux with Marko.
+* Put package (`browser.json`) deps before others and parent deps before child deps (#750)
+* [docs] Fix typo in redux.md
+* [docs] Add redux document to structure.json
+* [docs] Add doc describing how to use Redux with Marko.
### 4.4.16
-- Fix duplicate body variable
+* Fix duplicate body variable
### 4.4.15
-- Fixes #739 - Should not attempt to check instanceof of type Map if it does not exist in the browser.
-- Added build scripts
+* Fixes #739 - Should not attempt to check instanceof of type Map if it does not exist in the browser.
+* Added build scripts
### 4.4.14
-- Fixes issue with renderToString not rendering text nodes
+* Fixes issue with renderToString not rendering text nodes
### 4.4.13
-- Fixes #721 - Add a Code of Conduct
-- Fixes #655 - Implement renderToString in the browser.
+* Fixes #721 - Add a Code of Conduct
+* Fixes #655 - Implement renderToString in the browser.
### 4.4.12
-- Fixes #695 - Always ignore unrecognized tags for XML files when using the compiler.
-- Fixes #705 - Throw error when the root HTML element is a component and has a dynamic id attribute.
-- [testing] Additional test for root node with dynamic id of a component with a component.js file.
+* Fixes #695 - Always ignore unrecognized tags for XML files when using the compiler.
+* Fixes #705 - Throw error when the root HTML element is a component and has a dynamic id attribute.
+* [testing] Additional test for root node with dynamic id of a component with a component.js file.
### 4.4.11
-- Fixes #728 - Do not use module keyword because webpack compiles it to a custom object.
-- Fixes #719 - Support Express 4 and Express 5.
-- fixes #658 by removing empty style blocks (#715)
-- fixes #688 - add reference to browser.json in meta dependencies
-- [docs] Fix broken link
-- [docs] Fix Marko syntax in docs causing compilation errors on the website.
-- [docs] Change pixels to percent in doc images.
-- [testing] Purge express cache so that express tests both use correct module versions.
+* Fixes #728 - Do not use module keyword because webpack compiles it to a custom object.
+* Fixes #719 - Support Express 4 and Express 5.
+* fixes #658 by removing empty style blocks (#715)
+* fixes #688 - add reference to browser.json in meta dependencies
+* [docs] Fix broken link
+* [docs] Fix Marko syntax in docs causing compilation errors on the website.
+* [docs] Change pixels to percent in doc images.
+* [testing] Purge express cache so that express tests both use correct module versions.
### 4.4.9
-- Revert "Fixes #705 - Throw error when the root HTML element has a dynamic id …"
-- [testing] Only run Node 4, 6, & 8 in travis
+* Revert "Fixes #705 - Throw error when the root HTML element has a dynamic id …"
+* [testing] Only run Node 4, 6, & 8 in travis
### 4.4.8
-- [docs] Clean up why-is-marko-fast.md
-- [docs] Clean up marko-vs-react.md
+* [docs] Clean up why-is-marko-fast.md
+* [docs] Clean up marko-vs-react.md
### 4.4.7
-- Add silent option to browser-refresh and hot-reload
-- Check id attribute for Literal. Update error message to include error page.
-- Fixes #705 - Throw error when the root HTML element has a dynamic id attribute.
-- [docs] Clean up components.md
-- [docs] Fix typo in webpack.md
-- [testing] give extra time for test timing out in travis
-- [testing] run tests on node 8
-- [testing] ignore test-dist from coverage
+* Add silent option to browser-refresh and hot-reload
+* Check id attribute for Literal. Update error message to include error page.
+* Fixes #705 - Throw error when the root HTML element has a dynamic id attribute.
+* [docs] Clean up components.md
+* [docs] Fix typo in webpack.md
+* [testing] give extra time for test timing out in travis
+* [testing] run tests on node 8
+* [testing] ignore test-dist from coverage
### 4.4.6
-- Fixes #693 - [SSR] Improved handling of top-level UI components with renderBody func
-- Switching to using `prepublish` with npm@5
+* Fixes #693 - [SSR] Improved handling of top-level UI components with renderBody func
+* Switching to using `prepublish` with npm@5
### 4.4.3
-- Use parent module to require express patch (#701)
-- [docs] Reference app should point to "marko-lasso" because "ui-components-playground" does not contain lasso
-- [docs] Add articles section to docs.
+* Use parent module to require express patch (#701)
+* [docs] Reference app should point to "marko-lasso" because "ui-components-playground" does not contain lasso
+* [docs] Add articles section to docs.
### 4.4.2
-- Build fixes related to compiler
+* Build fixes related to compiler
### 4.4.0
-- Improve no-update-if condition check
-- Compatibility improvements for Try Online
-- Code size reduction
-- Introduced src/ and dist/ folders for optimized production builds
-- Fixes #695 - Default to ignoring unrecognized tags for XML files.
+* Improve no-update-if condition check
+* Compatibility improvements for Try Online
+* Code size reduction
+* Introduced src/ and dist/ folders for optimized production builds
+* Fixes #695 - Default to ignoring unrecognized tags for XML files.
## 4.3.x
### 4.3.1
-- Add basic test for ensuring that res.marko returns a promise.
-- enable res.marko can catch a error safe
+* Add basic test for ensuring that res.marko returns a promise.
+* enable res.marko can catch a error safe
### 4.3.0
-- [compiler] Added more control over how attributes are targeted to props
-- Don't add root markers to tags that don't produce output
-- [docs] Added docs for Marko + Huncwot integration
-- [AST] Added `node.removeChildren()`
-- Extend marko globals with defaults
+* [compiler] Added more control over how attributes are targeted to props
+* Don't add root markers to tags that don't produce output
+* [docs] Added docs for Marko + Huncwot integration
+* [AST] Added `node.removeChildren()`
+* Extend marko globals with defaults
### 4.3.0-beta.4
-- Fixes #673 - Circular dependency is causing problems with Webpack
+* Fixes #673 - Circular dependency is causing problems with Webpack
### 4.3.0-beta.3
-- Changes related to #670 - Globals must be serialized earlier to allow early mount of UI components in
-- [docs] Improved docs for SSR
+* Changes related to #670 - Globals must be serialized earlier to allow early mount of UI components in
+* [docs] Improved docs for SSR
### 4.3.0-beta.2
-- Fixes for #670 - Add support for serialized globals and retain globals on re-render
+* Fixes for #670 - Add support for serialized globals and retain globals on re-render
## 4.2.x
-
### 4.2.8
-- Bug: Fixes [#661](https://github.com/marko-js/marko/issues/661) - Component initialization code may end up in the wrong place
-- Bug: Fixes [#668](https://github.com/marko-js/marko/issues/668) - Declarative event listeners are now allowed on the `` tag
+* Bug: Fixes [#661](https://github.com/marko-js/marko/issues/661) - Component initialization code may end up in the wrong place
+* Bug: Fixes [#668](https://github.com/marko-js/marko/issues/668) - Declarative event listeners are now allowed on the `` tag
### 4.2.7
-- Bug: Fixes [#650](https://github.com/marko-js/marko/issues/650) - The tag "await" does not support attribute "unless"
-- Improvements to legacy state
+* Bug: Fixes [#650](https://github.com/marko-js/marko/issues/650) - The tag "await" does not support attribute "unless"
+* Improvements to legacy state
### 4.2.6
-- Bug: Fixes [#654](https://github.com/marko-js/marko/issues/654) - Bug: components implementing a `key` attribute break in Marko v4
-- Improvements to legacy compatibility layer
+* Bug: Fixes [#654](https://github.com/marko-js/marko/issues/654) - Bug: components implementing a `key` attribute break in Marko v4
+* Improvements to legacy compatibility layer
### 4.2.5
-- Improved support for UI components implemented using native JavaScript class in a separate file
-- Improved how legacy layout tags are handled by Marko v4
+* Improved support for UI components implemented using native JavaScript class in a separate file
+* Improved how legacy layout tags are handled by Marko v4
### 4.2.4
-- Bug: Fixes [#653](https://github.com/marko-js/marko/issues/653) - Event handlers are no longer bound in edge case
+* Bug: Fixes [#653](https://github.com/marko-js/marko/issues/653) - Event handlers are no longer bound in edge case
### 4.2.3
-- Bug: Fixes [#649](https://github.com/marko-js/marko/issues/649) - New line always added to `textarea` and other elements for single line/delimited HTML blocks
+* Bug: Fixes [#649](https://github.com/marko-js/marko/issues/649) - New line always added to `textarea` and other elements for single line/delimited HTML blocks
### 4.2.2
-- Bug: Fixes [#648](https://github.com/marko-js/marko/issues/648) - Style attribute object and lengths not handled properly
+* Bug: Fixes [#648](https://github.com/marko-js/marko/issues/648) - Style attribute object and lengths not handled properly
### 4.2.1
-- Bug: Fixed [#644](https://github.com/marko-js/marko/issues/644) - Attribute not rendered by Marko is not preserved if component first rendered on the server
-- [Performance] Escaping is not needed for the `data-marko` attribute
+* Bug: Fixed [#644](https://github.com/marko-js/marko/issues/644) - Attribute not rendered by Marko is not preserved if component first rendered on the server
+* [Performance] Escaping is not needed for the `data-marko` attribute
### 4.2.0
-- Bug: Fixed [#629](https://github.com/marko-js/marko/issues/629) - VDOM: Rendering unescaped HTML produces non-functioning HTML input controls
-- Bug: Fixed [#634](https://github.com/marko-js/marko/issues/634) - writeInitComponentsCode is not a function
-- Enhancement: Added support to allow improved precompiling of templates
-- Enhancement: Fixed [#636](https://github.com/marko-js/marko/issues/636) - Add error when macro with duplicate name is found
-- Performance: Optimized diffing/patching to avoid indexing entire tree to find keyed elements
-- Performance: Optimized how event handlers are attached to VDOM nodes (separated from attributes)
+* Bug: Fixed [#629](https://github.com/marko-js/marko/issues/629) - VDOM: Rendering unescaped HTML produces non-functioning HTML input controls
+* Bug: Fixed [#634](https://github.com/marko-js/marko/issues/634) - writeInitComponentsCode is not a function
+* Enhancement: Added support to allow improved precompiling of templates
+* Enhancement: Fixed [#636](https://github.com/marko-js/marko/issues/636) - Add error when macro with duplicate name is found
+* Performance: Optimized diffing/patching to avoid indexing entire tree to find keyed elements
+* Performance: Optimized how event handlers are attached to VDOM nodes (separated from attributes)
## 4.1.x
### 4.1.3
-- Bug: Fixed losing cursor position in Edge (see [morphdom PR #100](https://github.com/patrick-steele-idem/morphdom/pull/100) by [@zastavnitskiy](https://github.com/zastavnitskiy))
-- Bug: Ignore `xmlns` attributes when virtualizing real DOM nodes (needed when inserting an HTML string when rendering to a VDOM)
+* Bug: Fixed losing cursor position in Edge (see [morphdom PR #100](https://github.com/patrick-steele-idem/morphdom/pull/100) by [@zastavnitskiy](https://github.com/zastavnitskiy))
+* Bug: Ignore `xmlns` attributes when virtualizing real DOM nodes (needed when inserting an HTML string when rendering to a VDOM)
### 4.1.2
-- Bug: Fixed [#623](https://github.com/marko-js/marko/issues/623) - Uncaught TypeError: `toEl.$__hasAttribute` is not a function
-- Bug: Fixed [#619](https://github.com/marko-js/marko/issues/619) - Deprecated `constructor()` for UI component classes
+* Bug: Fixed [#623](https://github.com/marko-js/marko/issues/623) - Uncaught TypeError: `toEl.$__hasAttribute` is not a function
+* Bug: Fixed [#619](https://github.com/marko-js/marko/issues/619) - Deprecated `constructor()` for UI component classes
### 4.1.1
-- Added `"use strict";` to restore Node.js compatibility for Node.js v4 and v5
+* Added `"use strict";` to restore Node.js compatibility for Node.js v4 and v5
### 4.1.0
-- Bug: Fixes [#611](https://github.com/marko-js/marko/issues/611) - Component IDs are not being assigned correctly when intermediate non-component is rendered
-- Performance: SVG namespaced elements are now resolved determined at compile-time
-- Performance: Merged in `morphdom` and optimized for Marko
-- Performance: Optimized diffing/patching of elements with only simple attributes in the following set: `class`, `id` and `style`
+* Bug: Fixes [#611](https://github.com/marko-js/marko/issues/611) - Component IDs are not being assigned correctly when intermediate non-component is rendered
+* Performance: SVG namespaced elements are now resolved determined at compile-time
+* Performance: Merged in `morphdom` and optimized for Marko
+* Performance: Optimized diffing/patching of elements with only simple attributes in the following set: `class`, `id` and `style`
## 4.0.x
### 4.0.1
-- Bug: Fixes [#612](https://github.com/marko-js/marko/issues/612) - Compile error when class method has empty `return`
-- Bug: Fixes [#604](https://github.com/marko-js/marko/issues/604) - `no-update` attributes error when first rendered on the server
-- Bug: Fixes [#608](https://github.com/marko-js/marko/issues/608) - Component losing `renderBody` input on a particular redraw
-- Enhancement: Fixes [#606](https://github.com/marko-js/marko/issues/606) - named single-file component doesn't work
+* Bug: Fixes [#612](https://github.com/marko-js/marko/issues/612) - Compile error when class method has empty `return`
+* Bug: Fixes [#604](https://github.com/marko-js/marko/issues/604) - `no-update` attributes error when first rendered on the server
+* Bug: Fixes [#608](https://github.com/marko-js/marko/issues/608) - Component losing `renderBody` input on a particular redraw
+* Enhancement: Fixes [#606](https://github.com/marko-js/marko/issues/606) - named single-file component doesn't work
### 4.0.0
-- Marko v4! [Release Announcement](https://medium.com/@mlrawlings/marko-4-0-is-here-837884c5f60d)
+* Marko v4! [Release Announcement](https://medium.com/@mlrawlings/marko-4-0-is-here-837884c5f60d)
# 3.x
@@ -419,11 +417,11 @@ Summary of changes across all beta releases for the `4.5.0` release:
### 3.13.2
-- Fixed [#478](TagLookup fails when merging taglibs) - TagLookup fails when merging taglibs
+* Fixed [#478](TagLookup fails when merging taglibs) - TagLookup fails when merging taglibs
### 3.13.1
-- Fixes [#465](https://github.com/marko-js/marko/issues/465)
+* Fixes [#465](https://github.com/marko-js/marko/issues/465)
### 3.13.0
@@ -431,53 +429,53 @@ Summary of changes across all beta releases for the `4.5.0` release:
### 3.12.0
-- Added warnings for using render methods when you want string output ([Pull Request #450](https://github.com/marko-js/marko/pull/450) by [@mlrawlings](https://github.com/mlrawlings))
+* Added warnings for using render methods when you want string output ([Pull Request #450](https://github.com/marko-js/marko/pull/450) by [@mlrawlings](https://github.com/mlrawlings))
## 3.11.x
### 3.11.8
-- Fixes [#382](https://github.com/marko-js/marko/issues/382) - Local variable for tag should have prefix or suffix to avoid conflict
+* Fixes [#382](https://github.com/marko-js/marko/issues/382) - Local variable for tag should have prefix or suffix to avoid conflict
### 3.11.7
-- Fixes [#381](https://github.com/marko-js/marko/issues/381) - `$global` broken when using `template.stream()`
+* Fixes [#381](https://github.com/marko-js/marko/issues/381) - `$global` broken when using `template.stream()`
### 3.11.6
-- Internal change: `AsyncWriter` → `AsyncStream`
+* Internal change: `AsyncWriter` → `AsyncStream`
### 3.11.5
-- (no changes)
+* (no changes)
### 3.11.4
-- Update to `async-writer@2`
+* Update to `async-writer@2`
### 3.11.3
-- Silently ignore errors when parsing tag definition code inlined in JavaScript
+* Silently ignore errors when parsing tag definition code inlined in JavaScript
### 3.11.2
-- Fixed [#318](https://github.com/marko-js/marko/issues/318) - Use compiler options passed to require hook to configure marko globally
+* Fixed [#318](https://github.com/marko-js/marko/issues/318) - Use compiler options passed to require hook to configure marko globally
```javascript
-require('marko/node-require').install({
- compilerOptions: {
- writeToDisk: false
- }
+require("marko/node-require").install({
+ compilerOptions: {
+ writeToDisk: false
+ }
});
```
### 3.11.1
-- Fixed [#370](https://github.com/marko-js/marko/issues/370) - HTML characters in loop separator string should not be escaped
+* Fixed [#370](https://github.com/marko-js/marko/issues/370) - HTML characters in loop separator string should not be escaped
### 3.11.0
-- Introduced the `` tag for including static HTML:
+* Introduced the `` tag for including static HTML:
```xml
@@ -487,92 +485,92 @@ require('marko/node-require').install({
### 3.10.1
-- Fixed [#44](https://github.com/marko-js/marko/issues/44) - Webpack compatibility fixes. Also see [marko-loader](https://github.com/marko-js/marko-loader) (A marko loader for webpack)
+* Fixed [#44](https://github.com/marko-js/marko/issues/44) - Webpack compatibility fixes. Also see [marko-loader](https://github.com/marko-js/marko-loader) (A marko loader for webpack)
### 3.10.0
-- Fixed [#357](https://github.com/marko-js/marko/issues/357) - Deprecate `empty`/`notEmpty` in Marko v3
+* Fixed [#357](https://github.com/marko-js/marko/issues/357) - Deprecate `empty`/`notEmpty` in Marko v3
## 3.9.x
### 3.9.4
-- Fixed [#355](https://github.com/marko-js/marko/issues/355) - `status-var`/`separator` options not handled when looping over properties
-- Fixed [#354](https://github.com/marko-js/marko/issues/354) - regular expressions used in attribute values are not being handled correctly
-- Fixed [#353](https://github.com/marko-js/marko/issues/353) - `body-only-if` attribute does not work with custom tags (only HTML tags)
+* Fixed [#355](https://github.com/marko-js/marko/issues/355) - `status-var`/`separator` options not handled when looping over properties
+* Fixed [#354](https://github.com/marko-js/marko/issues/354) - regular expressions used in attribute values are not being handled correctly
+* Fixed [#353](https://github.com/marko-js/marko/issues/353) - `body-only-if` attribute does not work with custom tags (only HTML tags)
### 3.9.3
-- Upgraded to `raptor-util@^2`
+* Upgraded to `raptor-util@^2`
### 3.9.2
-- Fixed [#327](https://github.com/marko-js/marko/issues/327) - alt attribute with empty string should be allowed ([Pull Request #350](https://github.com/marko-js/marko/pull/350) by [@mlrawlings](https://github.com/mlrawlings))
+* Fixed [#327](https://github.com/marko-js/marko/issues/327) - alt attribute with empty string should be allowed ([Pull Request #350](https://github.com/marko-js/marko/pull/350) by [@mlrawlings](https://github.com/mlrawlings))
### 3.9.1
-- Fixed [#348](https://github.com/marko-js/marko/issues/348) - exclude all `*.orig` and other files from published npm package
+* Fixed [#348](https://github.com/marko-js/marko/issues/348) - exclude all `*.orig` and other files from published npm package
### 3.9.0
-- Fixed [#231](https://github.com/marko-js/marko/issues/231) - Allow
-- Fixed [#345](https://github.com/marko-js/marko/issues/345) - Whitespace preservation now applies to all deeply nested text nodes
-- Fixed [#344](https://github.com/marko-js/marko/issues/344) - Introduced [defineRenderer](./docs/javascript-api.md#requiremarkodefinerenderer) for Marko
-- Docs: Added docs for excluding directories from taglib discovery ([@mlrawlings](https://github.com/mlrawlings))
-- Docs: Added docs for component autodiscovery ([@mlrawlings](https://github.com/mlrawlings))
-- Docs: Added docs for passing a data object to a custom tag
+* Fixed [#231](https://github.com/marko-js/marko/issues/231) - Allow
+* Fixed [#345](https://github.com/marko-js/marko/issues/345) - Whitespace preservation now applies to all deeply nested text nodes
+* Fixed [#344](https://github.com/marko-js/marko/issues/344) - Introduced [defineRenderer](./docs/javascript-api.md#requiremarkodefinerenderer) for Marko
+* Docs: Added docs for excluding directories from taglib discovery ([@mlrawlings](https://github.com/mlrawlings))
+* Docs: Added docs for component autodiscovery ([@mlrawlings](https://github.com/mlrawlings))
+* Docs: Added docs for passing a data object to a custom tag
## 3.8.x
### 3.8.1
-- Fixed [#342](https://github.com/marko-js/marko/issues/342) - `await:finish` event not emitted for async fragments with client reorder and that complete synchronously
+* Fixed [#342](https://github.com/marko-js/marko/issues/342) - `await:finish` event not emitted for async fragments with client reorder and that complete synchronously
### 3.8.0
-- Fixed [#329](https://github.com/marko-js/marko/issues/329) - Add autodiscover of components/ directory ([Pull Request #338](https://github.com/marko-js/marko/pull/338) by [@mlrawlings](https://github.com/mlrawlings))
+* Fixed [#329](https://github.com/marko-js/marko/issues/329) - Add autodiscover of components/ directory ([Pull Request #338](https://github.com/marko-js/marko/pull/338) by [@mlrawlings](https://github.com/mlrawlings))
## 3.7.x
### 3.7.4
-- Fixed [#339](https://github.com/marko-js/marko/issues/339) - Tag transformers are not being applied to tags with a dynamic tag name (fixes [#146](https://github.com/marko-js/marko-components/issues/146) for Marko Components)
+* Fixed [#339](https://github.com/marko-js/marko/issues/339) - Tag transformers are not being applied to tags with a dynamic tag name (fixes [#146](https://github.com/marko-js/marko-components/issues/146) for Marko Components)
### 3.7.3
-- Fixed [#332](https://github.com/marko-js/marko/issues/332) and [#333](https://github.com/marko-js/marko/issues/333) - Correct values for `literalUndefined` and `literalFalse` in the Builder API [@bkuri](https://github.com/bkuri)
-- Fixed [#336](https://github.com/marko-js/marko/issues/336) - Upgraded to latest version of `minimatch`
+* Fixed [#332](https://github.com/marko-js/marko/issues/332) and [#333](https://github.com/marko-js/marko/issues/333) - Correct values for `literalUndefined` and `literalFalse` in the Builder API [@bkuri](https://github.com/bkuri)
+* Fixed [#336](https://github.com/marko-js/marko/issues/336) - Upgraded to latest version of `minimatch`
### 3.7.2
-- Fixed [#328](https://github.com/marko-js/marko/issues/328) - Improve error reporting when taglib/tag definition fails to load
-- Additional change to disable escaping for dynamic `Text` nodes added to body of `` tag sequence is escaped using JavaScript string escaping sequences.
+* Improved escaping within the `` tag sequence is escaped using JavaScript string escaping sequences.
### 3.7.0
-- Made change to make configuration a true singleton shared across all instances of `marko` loaded at runtime ([commit](https://github.com/marko-js/marko/commit/cd797322adf80f2890015de7b8f62301c2921a0a))
+* Made change to make configuration a true singleton shared across all instances of `marko` loaded at runtime ([commit](https://github.com/marko-js/marko/commit/cd797322adf80f2890015de7b8f62301c2921a0a))
## 3.6.x
### 3.6.2
-- Improved support for hot reloading by automatically disabling `assumeUpToDate` if hot reload is enabled. ([Pull Request #320](https://github.com/marko-js/marko/pull/320) by [@ianvonholt](https://github.com/ianvonholt))
+* Improved support for hot reloading by automatically disabling `assumeUpToDate` if hot reload is enabled. ([Pull Request #320](https://github.com/marko-js/marko/pull/320) by [@ianvonholt](https://github.com/ianvonholt))
### 3.6.1
-- Fixed a bug that was causing transforms to be run on detached nodes. This was manifesting itself in the `` to `` transform if an `if()` attribute was present (or other core attributes that end up wrapping the tag it is defined on).
+* Fixed a bug that was causing transforms to be run on detached nodes. This was manifesting itself in the `` to `` transform if an `if()` attribute was present (or other core attributes that end up wrapping the tag it is defined on).
### 3.6.0
-- Introduced a new and simpler `` tag that should be used instead of the now deprecated `` tag (see deprecation details below) ([Pull Request #312](https://github.com/marko-js/marko/pull/312) by [@mlrawlings](https://github.com/mlrawlings))
+* Introduced a new and simpler `` tag that should be used instead of the now deprecated `` tag (see deprecation details below) ([Pull Request #312](https://github.com/marko-js/marko/pull/312) by [@mlrawlings](https://github.com/mlrawlings))
#### Deprecations
-- Deprecated the `>` tag in favor of the ` from )>` tag:
+* Deprecated the `>` tag in favor of the ` from )>` tag:
OLD:
@@ -620,10 +618,10 @@ Finally, the nested tags for providing content for the placeholder, error and ti
### 3.5.1
-- Fixes #316 - Autocomplete for tags is not updated when tag files updated despite clearing cache. This improves the [autocomplete-marko](https://github.com/marko-js/atom-autocomplete-marko) plugin for Atom.
-- Fixes #314 - Remove hyphens from include props
-- Deprecated:
- - Properties passed in using the `` tag should not be access using hyphens.
+* Fixes #316 - Autocomplete for tags is not updated when tag files updated despite clearing cache. This improves the [autocomplete-marko](https://github.com/marko-js/atom-autocomplete-marko) plugin for Atom.
+* Fixes #314 - Remove hyphens from include props
+* Deprecated:
+ * Properties passed in using the `` tag should not be access using hyphens.
For example, given the following template:
@@ -640,153 +638,153 @@ var firstName = input.firstName;
### 3.5.0
-- Added functionality to exclude specific directory or package from taglib finder ([Pull Request #309](https://github.com/marko-js/marko/pull/309) by [@oxala](https://github.com/oxala))
+* Added functionality to exclude specific directory or package from taglib finder ([Pull Request #309](https://github.com/marko-js/marko/pull/309) by [@oxala](https://github.com/oxala))
## 3.4.x
### 3.4.9
-- Fixed [https://github.com/marko-js/marko/issues/307] - Marko concise syntax, with multiple class names ([Pull Request #308](https://github.com/marko-js/marko/pull/308) by [@mlrawlings](https://github.com/mlrawlings))
+* Fixed [https://github.com/marko-js/marko/issues/307] - Marko concise syntax, with multiple class names ([Pull Request #308](https://github.com/marko-js/marko/pull/308) by [@mlrawlings](https://github.com/mlrawlings))
### 3.4.8
-- Added support for an "enum" attribute value
+* Added support for an "enum" attribute value
### 3.4.7
-- Async fragment improvements ([Pull Request #305](https://github.com/marko-js/marko/pull/305) by [@mlrawlings](https://github.com/mlrawlings))
- - Adds additional event info (finished/timedout) to the data emitted from tags.
- - Ensures that renderBody() is not called again if the fragment has already finished (timed out).
- - Fixes `npm run test-async`
- - Removes a redundant `async-fragment` timeout related test
+* Async fragment improvements ([Pull Request #305](https://github.com/marko-js/marko/pull/305) by [@mlrawlings](https://github.com/mlrawlings))
+ * Adds additional event info (finished/timedout) to the data emitted from tags.
+ * Ensures that renderBody() is not called again if the fragment has already finished (timed out).
+ * Fixes `npm run test-async`
+ * Removes a redundant `async-fragment` timeout related test
### 3.4.6
-- Updated autocomplete information
+* Updated autocomplete information
### 3.4.5
-- Fixes #304 - async-fragment-tag-transformer.js being loaded by PhantomJS
-- Updated taglibs with additional information to support tooling
-- Added [Michael Rawlings](https://github.com/mlrawlings) as a maintainer
+* Fixes #304 - async-fragment-tag-transformer.js being loaded by PhantomJS
+* Updated taglibs with additional information to support tooling
+* Added [Michael Rawlings](https://github.com/mlrawlings) as a maintainer
### 3.4.4
-- Fixes #303 - `addStaticVar` is not generating unique variable names correctly
+* Fixes #303 - `addStaticVar` is not generating unique variable names correctly
### 3.4.3
-- Improved validation for macros ([@mlrawlings](https://github.com/mlrawlings), [PR #300](https://github.com/marko-js/marko/pull/300))
-- Added code coverage reporting ([@mlrawlings](https://github.com/mlrawlings), [PR #301](https://github.com/marko-js/marko/pull/301))
+* Improved validation for macros ([@mlrawlings](https://github.com/mlrawlings), [PR #300](https://github.com/marko-js/marko/pull/300))
+* Added code coverage reporting ([@mlrawlings](https://github.com/mlrawlings), [PR #301](https://github.com/marko-js/marko/pull/301))
### 3.4.2
-- Improved error reporting in cases when code generation fails ([@mlrawlings](https://github.com/mlrawlings))
+* Improved error reporting in cases when code generation fails ([@mlrawlings](https://github.com/mlrawlings))
### 3.4.1
-- Additional tweaks for #298 - Always emit correct events for async fragments
+* Additional tweaks for #298 - Always emit correct events for async fragments
### 3.4.0
-- Fixes #298 - Always emit correct events for async fragments
-- Updated docs
+* Fixes #298 - Always emit correct events for async fragments
+* Updated docs
## 3.3.x
### 3.3.0
-- Include async fragment name in the `asyncFragmentFinish` events ([@kprakasam](https://github.com/kprakasam))
+* Include async fragment name in the `asyncFragmentFinish` events ([@kprakasam](https://github.com/kprakasam))
## 3.2.x
### 3.2.0
-- Fixes #286 - Add res.marko(templateData) for use with Express ([@mlrawlings](https://github.com/mlrawlings))
+* Fixes #286 - Add res.marko(templateData) for use with Express ([@mlrawlings](https://github.com/mlrawlings))
## 3.1.x
### 3.1.9
-- Fixes #288 - Provide API for discovering custom tags and attributes for autocomplete/tooling purposes
-- Documentation improvements
+* Fixes #288 - Provide API for discovering custom tags and attributes for autocomplete/tooling purposes
+* Documentation improvements
### 3.1.8
-- Fixes #280 - Switch from jsonminify to strip-json-comments
-- Updated docs for Koa and Hapi
-- Additional tests for Node.js v6
+* Fixes #280 - Switch from jsonminify to strip-json-comments
+* Updated docs for Koa and Hapi
+* Additional tests for Node.js v6
### 3.1.7
-- Fixes #274 - marko-compiler-options tag is not properly ended when using raw parsing (for prettyprint)
+* Fixes #274 - marko-compiler-options tag is not properly ended when using raw parsing (for prettyprint)
### 3.1.6
-- Fixes #268 - this.write is not a function for empty ArrayExpression
+* Fixes #268 - this.write is not a function for empty ArrayExpression
### 3.1.5
-- Fixes #262 - node-require module removes `.marko` extension from filenames in compiled code
+* Fixes #262 - node-require module removes `.marko` extension from filenames in compiled code
### 3.1.4
-- Fixes #267 - Shorthand CSS class name cannot be combined with object/array class names
+* Fixes #267 - Shorthand CSS class name cannot be combined with object/array class names
### 3.1.3
-- Fixed #266 - Hot reloading fails if original template is deleted
+* Fixed #266 - Hot reloading fails if original template is deleted
### 3.1.2
-- Fixed error reporting when using `compiler.parseRaw()`
-- Added test for #262
+* Fixed error reporting when using `compiler.parseRaw()`
+* Added test for #262
### 3.1.1
-- Improved whitespace removal for text nodes directly below the root
+* Improved whitespace removal for text nodes directly below the root
### 3.1.0
-- Fixes #254 - Allow preserve whitespace to be enabled at the global level
+* Fixes #254 - Allow preserve whitespace to be enabled at the global level
## 3.0.x
### 3.0.7
-- Fixes #240 - Always trim start and end of template (even if preserveWhitespace is true)
-- Fixes #260 - Circular custom tags causes infinite recursion when writeToDisk is set to false
-- Minor internal cleanup
+* Fixes #240 - Always trim start and end of template (even if preserveWhitespace is true)
+* Fixes #260 - Circular custom tags causes infinite recursion when writeToDisk is set to false
+* Minor internal cleanup
### 3.0.6
-- Don't wrap exception in `parseJavaScript` if error object was not created by Esprima
+* Don't wrap exception in `parseJavaScript` if error object was not created by Esprima
### 3.0.5
-- Fixes #257 - Placeholders don't render for out-of-order async fragments
+* Fixes #257 - Placeholders don't render for out-of-order async fragments
### 3.0.4
-- Fixes #256 - Convert attributes to title case if no attributes are declared for a custom tag
-- Use `` for out-of-order async fragment placeholders
+* Fixes #256 - Convert attributes to title case if no attributes are declared for a custom tag
+* Use `` for out-of-order async fragment placeholders
### 3.0.3
-- Make renderSync behave if no context was supplied ([PR #250](https://github.com/marko-js/marko/pull/250) by [@jsumners](https://github.com/jsumners))
+* Make renderSync behave if no context was supplied ([PR #250](https://github.com/marko-js/marko/pull/250) by [@jsumners](https://github.com/jsumners))
### 3.0.2
-- Store `tagDef` with `HtmlElement` node (needed for pretty printing)
+* Store `tagDef` with `HtmlElement` node (needed for pretty printing)
### 3.0.1
-- Docs: Fixed minor issues in docs
-- Reintroduced support for the `MARKO_CLEAN` environment variable: `MARK_CLEAN=true node server.js`
+* Docs: Fixed minor issues in docs
+* Reintroduced support for the `MARKO_CLEAN` environment variable: `MARK_CLEAN=true node server.js`
### 3.0.0
-- See: [What's New in Marko v3](http://markojs.com/docs/marko/what-is-new-marko-v3/)
+* See: [What's New in Marko v3](http://markojs.com/docs/marko/what-is-new-marko-v3/)
# 2.x
@@ -794,54 +792,52 @@ var firstName = input.firstName;
### 2.8.4
-- Fixes circular dependency issue between runtime/index.js and hot-reload/index.js
+* Fixes circular dependency issue between runtime/index.js and hot-reload/index.js
### 2.8.3
-- Fixes circular dependency issue between runtime/index.js and hot-reload/index.js
+* Fixes circular dependency issue between runtime/index.js and hot-reload/index.js
### 2.8.2
-- Fixes #203 - Incorrect behavior when attrs is used on a standard HTML tag with a tag def
+* Fixes #203 - Incorrect behavior when attrs is used on a standard HTML tag with a tag def
### 2.8.1
-- Fixes #202 - Pass along options to compiler when loading a template
+* Fixes #202 - Pass along options to compiler when loading a template
### 2.8.0
-- Added support for automatically discovering taglibs from installed packages that are scoped. ([PR #183](https://github.com/marko-js/marko/pull/183) by [@tropperstyle](https://github.com/tropperstyle))
+* Added support for automatically discovering taglibs from installed packages that are scoped. ([PR #183](https://github.com/marko-js/marko/pull/183) by [@tropperstyle](https://github.com/tropperstyle))
### 2.8.3
-- Fixes circular dependency issue between `hot-reload/index.js` and `runtime/index.js`
+* Fixes circular dependency issue between `hot-reload/index.js` and `runtime/index.js`
## 2.7.x
### 2.7.31
-- Fixes #167 - Nested tags only work one level deep
+* Fixes #167 - Nested tags only work one level deep
### 2.7.30
-- docs: don't exclude docs in .npmignore
+* docs: don't exclude docs in .npmignore
### 2.7.29
-- Fixes #161 - Nested tags with no body content are not handled correctly
+* Fixes #161 - Nested tags with no body content are not handled correctly
### 2.7.28
-- Fixes #140 - Also de-dupe cached taglibs in finder
+* Fixes #140 - Also de-dupe cached taglibs in finder
### 2.7.27
-- Make loading template from String template source easier:
+* Make loading template from String template source easier:
```javascript
-var template = marko.load(
- templatePath,
- 'Hello $!{data.name}!');
+var template = marko.load(templatePath, "Hello $!{data.name}!");
```
_NOTE: Loading directly from source only works on the server_
@@ -850,14 +846,14 @@ See [Pull Request #153](https://github.com/marko-js/marko/pull/153)
### 2.7.26
-- Use shorter relative paths in error messages
+* Use shorter relative paths in error messages
### 2.7.25
-- Fixes #150 - Provide option to prevent writing compiled templates to disk. Example usage:
+* Fixes #150 - Provide option to prevent writing compiled templates to disk. Example usage:
```javascript
-require('marko/compiler').defaultOptions.writeToDisk = false;
+require("marko/compiler").defaultOptions.writeToDisk = false;
```
NOTE: If you disable writing compiled templates to disk then it will be a little harder to debug errors in templates on the server since the stack trace will refer to a file that has not been written to disk.
@@ -866,123 +862,123 @@ For a more complete list of compiler options please see: http://markojs.com/docs
### 2.7.24
-- Fixes #140 - De-dupe taglibs by module name
-- Documentation: Miscellaneous changes
+* Fixes #140 - De-dupe taglibs by module name
+* Documentation: Miscellaneous changes
### 2.7.23
-- Fixed a typo for `rendererFunc` `in helpers.js` (commit: 0205a47f04911f34ca4d458970d710f81a143987)
+* Fixed a typo for `rendererFunc` `in helpers.js` (commit: 0205a47f04911f34ca4d458970d710f81a143987)
### 2.7.22
-- New language feature: [`unless` support added](http://markojs.com/docs/marko/language-guide/#unlesselse-ifelse)
+* New language feature: [`unless` support added](http://markojs.com/docs/marko/language-guide/#unlesselse-ifelse)
### 2.7.21
-- Automatically enable hot-reload and browser-refresh if launched using [browser-refresh](https://github.com/patrick-steele-idem/browser-refresh)
+* Automatically enable hot-reload and browser-refresh if launched using [browser-refresh](https://github.com/patrick-steele-idem/browser-refresh)
### 2.7.20
-- Documentation: Miscellaneous changes
+* Documentation: Miscellaneous changes
### 2.7.19
-- Fixes #137 - adds support for dynamic HTML tag names
+* Fixes #137 - adds support for dynamic HTML tag names
### 2.7.18
-- Improvement: Better resolving of tag renderer
-- Compiler: Fix to make compiler work in the browser
+* Improvement: Better resolving of tag renderer
+* Compiler: Fix to make compiler work in the browser
### 2.7.17
-- Fixes #135 Allow "attrs" attribute on custom tags
+* Fixes #135 Allow "attrs" attribute on custom tags
### 2.7.16
-- Improved handling of imports
-- Better handling of loading taglibs with circular dependencies
+* Improved handling of imports
+* Better handling of loading taglibs with circular dependencies
### 2.7.15
-- Handle circular taglib imports
+* Handle circular taglib imports
### 2.7.14
-- Fixes #131 - Recursively handle taglib imports
+* Fixes #131 - Recursively handle taglib imports
### 2.7.13
-- Added a `.npmignore` file
-- Fixed licensing header in source
-- Documentation: improved docs for input.renderBody()
-- Documentation: Miscellaneous changes
+* Added a `.npmignore` file
+* Fixed licensing header in source
+* Documentation: improved docs for input.renderBody()
+* Documentation: Miscellaneous changes
### 2.7.12
-- Fixes #122 Don't allow invalid attributes when using shorthand
-- Fixes #122 Typo in hasAttributes
-- Fixes #127 - Make sure all possible input files are accounted for when checking if a compiled template is up-to-date
-- Use `browser.json` files instead of `optimizer.json` files
-- Documentation: Improved docs for async taglib
-- Documentation: Added empty() and notEmpty() helpers to the readme
-- Added Martin Aberer as a maintainer
-- Documentation: Miscellaneous changes
+* Fixes #122 Don't allow invalid attributes when using shorthand
+* Fixes #122 Typo in hasAttributes
+* Fixes #127 - Make sure all possible input files are accounted for when checking if a compiled template is up-to-date
+* Use `browser.json` files instead of `optimizer.json` files
+* Documentation: Improved docs for async taglib
+* Documentation: Added empty() and notEmpty() helpers to the readme
+* Added Martin Aberer as a maintainer
+* Documentation: Miscellaneous changes
### 2.7.11
-- New logo!
+* New logo!
### 2.7.10
-- Fixes #118 Better error when parsing JSON file for tag
-- Testing: More test cases related to empty attributes
-- Documentation: Clarification for the Node.js require extension
-- Documentation: doc reference for `getLength()` of loop `status-var`
-- Documentation: Added reference to [sublime-marko](https://github.com/merwan7/sublime-marko) under the tools section.
+* Fixes #118 Better error when parsing JSON file for tag
+* Testing: More test cases related to empty attributes
+* Documentation: Clarification for the Node.js require extension
+* Documentation: doc reference for `getLength()` of loop `status-var`
+* Documentation: Added reference to [sublime-marko](https://github.com/merwan7/sublime-marko) under the tools section.
### 2.7.9
-- Fixes #109 - Allow `compiler.createNode('div')`
-- Fixes #108 - Improve how the `MARKO_CLEAN` env variable is handled
+* Fixes #109 - Allow `compiler.createNode('div')`
+* Fixes #108 - Improve how the `MARKO_CLEAN` env variable is handled
### 2.7.8
-- Minor documentation changes
+* Minor documentation changes
### 2.7.7
-- Allow `.html` extension for layouts (Fix for https://github.com/raptorjs/marko-layout/issues/2)
+* Allow `.html` extension for layouts (Fix for https://github.com/raptorjs/marko-layout/issues/2)
### 2.7.6
-- Make require('marko/node-require').install() a noop in the browser
+* Make require('marko/node-require').install() a noop in the browser
### 2.7.5
-- Improvement: Allow `template-data` to be combined with other attributes on the `` tag
-- Documentation: Fixes #98 - docs for ``
+* Improvement: Allow `template-data` to be combined with other attributes on the `` tag
+* Documentation: Fixes #98 - docs for ``
### 2.7.4
-- Fixes #96 - Allow relative, dynamic include paths
+* Fixes #96 - Allow relative, dynamic include paths
### 2.7.3
-- Internal change: Additional test cases added for using promises with async fragments
+* Internal change: Additional test cases added for using promises with async fragments
### 2.7.2
-- Fixes #73 - Prevent same taglib from being loaded multiple times
+* Fixes #73 - Prevent same taglib from being loaded multiple times
### 2.7.1
-- Fixes #88 - Assign global data to the correct out
+* Fixes #88 - Assign global data to the correct out
### 2.7.0
-- Fixes [#27](https://github.com/raptorjs/marko/issues/27) - IE conditional comments (e.g., ``) are automatically preserved. Previously, all HTML comments were stripped out when loading a template. For example:
-- Added support for ` ` to enable comments to preserved in a template. For example:
+* Fixes [#27](https://github.com/raptorjs/marko/issues/27) - IE conditional comments (e.g., ``) are automatically preserved. Previously, all HTML comments were stripped out when loading a template. For example:
+* Added support for ` ` to enable comments to preserved in a template. For example:
```xml
@@ -1003,61 +999,61 @@ World
### 2.6.0
-- Performance improvements
- - `'use strict';`
- - Optimized render code paths
-- Code cleanup
-- Compatibility fixes for Node.js 0.12
- - Bad: `fs.readFile(path, 'utf8')`
- - Good: `fs.readFile(path, {encoding: 'utf8'})`
+* Performance improvements
+ * `'use strict';`
+ * Optimized render code paths
+* Code cleanup
+* Compatibility fixes for Node.js 0.12
+ * Bad: `fs.readFile(path, 'utf8')`
+ * Good: `fs.readFile(path, {encoding: 'utf8'})`
## 2.5.x
### 2.5.0
-- Fixes #78 - Custom Node.js require extension for Marko template files. Example usage:
+* Fixes #78 - Custom Node.js require extension for Marko template files. Example usage:
```javascript
// Install the Node.js require extension in your application's main script (server-side only)
-require('marko/node-require').install();
+require("marko/node-require").install();
// Now you can require `*.marko` files just like any other JavaScript module
-var template = require('./hello.marko');
-var html = template.renderSync({ name: 'Frank' });
+var template = require("./hello.marko");
+var html = template.renderSync({ name: "Frank" });
```
-- Compiled templates now export a loaded Template instance. In the previous version of marko, compiled templates exported a function that could be used to create a loaded Template instance.
+* Compiled templates now export a loaded Template instance. In the previous version of marko, compiled templates exported a function that could be used to create a loaded Template instance.
## 2.4.x
### 2.4.3
-- Fixes edge case: More precise regular expression for decoding HTML entities
+* Fixes edge case: More precise regular expression for decoding HTML entities
### 2.4.2
-- Internal: Fixes #75 Always assign the tag property to custom tag nodes
+* Internal: Fixes #75 Always assign the tag property to custom tag nodes
### 2.4.1
-- Improvement to allow taglibs to be imported from other taglibs ([commit](https://github.com/raptorjs/marko/commit/73e9a3420a1bac3e2c201d4dcadf21c0701b5222))
+* Improvement to allow taglibs to be imported from other taglibs ([commit](https://github.com/raptorjs/marko/commit/73e9a3420a1bac3e2c201d4dcadf21c0701b5222))
### 2.4.0
-- Added support for short-hand tags and attributes
+* Added support for short-hand tags and attributes
Old `marko-taglib.json`:
```json
{
- "tags": {
- "my-hello": {
- "renderer": "./hello-renderer",
- "attributes": {
- "name": "string"
- }
- }
+ "tags": {
+ "my-hello": {
+ "renderer": "./hello-renderer",
+ "attributes": {
+ "name": "string"
+ }
}
+ }
}
```
@@ -1065,14 +1061,14 @@ Short-hand `marko-taglib.json`:
```json
{
- "": {
- "renderer": "./hello-renderer",
- "@name": "string"
- }
+ "": {
+ "renderer": "./hello-renderer",
+ "@name": "string"
+ }
}
```
-- Fixes #61 Simplify parent/child relationships
+* Fixes #61 Simplify parent/child relationships
Marko now supports custom tags in the following format: ``
@@ -1092,50 +1088,52 @@ Example usage:
```
-___ui-tabs/marko-tag.json___
+**_ui-tabs/marko-tag.json_**
```json
{
- "@orientation": "string",
- "@tabs []": {
- "@title": "string"
- }
+ "@orientation": "string",
+ "@tabs []": {
+ "@title": "string"
+ }
}
```
-___ui-tabs/renderer.js___
+**_ui-tabs/renderer.js_**
```javascript
-var template = require('marko').load(require.resolve('./template.marko'));
+var template = require("marko").load(require.resolve("./template.marko"));
exports.renderer = function(input, out) {
- var tabs = input.tabs;
+ var tabs = input.tabs;
- // Tabs will be in the following form:
- // [
- // {
- // title: 'Home',
- // renderBody: function(out) { ... }
- // },
- // {
- // title: 'Profile',
- // renderBody: function(out) { ... }
- // },
- // {
- // title: 'Messages',
- // renderBody: function(out) { ... }
- // }
- // ]
- console.log(tabs.length); // Output: 3
-
- template.render({
- tabs: tabs
- }, out);
+ // Tabs will be in the following form:
+ // [
+ // {
+ // title: 'Home',
+ // renderBody: function(out) { ... }
+ // },
+ // {
+ // title: 'Profile',
+ // renderBody: function(out) { ... }
+ // },
+ // {
+ // title: 'Messages',
+ // renderBody: function(out) { ... }
+ // }
+ // ]
+ console.log(tabs.length); // Output: 3
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
};
```
-___ui-tabs/template.marko___
+**_ui-tabs/template.marko_**
```html
@@ -1162,12 +1160,12 @@ Fixes #66 - Allow circular dependencies when loading templates
### 2.3.1
-- Testing framework changes
-- Fixes #65 - Generated variable name is an empty string in some cases
+* Testing framework changes
+* Fixes #65 - Generated variable name is an empty string in some cases
### 2.3.0
-- Fixes #53 Merge c-input with attr props
+* Fixes #53 Merge c-input with attr props
## 2.2.x
@@ -1177,100 +1175,100 @@ Fixes #60 Don't replace special operators for body functions
### 2.2.1
-- Fixes #58 Added support for MARKO_CLEAN env variable (force recompile of all loaded templates). Example usage:
+* Fixes #58 Added support for MARKO_CLEAN env variable (force recompile of all loaded templates). Example usage:
```bash
MARKO_CLEAN=true node run.js
```
-- Code formatting: add spaces in var code
+* Code formatting: add spaces in var code
### 2.2.0
-- Fixes #51 Allow body content to be mapped to a String input property
-- Fixes #52 Remove JavaScript comments from JSON taglib files before parsing
+* Fixes #51 Allow body content to be mapped to a String input property
+* Fixes #52 Remove JavaScript comments from JSON taglib files before parsing
## 2.1.x
### 2.1.6
-- Fixes #50 Initialize the loader after the runtime is fully initialized
+* Fixes #50 Initialize the loader after the runtime is fully initialized
### 2.1.5
-- Fixes #50 Ensure that all instances of marko have hot-reload and browser-refresh enabled
+* Fixes #50 Ensure that all instances of marko have hot-reload and browser-refresh enabled
### 2.1.4
-- Allowing complex var names (i.e. LHS) for the `
` tag.
+* Allowing complex var names (i.e. LHS) for the `` tag.
### 2.1.3
-- Minor change: Slight improvement to code to resolve tag handler
+* Minor change: Slight improvement to code to resolve tag handler
### 2.1.2
-- Minor change: Improve how renderer is resolved
+* Minor change: Improve how renderer is resolved
### 2.1.1
-- Fixes #48 name in marko-tag.json should override default name given during discovery
+* Fixes #48 name in marko-tag.json should override default name given during discovery
### 2.1.0
-- Fixes #47 - Added support for "taglib-imports"
+* Fixes #47 - Added support for "taglib-imports"
## 2.0.x
### 2.0.12
-- Fixes #31 - Add support for providing prefix when scanning for tags
-- Allow "code" to be a function that lazily evaluates to a code string during code generation
+* Fixes #31 - Add support for providing prefix when scanning for tags
+* Allow "code" to be a function that lazily evaluates to a code string during code generation
### 2.0.11
-- Added method for custom node compilers to get access to the `escapeXml` function at runtime
+* Added method for custom node compilers to get access to the `escapeXml` function at runtime
### 2.0.10
-- Fixes #39 - Added missing return when using hot-reload
+* Fixes #39 - Added missing return when using hot-reload
### 2.0.9
-- Fixed bad publish
+* Fixed bad publish
### 2.0.8
-- Better merging of tags when loading and merging taglibs
+* Better merging of tags when loading and merging taglibs
### 2.0.7
-- Changes to avoid problems associated with the same taglib being found multiple times in the search path
+* Changes to avoid problems associated with the same taglib being found multiple times in the search path
### 2.0.6
-- `renderBody` function is only added if tag has children
+* `renderBody` function is only added if tag has children
### 2.0.5
-- Fixed #36 - Don't use `invokeBody()` in the cache taglib
+* Fixed #36 - Don't use `invokeBody()` in the cache taglib
### 2.0.4
-- :exclamation: Fixed #36 - Deprecated - When using `` with body content, nested body content is now passed in as `String` property named `body`. Old behavior: nested content would be passed in as a `Function` property named `invokeBody` that would return the `String` value of the nested content. `invokeBody()` has been deprecated.
+* :exclamation: Fixed #36 - Deprecated - When using `` with body content, nested body content is now passed in as `String` property named `body`. Old behavior: nested content would be passed in as a `Function` property named `invokeBody` that would return the `String` value of the nested content. `invokeBody()` has been deprecated.
### 2.0.3
-- Fixed #36 - Don't use `invokeBody()` in test code and the HTML comments tag
+* Fixed #36 - Don't use `invokeBody()` in test code and the HTML comments tag
### 2.0.2
-- :exclamation: Fixed #36 - Deprecated `input.invokeBody()` in favor of `input.renderBody(out)`
-- Fixed #37 - Duplicate input property for custom tag renderers
+* :exclamation: Fixed #36 - Deprecated `input.invokeBody()` in favor of `input.renderBody(out)`
+* Fixed #37 - Duplicate input property for custom tag renderers
### 2.0.1
-- Fixed #35 - Added support for ``. Example:
+* Fixed #35 - Added support for ``. Example:
```html
@@ -1281,17 +1279,16 @@ C
### 2.0.0
-
-- Dynamic attributes for scanned tags without a tag will have dashes removed by default.
- - :exclamation: When using `tags-dir` to discover tags that do not have a `marko-tag.json`, the previous behavior was to allow all attributes and to use the actual attribute name as the input property name. For example, when using ``, first name would need to be read in as `input['first-name']`. This was changed such that the first name property should now be read in as `input.firstName` (dashes removed and converted to camel case)
-- Changes to allow UI component to be put into a single JS file:
- - Updated taglib directory scanner to use `index.js` if found. New search order:
- 1. `renderer.js` (use `renderer.js` if it exists)
- 2. `index.js` (use `index.js` if it exists and assume it exports a `renderer` or `render` property)
- 3. `template.marko` (use the template as the renderer if no `renderer.js` or `index.js`)
- - :exclamation: Changes to the taglib directory scanner could break existing code. Specifically, if a UI component directory had an `index.js` file and a `template.marko` file then in in `marko@<2` the `template.marko` file would have been selected as the renderer. In `marko@2.x`, the `index.js` will be selected as the tag renderer.
-- :exclamation: Removed support for mapping a tag renderer to a module with a `process` method
-- Removed sub-module `marko/renderer` that exports [raptor-renderer](https://github.com/raptorjs/raptor-renderer)
+* Dynamic attributes for scanned tags without a tag will have dashes removed by default.
+ * :exclamation: When using `tags-dir` to discover tags that do not have a `marko-tag.json`, the previous behavior was to allow all attributes and to use the actual attribute name as the input property name. For example, when using ``, first name would need to be read in as `input['first-name']`. This was changed such that the first name property should now be read in as `input.firstName` (dashes removed and converted to camel case)
+* Changes to allow UI component to be put into a single JS file:
+ * Updated taglib directory scanner to use `index.js` if found. New search order:
+ 1. `renderer.js` (use `renderer.js` if it exists)
+ 2. `index.js` (use `index.js` if it exists and assume it exports a `renderer` or `render` property)
+ 3. `template.marko` (use the template as the renderer if no `renderer.js` or `index.js`)
+ * :exclamation: Changes to the taglib directory scanner could break existing code. Specifically, if a UI component directory had an `index.js` file and a `template.marko` file then in in `marko@<2` the `template.marko` file would have been selected as the renderer. In `marko@2.x`, the `index.js` will be selected as the tag renderer.
+* :exclamation: Removed support for mapping a tag renderer to a module with a `process` method
+* Removed sub-module `marko/renderer` that exports [raptor-renderer](https://github.com/raptorjs/raptor-renderer)
# 1.x
@@ -1299,31 +1296,30 @@ C
### 1.6.1
-- Added back code to allow the new marko runtime to load templates compiled by an earlier compiler that used `module.exports`
+* Added back code to allow the new marko runtime to load templates compiled by an earlier compiler that used `module.exports`
### 1.6.0
-- Fixed #32. Switched from `module.exports = function create(__helpers) { ... }` to `exports.create = function(__helpers) { ... }` to avoid circular dependency problems
-
+* Fixed #32. Switched from `module.exports = function create(__helpers) { ... }` to `exports.create = function(__helpers) { ... }` to avoid circular dependency problems
## 1.5.x
### 1.5.8
-- Added support for adding "static" code to the top of a compiled template (helpful for initializing variables or running code once).
+* Added support for adding "static" code to the top of a compiled template (helpful for initializing variables or running code once).
### 1.5.7
-- Added sub-module `marko/renderer` that exports [raptor-renderer](https://github.com/raptorjs/raptor-renderer)
+* Added sub-module `marko/renderer` that exports [raptor-renderer](https://github.com/raptorjs/raptor-renderer)
### 1.5.6
-- Changes to avoid unoptimized code in V8
+* Changes to avoid unoptimized code in V8
### 1.5.5
-- Handle case where template was loaded before hot-reload was enabled
+* Handle case where template was loaded before hot-reload was enabled
## 1.5.4
-- Added support for `$global` in `renderSync`
+* Added support for `$global` in `renderSync`
diff --git a/README.md b/README.md
index aeba9442a..60ea380b9 100644
--- a/README.md
+++ b/README.md
@@ -13,12 +13,12 @@ Learn more on [markojs.com](http://markojs.com/), and even [Try Marko Online!](h
# Get Involved
-- **Contributing**: Pull requests are welcome!
- - Read [`CONTRIBUTING.md`](.github/CONTRIBUTING.md) and check out our [bite-sized](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Adifficulty%3Abite-sized) and [help-wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Ahelp-wanted) issues
- - Submit github issues for any feature enhancements, bugs or documentation problems
-- **Support**: Join our [gitter chat](https://gitter.im/marko-js/marko) to ask questions to get support from the maintainers and other Marko developers
- - Questions/comments can also be posted as [github issues](https://github.com/marko-js/marko/issues)
-- **Discuss**: Tweet using the `#MarkoJS` hashtag and follow [@MarkoDevTeam](https://twitter.com/MarkoDevTeam)
+* **Contributing**: Pull requests are welcome!
+ * Read [`CONTRIBUTING.md`](.github/CONTRIBUTING.md) and check out our [bite-sized](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Adifficulty%3Abite-sized) and [help-wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Ahelp-wanted) issues
+ * Submit github issues for any feature enhancements, bugs or documentation problems
+* **Support**: Join our [gitter chat](https://gitter.im/marko-js/marko) to ask questions to get support from the maintainers and other Marko developers
+ * Questions/comments can also be posted as [github issues](https://github.com/marko-js/marko/issues)
+* **Discuss**: Tweet using the `#MarkoJS` hashtag and follow [@MarkoDevTeam](https://twitter.com/MarkoDevTeam)
# Installation
@@ -39,7 +39,8 @@ the Marko.js website.
The following single-file component renders a button and a counter with the
number of times the button has been clicked. [Try this example now!](http://markojs.com/try-online/?file=%2Fcomponents%2Fcomponents%2Fclick-count%2Findex.marko)
-__click-count.marko__
+**click-count.marko**
+
```marko
class {
onCreate() {
@@ -75,7 +76,8 @@ The same component as above split into an `index.marko` template file,
`component.js` containing your component logic, and `style.css` containing your
component style:
-__index.marko__
+**index.marko**
+
```marko
${state.count}
@@ -85,27 +87,29 @@ __index.marko__
```
-__component.js__
+**component.js**
+
```js
module.exports = {
- onCreate() {
- this.state = { count:0 };
- },
- increment() {
- this.state.count++;
- }
+ onCreate() {
+ this.state = { count: 0 };
+ },
+ increment() {
+ this.state.count++;
+ }
};
```
-__style.css__
+**style.css**
+
```css
.count {
- color:#09c;
- font-size:3em;
+ color: #09c;
+ font-size: 3em;
}
.example-button {
- font-size:1em;
- padding:0.5em;
+ font-size: 1em;
+ padding: 0.5em;
}
```
diff --git a/benchmark/.eslintrc.json b/benchmark/.eslintrc.json
new file mode 100644
index 000000000..f52999d74
--- /dev/null
+++ b/benchmark/.eslintrc.json
@@ -0,0 +1,8 @@
+{
+ "rules": {
+ "no-console": 0
+ },
+ "parserOptions": {
+ "sourceType": "module"
+ }
+}
diff --git a/benchmark/.jshintrc b/benchmark/.jshintrc
deleted file mode 100644
index a1e141b89..000000000
--- a/benchmark/.jshintrc
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "predef": [
-
- ],
-
- "globals": {
- "define": true,
- "require": true
- },
-
- "node" : true,
- "esnext" : true,
- "browser" : true,
- "boss" : false,
- "curly": false,
- "debug": false,
- "devel": false,
- "eqeqeq": true,
- "evil": true,
- "forin": false,
- "immed": true,
- "laxbreak": false,
- "newcap": true,
- "noarg": true,
- "noempty": false,
- "nonew": true,
- "nomen": false,
- "onevar": false,
- "plusplus": false,
- "regexp": false,
- "undef": true,
- "sub": false,
- "white": false,
- "eqeqeq": false,
- "latedef": false,
- "unused": "vars",
- "jquery": true,
- "strict": false,
- "eqnull": true
-}
\ No newline at end of file
diff --git a/benchmark/patch-module.js b/benchmark/patch-module.js
index 23ceed184..265436c30 100644
--- a/benchmark/patch-module.js
+++ b/benchmark/patch-module.js
@@ -1,20 +1,21 @@
-var nodePath = require('path');
+var nodePath = require("path");
-var Module = require('module').Module;
+var Module = require("module").Module;
var oldResolveFilename = Module._resolveFilename;
-var rootDir = nodePath.join(__dirname, '../');
+var rootDir = nodePath.join(__dirname, "../");
Module._resolveFilename = function(request, parent, isMain) {
- if (request.charAt(0) !== '.') {
- var firstSlash = request.indexOf('/');
- var targetPackageName = firstSlash === -1 ? request : request.substring(0, firstSlash);
+ if (request.charAt(0) !== ".") {
+ var firstSlash = request.indexOf("/");
+ var targetPackageName =
+ firstSlash === -1 ? request : request.substring(0, firstSlash);
- if (targetPackageName === 'marko') {
- request = request.substring('marko'.length);
- request = rootDir + request;
- }
- }
+ if (targetPackageName === "marko") {
+ request = request.substring("marko".length);
+ request = rootDir + request;
+ }
+ }
return oldResolveFilename.call(this, request, parent, isMain);
-};
\ No newline at end of file
+};
diff --git a/benchmark/size/inferno/rollup.config.js b/benchmark/size/inferno/rollup.config.js
index 5038a800c..75d1d1eec 100644
--- a/benchmark/size/inferno/rollup.config.js
+++ b/benchmark/size/inferno/rollup.config.js
@@ -1,37 +1,32 @@
-import commonjsPlugin from 'rollup-plugin-commonjs';
-import browserifyPlugin from 'rollup-plugin-browserify-transform';
-import nodeResolvePlugin from 'rollup-plugin-node-resolve';
-import babelPlugin from 'rollup-plugin-babel';
-import envify from 'envify';
-import path from 'path';
+import browserifyPlugin from "rollup-plugin-browserify-transform";
+import nodeResolvePlugin from "rollup-plugin-node-resolve";
+import babelPlugin from "rollup-plugin-babel";
+import envify from "envify";
+import path from "path";
-process.env.NODE_ENV = 'production';
+process.env.NODE_ENV = "production";
// NODE_ENV=production browserify -t envify -t markoify --extension='.marko' --global-transform minprops/browserify -o build/bundles/marko.js marko/client.js
-
export default {
- entry: path.join(__dirname, 'client.jsx'),
- format: 'iife',
- moduleName: 'app',
+ entry: path.join(__dirname, "client.jsx"),
+ format: "iife",
+ moduleName: "app",
plugins: [
babelPlugin({
include: [],
babelrc: false,
- "presets": [
- ["es2015", { "loose": true, "modules": false }],
- "stage-0"
- ],
- "plugins": ["inferno"]
+ presets: [["es2015", { loose: true, modules: false }], "stage-0"],
+ plugins: ["inferno"]
}),
browserifyPlugin(envify),
nodeResolvePlugin({
- jsnext: false, // Default: false
- main: true, // Default: true
- browser: true, // Default: false
+ jsnext: false, // Default: false
+ main: true, // Default: true
+ browser: true, // Default: false
preferBuiltins: false,
- extensions: [ '.js', '.jsx' ]
+ extensions: [".js", ".jsx"]
})
],
- dest: path.join(__dirname, '../build/bundles/inferno.js')
+ dest: path.join(__dirname, "../build/bundles/inferno.js")
};
diff --git a/benchmark/size/marko/client.js b/benchmark/size/marko/client.js
index 26d4b3eca..527d7a2d6 100644
--- a/benchmark/size/marko/client.js
+++ b/benchmark/size/marko/client.js
@@ -1,6 +1,7 @@
-var app = require('./components/app');
-app.renderSync({
- name: 'Frank',
- colors: ['red', 'green', 'blue']
+var app = require("./components/app");
+app
+ .renderSync({
+ name: "Frank",
+ colors: ["red", "green", "blue"]
})
- .appendTo(document.body);
\ No newline at end of file
+ .appendTo(document.body);
diff --git a/benchmark/size/marko/main.js b/benchmark/size/marko/main.js
index d11ebcac5..649b5d918 100644
--- a/benchmark/size/marko/main.js
+++ b/benchmark/size/marko/main.js
@@ -1,3 +1,3 @@
-var helpers = require('marko/src/runtime/vdom/helpers');
+var helpers = require("marko/src/runtime/vdom/helpers");
-console.log('HELPERS:', helpers);
+console.log("HELPERS:", helpers);
diff --git a/benchmark/size/marko/rollup.config.js b/benchmark/size/marko/rollup.config.js
index d2fee9d22..bda4bece5 100644
--- a/benchmark/size/marko/rollup.config.js
+++ b/benchmark/size/marko/rollup.config.js
@@ -1,35 +1,34 @@
-process.env.NODE_ENV = 'production';
+process.env.NODE_ENV = "production";
-import commonjsPlugin from 'rollup-plugin-commonjs';
-import browserifyPlugin from 'rollup-plugin-browserify-transform';
-import nodeResolvePlugin from 'rollup-plugin-node-resolve';
-import markoify from 'markoify';
-import envify from 'envify';
-import minpropsify from 'minprops/browserify';
-import path from 'path';
+import commonjsPlugin from "rollup-plugin-commonjs";
+import browserifyPlugin from "rollup-plugin-browserify-transform";
+import nodeResolvePlugin from "rollup-plugin-node-resolve";
+import markoify from "markoify";
+import envify from "envify";
+import minpropsify from "minprops/browserify";
+import path from "path";
// NODE_ENV=production browserify -t envify -t markoify --extension='.marko' --global-transform minprops/browserify -o build/bundles/marko.js marko/client.js
-
export default {
- entry: path.join(__dirname, 'client.js'),
- format: 'iife',
- moduleName: 'app',
+ entry: path.join(__dirname, "client.js"),
+ format: "iife",
+ moduleName: "app",
plugins: [
browserifyPlugin(markoify),
browserifyPlugin(envify),
browserifyPlugin(minpropsify),
nodeResolvePlugin({
- jsnext: false, // Default: false
- main: true, // Default: true
- browser: true, // Default: false
+ jsnext: false, // Default: false
+ main: true, // Default: true
+ browser: true, // Default: false
preferBuiltins: false,
- extensions: [ '.js', '.marko' ]
+ extensions: [".js", ".marko"]
}),
commonjsPlugin({
include: [],
- extensions: [ '.js', '.marko' ]
+ extensions: [".js", ".marko"]
})
],
- dest: path.join(__dirname, '../build/bundles/marko.js')
+ dest: path.join(__dirname, "../build/bundles/marko.js")
};
diff --git a/benchmark/size/minify.js b/benchmark/size/minify.js
index c1fead3dc..d34d7b880 100644
--- a/benchmark/size/minify.js
+++ b/benchmark/size/minify.js
@@ -1,28 +1,30 @@
-console.log('Minifying JavaScript bundles...');
+console.log("Minifying JavaScript bundles...");
-const fs = require('fs');
-const path = require('path');
-const zlib = require('zlib');
+const fs = require("fs");
+const path = require("path");
+const zlib = require("zlib");
const UglifyJS = require("uglify-js");
-const formatNumber = require('format-number')();
+const formatNumber = require("format-number")();
-var buildDir = path.join(__dirname, 'build');
-var bundlesDir = path.join(__dirname, 'build/bundles');
-var bundlesMinDir = path.join(__dirname, 'build/bundles.min');
+var buildDir = path.join(__dirname, "build");
+var bundlesDir = path.join(__dirname, "build/bundles");
+var bundlesMinDir = path.join(__dirname, "build/bundles.min");
try {
fs.mkdirSync(bundlesMinDir);
-} catch(e) {}
+} catch (e) {
+ /* ignore error */
+}
var promiseChain = Promise.resolve();
function getVersion(name) {
- return require(name + '/package.json').version;
+ return require(name + "/package.json").version;
}
function leftPad(str, padding) {
if (str.length < padding) {
- str = new Array(padding - str.length).join(' ') + str;
+ str = new Array(padding - str.length).join(" ") + str;
}
return str;
@@ -30,10 +32,10 @@ function leftPad(str, padding) {
var minifiers = {
gcc: function minifyGCC(src, file) {
- const gcc = require('google-closure-compiler-js');
+ const gcc = require("google-closure-compiler-js");
const options = {
- jsCode: [{src: src}],
- languageIn: 'ES5'
+ jsCode: [{ src: src }],
+ languageIn: "ES5"
};
const out = gcc.compile(options);
@@ -49,7 +51,7 @@ var minifiers = {
return UglifyJS.minify(src, {
fromString: true
}).code;
- } catch(e) {
+ } catch (e) {
if (e.line != null) {
console.error(`Failed to minify ${file}`);
console.error(` Location: ${file}:${e.line}:${e.col}`);
@@ -58,7 +60,6 @@ var minifiers = {
}
throw e;
}
-
},
both: function(src, file) {
var withGCC = minifiers.gcc(src, file);
@@ -75,14 +76,14 @@ var sizes = {};
var targetLib = process.argv[2];
-bundleFiles.forEach((filename) => {
- if (!filename.endsWith('.js')) {
+bundleFiles.forEach(filename => {
+ if (!filename.endsWith(".js")) {
return;
}
var file = path.join(bundlesDir, filename);
var ext = path.extname(filename);
- var lib = filename.slice(0, 0-ext.length);
+ var lib = filename.slice(0, 0 - ext.length);
if (targetLib && lib !== targetLib) {
return;
@@ -90,16 +91,16 @@ bundleFiles.forEach((filename) => {
console.log(`Minifying ${file}...`);
- var src = fs.readFileSync(file, { encoding: 'utf8' });
+ var src = fs.readFileSync(file, { encoding: "utf8" });
var minifiedSrc = minifier(src, file);
console.log(`Done minifying ${file}`);
var minFile = path.join(bundlesMinDir, filename);
- fs.writeFileSync(minFile, minifiedSrc, { encoding: 'utf8' });
+ fs.writeFileSync(minFile, minifiedSrc, { encoding: "utf8" });
- var sizeInfo = sizes[lib] = {};
+ var sizeInfo = (sizes[lib] = {});
promiseChain = promiseChain.then(() => {
return new Promise((resolve, reject) => {
@@ -110,16 +111,21 @@ bundleFiles.forEach((filename) => {
}
// Compare the sizes
- var minifiedBuffer = new Buffer(minifiedSrc, 'utf8');
+ var minifiedBuffer = new Buffer(minifiedSrc, "utf8");
// console.log(nodePath.basename(templateInfo.outputCompileMinifiedFile) + ': ' + gzippedBuffer.length + ' bytes gzipped (' + minifiedBuffer.length + ' bytes uncompressed)');
sizeInfo.gzipped = gzippedBuffer.length;
sizeInfo.min = minifiedBuffer.length;
var libVersion = getVersion(lib);
- var sizeFilename = lib + (libVersion ? '-' + libVersion : '') + '.json';
+ var sizeFilename =
+ lib + (libVersion ? "-" + libVersion : "") + ".json";
- fs.writeFileSync(path.join(buildDir, sizeFilename), JSON.stringify(sizeInfo, null, 4), { encoding: 'utf8' });
+ fs.writeFileSync(
+ path.join(buildDir, sizeFilename),
+ JSON.stringify(sizeInfo, null, 4),
+ { encoding: "utf8" }
+ );
resolve();
});
@@ -132,11 +138,15 @@ promiseChain.then(() => {
for (var lib in sizes) {
var sizeInfo = sizes[lib];
- console.log('[' + lib + ']');
- console.log(' gzip: ' + leftPad(formatNumber(sizeInfo.gzipped), 8) + ' bytes');
- console.log(' min: ' + leftPad(formatNumber(sizeInfo.min), 8) + ' bytes');
+ console.log("[" + lib + "]");
+ console.log(
+ " gzip: " + leftPad(formatNumber(sizeInfo.gzipped), 8) + " bytes"
+ );
+ console.log(
+ " min: " + leftPad(formatNumber(sizeInfo.min), 8) + " bytes"
+ );
console.log();
}
- console.log('Minification complete.');
+ console.log("Minification complete.");
});
diff --git a/benchmark/size/package.json b/benchmark/size/package.json
index 36dfff9bb..fdcccb227 100644
--- a/benchmark/size/package.json
+++ b/benchmark/size/package.json
@@ -1,65 +1,70 @@
{
- "name": "size-benchmark",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "setup": "npm install --silent && npm link ../../",
- "build": "npm run bundle --silent && npm run minify --silent",
- "build-marko": "npm run bundle-marko --silent && node minify.js marko",
- "build-vue": "npm run bundle-vue --silent && node minify.js vue",
- "build-react": "npm run bundle-react --silent && node minify.js react",
- "build-inferno": "npm run bundle-inferno --silent && node minify.js inferno",
- "bundle": "mkdir -p build/bundles && npm run bundle-marko && npm run bundle-react && npm run bundle-vue && npm run bundle-preact && npm run bundle-inferno",
- "bundle-marko": "node ../../scripts/build src && NODE_ENV=production rollup -c marko/rollup.config.js",
- "bundle-react": "NODE_ENV=production rollup -c react/rollup.config.js",
- "bundle-preact": "NODE_ENV=production rollup -c preact/rollup.config.js",
- "bundle-vue": "NODE_ENV=production rollup -c vue/rollup.config.js",
- "bundle-inferno": "NODE_ENV=production rollup -c inferno/rollup.config.js",
- "minify": "node minify.js",
- "http-server": "http-server"
- },
- "author": "Patrick Steele-Idem ",
- "license": "MIT",
- "dependencies": {
- "babel-plugin-inferno": "^1.8.0",
- "babel-plugin-transform-es2015-block-scoping": "^6.21.0",
- "babel-plugin-transform-react-constant-elements": "^6.9.1",
- "babel-plugin-transform-react-jsx": "^6.8.0",
- "babel-plugin-transform-runtime": "^6.15.0",
- "babel-preset-es2015": "^6.18.0",
- "babel-preset-es2015-loose": "^8.0.0",
- "babel-preset-react": "^6.16.0",
- "babel-preset-stage-0": "^6.16.0",
- "babelify": "^7.3.0",
- "envify": "^4.0.0",
- "format-number": "^2.0.1",
- "google-closure-compiler-js": "^20161201.0.0",
- "http-server": "^0.9.0",
- "inferno": "^1.3.0-rc.1",
- "inferno-component": "^1.3.0-rc.1",
- "inferno-server": "^1.3.0-rc.1",
- "markoify": "^2.1.1",
- "minprops": "^1.0.0",
- "preact": "^7.1.0",
- "react": "^15.4.1",
- "react-dom": "^15.4.1",
- "rollup": "^0.41.6",
- "rollup-plugin-babel": "^2.7.1",
- "rollup-plugin-browserify-transform": "^0.1.0",
- "rollup-plugin-commonjs": "^8.0.2",
- "rollup-plugin-marko": "0.0.2",
- "rollup-plugin-node-resolve": "^3.0.0",
- "uglify-js": "^2.7.5",
- "vue": "^2.1.6",
- "vueify": "^9.4.0"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/marko-js/marko.git"
- },
- "browser": {
- "events": "events-light"
- },
- "devDependencies": {}
+ "name": "size-benchmark",
+ "version": "1.0.0",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "setup": "npm install --silent && npm link ../../",
+ "build": "npm run bundle --silent && npm run minify --silent",
+ "build-marko": "npm run bundle-marko --silent && node minify.js marko",
+ "build-vue": "npm run bundle-vue --silent && node minify.js vue",
+ "build-react": "npm run bundle-react --silent && node minify.js react",
+ "build-inferno":
+ "npm run bundle-inferno --silent && node minify.js inferno",
+ "bundle":
+ "mkdir -p build/bundles && npm run bundle-marko && npm run bundle-react && npm run bundle-vue && npm run bundle-preact && npm run bundle-inferno",
+ "bundle-marko":
+ "node ../../scripts/build src && NODE_ENV=production rollup -c marko/rollup.config.js",
+ "bundle-react": "NODE_ENV=production rollup -c react/rollup.config.js",
+ "bundle-preact":
+ "NODE_ENV=production rollup -c preact/rollup.config.js",
+ "bundle-vue": "NODE_ENV=production rollup -c vue/rollup.config.js",
+ "bundle-inferno":
+ "NODE_ENV=production rollup -c inferno/rollup.config.js",
+ "minify": "node minify.js",
+ "http-server": "http-server"
+ },
+ "author": "Patrick Steele-Idem ",
+ "license": "MIT",
+ "dependencies": {
+ "babel-plugin-inferno": "^1.8.0",
+ "babel-plugin-transform-es2015-block-scoping": "^6.21.0",
+ "babel-plugin-transform-react-constant-elements": "^6.9.1",
+ "babel-plugin-transform-react-jsx": "^6.8.0",
+ "babel-plugin-transform-runtime": "^6.15.0",
+ "babel-preset-es2015": "^6.18.0",
+ "babel-preset-es2015-loose": "^8.0.0",
+ "babel-preset-react": "^6.16.0",
+ "babel-preset-stage-0": "^6.16.0",
+ "babelify": "^7.3.0",
+ "envify": "^4.0.0",
+ "format-number": "^2.0.1",
+ "google-closure-compiler-js": "^20161201.0.0",
+ "http-server": "^0.9.0",
+ "inferno": "^1.3.0-rc.1",
+ "inferno-component": "^1.3.0-rc.1",
+ "inferno-server": "^1.3.0-rc.1",
+ "markoify": "^2.1.1",
+ "minprops": "^1.0.0",
+ "preact": "^7.1.0",
+ "react": "^15.4.1",
+ "react-dom": "^15.4.1",
+ "rollup": "^0.41.6",
+ "rollup-plugin-babel": "^2.7.1",
+ "rollup-plugin-browserify-transform": "^0.1.0",
+ "rollup-plugin-commonjs": "^8.0.2",
+ "rollup-plugin-marko": "0.0.2",
+ "rollup-plugin-node-resolve": "^3.0.0",
+ "uglify-js": "^2.7.5",
+ "vue": "^2.1.6",
+ "vueify": "^9.4.0"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/marko-js/marko.git"
+ },
+ "browser": {
+ "events": "events-light"
+ },
+ "devDependencies": {}
}
diff --git a/benchmark/size/preact/rollup.config.js b/benchmark/size/preact/rollup.config.js
index 47f8870df..d21b21371 100644
--- a/benchmark/size/preact/rollup.config.js
+++ b/benchmark/size/preact/rollup.config.js
@@ -1,35 +1,34 @@
-import commonjsPlugin from 'rollup-plugin-commonjs';
-import browserifyPlugin from 'rollup-plugin-browserify-transform';
-import nodeResolvePlugin from 'rollup-plugin-node-resolve';
-import babelPlugin from 'rollup-plugin-babel';
-import envify from 'envify';
-import path from 'path';
+import commonjsPlugin from "rollup-plugin-commonjs";
+import browserifyPlugin from "rollup-plugin-browserify-transform";
+import nodeResolvePlugin from "rollup-plugin-node-resolve";
+import babelPlugin from "rollup-plugin-babel";
+import envify from "envify";
+import path from "path";
-process.env.NODE_ENV = 'production';
+process.env.NODE_ENV = "production";
// NODE_ENV=production browserify -t envify -t markoify --extension='.marko' --global-transform minprops/browserify -o build/bundles/marko.js marko/client.js
-
export default {
- entry: path.join(__dirname, 'client.jsx'),
- format: 'iife',
- moduleName: 'app',
+ entry: path.join(__dirname, "client.jsx"),
+ format: "iife",
+ moduleName: "app",
plugins: [
babelPlugin({
// include: ['node_modules/**', '**/*.js', '**/*.jsx']
}),
browserifyPlugin(envify),
nodeResolvePlugin({
- jsnext: false, // Default: false
- main: true, // Default: true
- browser: true, // Default: false
+ jsnext: false, // Default: false
+ main: true, // Default: true
+ browser: true, // Default: false
preferBuiltins: false,
- extensions: [ '.js', '.jsx' ]
+ extensions: [".js", ".jsx"]
}),
commonjsPlugin({
include: [],
- extensions: [ '.js', '.jsx' ]
+ extensions: [".js", ".jsx"]
})
],
- dest: path.join(__dirname, '../build/bundles/preact.js')
+ dest: path.join(__dirname, "../build/bundles/preact.js")
};
diff --git a/benchmark/size/react/rollup.config.js b/benchmark/size/react/rollup.config.js
index 581dc23a7..921d798e3 100644
--- a/benchmark/size/react/rollup.config.js
+++ b/benchmark/size/react/rollup.config.js
@@ -1,35 +1,34 @@
-import commonjsPlugin from 'rollup-plugin-commonjs';
-import browserifyPlugin from 'rollup-plugin-browserify-transform';
-import nodeResolvePlugin from 'rollup-plugin-node-resolve';
-import babelPlugin from 'rollup-plugin-babel';
-import envify from 'envify';
-import path from 'path';
+import commonjsPlugin from "rollup-plugin-commonjs";
+import browserifyPlugin from "rollup-plugin-browserify-transform";
+import nodeResolvePlugin from "rollup-plugin-node-resolve";
+import babelPlugin from "rollup-plugin-babel";
+import envify from "envify";
+import path from "path";
-process.env.NODE_ENV = 'production';
+process.env.NODE_ENV = "production";
// NODE_ENV=production browserify -t envify -t markoify --extension='.marko' --global-transform minprops/browserify -o build/bundles/marko.js marko/client.js
-
export default {
- entry: path.join(__dirname, 'client.jsx'),
- format: 'iife',
- moduleName: 'app',
+ entry: path.join(__dirname, "client.jsx"),
+ format: "iife",
+ moduleName: "app",
plugins: [
babelPlugin({
- exclude: 'node_modules/**'
+ exclude: "node_modules/**"
}),
browserifyPlugin(envify),
nodeResolvePlugin({
- jsnext: true, // Default: false
- main: true, // Default: true
- browser: true, // Default: false
+ jsnext: true, // Default: false
+ main: true, // Default: true
+ browser: true, // Default: false
preferBuiltins: false,
- extensions: [ '.js', '.jsx' ]
+ extensions: [".js", ".jsx"]
}),
commonjsPlugin({
include: [],
- extensions: [ '.js', '.jsx' ]
+ extensions: [".js", ".jsx"]
})
],
- dest: path.join(__dirname, '../build/bundles/react.js')
+ dest: path.join(__dirname, "../build/bundles/react.js")
};
diff --git a/benchmark/size/vue/client.js b/benchmark/size/vue/client.js
index 2696faca2..d852db9bd 100644
--- a/benchmark/size/vue/client.js
+++ b/benchmark/size/vue/client.js
@@ -1,5 +1,5 @@
-var Vue = require('vue');
-var App = require('./components/App');
+var Vue = require("vue");
+var App = require("./components/App");
// var app = new App({
// el: document.body,
@@ -11,7 +11,7 @@ var App = require('./components/App');
new Vue({
el: document.body,
- render: function (createElement) {
+ render: function(createElement) {
return createElement(App);
}
-});
\ No newline at end of file
+});
diff --git a/benchmark/size/vue/rollup.config.js b/benchmark/size/vue/rollup.config.js
index b3a9268f7..1091f76b0 100644
--- a/benchmark/size/vue/rollup.config.js
+++ b/benchmark/size/vue/rollup.config.js
@@ -1,33 +1,32 @@
-import commonjsPlugin from 'rollup-plugin-commonjs';
-import browserifyPlugin from 'rollup-plugin-browserify-transform';
-import nodeResolvePlugin from 'rollup-plugin-node-resolve';
-import vueify from 'vueify';
-import envify from 'envify';
-import minpropsify from 'minprops/browserify';
-import path from 'path';
-
-process.env.NODE_ENV = 'production';
+import commonjsPlugin from "rollup-plugin-commonjs";
+import browserifyPlugin from "rollup-plugin-browserify-transform";
+import nodeResolvePlugin from "rollup-plugin-node-resolve";
+import vueify from "vueify";
+import envify from "envify";
+import minpropsify from "minprops/browserify";
+import path from "path";
+process.env.NODE_ENV = "production";
export default {
- entry: path.join(__dirname, 'client.js'),
- format: 'iife',
- moduleName: 'app',
+ entry: path.join(__dirname, "client.js"),
+ format: "iife",
+ moduleName: "app",
plugins: [
browserifyPlugin(vueify),
browserifyPlugin(envify),
browserifyPlugin(minpropsify),
nodeResolvePlugin({
- jsnext: true, // Default: false
- main: true, // Default: true
- browser: true, // Default: false
+ jsnext: true, // Default: false
+ main: true, // Default: true
+ browser: true, // Default: false
preferBuiltins: false,
- extensions: [ '.js', '.vue' ]
+ extensions: [".js", ".vue"]
}),
commonjsPlugin({
include: [],
- extensions: [ '.js', '.vue' ]
+ extensions: [".js", ".vue"]
})
],
- dest: path.join(__dirname, '../build/bundles/vue.js')
+ dest: path.join(__dirname, "../build/bundles/vue.js")
};
diff --git a/benchmark/vdom/.eslintrc b/benchmark/vdom/.eslintrc
new file mode 100644
index 000000000..5c3f02e1a
--- /dev/null
+++ b/benchmark/vdom/.eslintrc
@@ -0,0 +1,5 @@
+{
+ "env": {
+ "browser": true
+ }
+}
\ No newline at end of file
diff --git a/benchmark/vdom/benchmark-create.js b/benchmark/vdom/benchmark-create.js
index 2ce5ad7cc..027765fb5 100644
--- a/benchmark/vdom/benchmark-create.js
+++ b/benchmark/vdom/benchmark-create.js
@@ -1,24 +1,24 @@
module.exports = function(app) {
var Suite = window.Benchmark.Suite;
- var names = [
- 'dom',
- 'dom-innerHTML',
- 'marko-vdom',
- 'react'
- ];
+ var names = ["dom", "dom-innerHTML", "marko-vdom", "react"];
- var htmlFiles = ['todomvc', 'marko-docs', 'tabs'];
+ var htmlFiles = ["todomvc", "marko-docs", "tabs"];
function loadScripts() {
-
window.createBenchmarks = {};
var scripts = [];
names.forEach(function(name) {
htmlFiles.forEach(function(htmlFile) {
- scripts.push('./codegen-create/benchmark-' + htmlFile + '-' + name + '.js');
+ scripts.push(
+ "./codegen-create/benchmark-" +
+ htmlFile +
+ "-" +
+ name +
+ ".js"
+ );
});
});
@@ -26,18 +26,17 @@ module.exports = function(app) {
}
function runForHtmlFile(htmlFile) {
- return loadScripts(htmlFile)
- .then(function() {
- var suite = new Suite('create-' + htmlFile);
+ return loadScripts(htmlFile).then(function() {
+ var suite = new Suite("create-" + htmlFile);
- names.forEach(function(name) {
- suite.add(name, function() {
- return window.createBenchmarks[htmlFile + '-' + name]();
- });
+ names.forEach(function(name) {
+ suite.add(name, function() {
+ return window.createBenchmarks[htmlFile + "-" + name]();
});
-
- return app.runSuite(suite);
});
+
+ return app.runSuite(suite);
+ });
}
var loadScriptsPromise = loadScripts();
diff --git a/benchmark/vdom/benchmark-walk.js b/benchmark/vdom/benchmark-walk.js
index 96dc1bd72..a8fb5417c 100644
--- a/benchmark/vdom/benchmark-walk.js
+++ b/benchmark/vdom/benchmark-walk.js
@@ -2,16 +2,15 @@ module.exports = function(app) {
var Suite = window.Benchmark.Suite;
var MarkoVDOM = app.vdom;
- var suite = new Suite('walk');
+ var suite = new Suite("walk");
- var todomvcDOM = document.getElementById('todoapp');
+ var todomvcDOM = document.getElementById("todoapp");
var todomvcDOMVirtual = MarkoVDOM.virtualize(todomvcDOM);
function toHTML(node) {
-
// NOTE: We don't use XMLSerializer because we need to sort the attributes to correctly compare output HTML strings
// BAD: return (new XMLSerializer()).serializeToString(node);
- var html = '';
+ var html = "";
function serializeHelper(node, indent) {
if (node.nodeType === 1) {
serializeElHelper(node, indent);
@@ -20,7 +19,7 @@ module.exports = function(app) {
} else if (node.nodeType === 8) {
serializeCommentHelper(node, indent);
} else {
- console.log('Invalid node:', node);
+ console.log("Invalid node:", node);
html += indent + `INVALID NODE TYPE ${node.nodeType}\n`;
// throw new Error('Unexpected node type');
}
@@ -29,66 +28,68 @@ module.exports = function(app) {
function serializeElHelper(el, indent) {
var tagName = el.nodeName;
- if (el.namespaceURI === 'http://www.w3.org/2000/svg') {
- tagName = 'svg:' + tagName;
- } else if (el.namespaceURI === 'http://www.w3.org/1998/Math/MathML') {
- tagName = 'math:' + tagName;
+ if (el.namespaceURI === "http://www.w3.org/2000/svg") {
+ tagName = "svg:" + tagName;
+ } else if (
+ el.namespaceURI === "http://www.w3.org/1998/Math/MathML"
+ ) {
+ tagName = "math:" + tagName;
}
- html += indent + '<' + tagName;
+ html += indent + "<" + tagName;
var attributes = el.attributes;
var attributesArray = [];
- for (var i=0; i\n';
+ html += ">\n";
- if (tagName.toUpperCase() === 'TEXTAREA') {
- html += indent + ' VALUE: ' + JSON.stringify(el.value) + '\n';
+ if (tagName.toUpperCase() === "TEXTAREA") {
+ html += indent + " VALUE: " + JSON.stringify(el.value) + "\n";
} else {
var curChild = el.firstChild;
- while(curChild) {
- serializeHelper(curChild, indent + ' ');
+ while (curChild) {
+ serializeHelper(curChild, indent + " ");
curChild = curChild.nextSibling;
}
}
}
function serializeTextHelper(node, indent) {
- html += indent + JSON.stringify(node.nodeValue) + '\n';
+ html += indent + JSON.stringify(node.nodeValue) + "\n";
}
function serializeCommentHelper(node, indent) {
- html += indent + '\n';
+ html += indent + "\n";
}
- serializeHelper(node, '');
+ serializeHelper(node, "");
return html;
}
// add tests
- suite.add('real DOM', function() {
+ suite.add("real DOM", function() {
return toHTML(todomvcDOM);
});
- suite.add('marko-vdom', function() {
+ suite.add("marko-vdom", function() {
return toHTML(todomvcDOMVirtual);
});
return function() {
return app.runSuite(suite);
};
-};
\ No newline at end of file
+};
diff --git a/benchmark/vdom/browser.json b/benchmark/vdom/browser.json
index d54fdadf4..84f7e19ff 100644
--- a/benchmark/vdom/browser.json
+++ b/benchmark/vdom/browser.json
@@ -6,13 +6,15 @@
},
{
"type": "js",
- "url": "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.2/lodash.js"
+ "url":
+ "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.2/lodash.js"
},
{
"type": "js",
- "url": "https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.2/benchmark.js"
+ "url":
+ "https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.2/benchmark.js"
},
"benchmark/benchmark.js",
"require-run: ./client.js"
]
-}
\ No newline at end of file
+}
diff --git a/benchmark/vdom/client.js b/benchmark/vdom/client.js
index 304da86c8..d4806e173 100644
--- a/benchmark/vdom/client.js
+++ b/benchmark/vdom/client.js
@@ -1,17 +1,17 @@
-var HTMLElement = require('../../runtime/vdom/HTMLElement');
-var Text = require('../../runtime/vdom/Text');
-var Comment = require('../../runtime/vdom/Comment');
-var DocumentFragment = require('../../runtime/vdom/DocumentFragment');
+var HTMLElement = require("../../runtime/vdom/HTMLElement");
+var Text = require("../../runtime/vdom/Text");
+var Comment = require("../../runtime/vdom/Comment");
+var DocumentFragment = require("../../runtime/vdom/DocumentFragment");
-var resultsEl = document.getElementById('results');
+var resultsEl = document.getElementById("results");
var running = false;
var benchmarks = {};
function loadScript(path) {
return new Promise(function(resolve, reject) {
- var script = document.createElement('script');
+ var script = document.createElement("script");
script.src = path;
- script.onload = function () {
+ script.onload = function() {
resolve();
};
@@ -24,9 +24,11 @@ function loadScript(path) {
}
function loadScripts(paths) {
- return Promise.all(paths.map(function(path) {
- return loadScript(path);
- }));
+ return Promise.all(
+ paths.map(function(path) {
+ return loadScript(path);
+ })
+ );
}
function runSuite(suite) {
@@ -38,33 +40,36 @@ function runSuite(suite) {
running = true;
suite
- .on('start', function(event) {
+ .on("start", function() {
resultsEl.innerHTML += 'Running "' + suite.name + '"...\n';
})
- .on('cycle', function(event) {
- resultsEl.innerHTML += String(event.target) + '\n';
+ .on("cycle", function(event) {
+ resultsEl.innerHTML += String(event.target) + "\n";
})
- .on('complete', function() {
- resultsEl.innerHTML += 'Fastest is ' + this.filter('fastest').map('name') + '\n\n--------------\n\n';
+ .on("complete", function() {
+ resultsEl.innerHTML +=
+ "Fastest is " +
+ this.filter("fastest").map("name") +
+ "\n\n--------------\n\n";
running = false;
- suite.off('start cycle complete');
+ suite.off("start cycle complete");
resolve();
})
- .on('error', function(e) {
+ .on("error", function(e) {
running = false;
- suite.off('start cycle complete error');
+ suite.off("start cycle complete error");
reject(e.target.error);
})
// run async
- .run({ 'async': true });
+ .run({ async: true });
});
}
-var vdom = window.MarkoVDOM = {
- virtualize: require('../../runtime/vdom/virtualize'),
+var vdom = (window.MarkoVDOM = {
+ virtualize: require("../../runtime/vdom/virtualize"),
createElement: function(tagName, attrs, childCount, constId) {
return new HTMLElement(tagName, attrs, childCount, constId);
@@ -78,7 +83,7 @@ var vdom = window.MarkoVDOM = {
createDocumentFragment: function() {
return new DocumentFragment();
}
-};
+});
var app = {
loadScript,
@@ -91,19 +96,19 @@ function registerBenchmark(name, func) {
benchmarks[name] = func(app);
}
-registerBenchmark('create', require('./benchmark-create'));
-registerBenchmark('walk', require('./benchmark-walk'));
+registerBenchmark("create", require("./benchmark-create"));
+registerBenchmark("walk", require("./benchmark-walk"));
-document.body.addEventListener('click', function(event) {
+document.body.addEventListener("click", function(event) {
if (running) {
return;
}
var target = event.target;
- var benchmarkName = target.getAttribute('data-benchmark');
+ var benchmarkName = target.getAttribute("data-benchmark");
if (benchmarkName) {
var oldButtonLabel = target.innerHTML;
- target.innerHTML = oldButtonLabel + ' - running...';
- resultsEl.innerHTML = '';
+ target.innerHTML = oldButtonLabel + " - running...";
+ resultsEl.innerHTML = "";
var benchmarkFunc = benchmarks[benchmarkName];
@@ -111,7 +116,7 @@ document.body.addEventListener('click', function(event) {
.then(function() {
target.innerHTML = oldButtonLabel;
- resultsEl.innerHTML += '\nDONE!';
+ resultsEl.innerHTML += "\nDONE!";
})
.catch(function(e) {
target.innerHTML = oldButtonLabel;
@@ -119,4 +124,4 @@ document.body.addEventListener('click', function(event) {
resultsEl.innerHTML = e.toString();
});
}
-});
\ No newline at end of file
+});
diff --git a/benchmark/vdom/codegen-create/codegen-dom-innerHTML.js b/benchmark/vdom/codegen-create/codegen-dom-innerHTML.js
index abc890118..00c50bdfb 100644
--- a/benchmark/vdom/codegen-create/codegen-dom-innerHTML.js
+++ b/benchmark/vdom/codegen-create/codegen-dom-innerHTML.js
@@ -1,4 +1,4 @@
-module.exports = function(node, html) {
+module.exports = function() {
return `
var fragment = range.createContextualFragment(html);
return fragment.childNodes[0];`;
@@ -10,4 +10,4 @@ var range = document.createRange();
range.selectNode(document.body);
var html = ${JSON.stringify(html)};
`;
-};
\ No newline at end of file
+};
diff --git a/benchmark/vdom/codegen-create/codegen-dom.js b/benchmark/vdom/codegen-create/codegen-dom.js
index 1149d7d0f..b00330706 100644
--- a/benchmark/vdom/codegen-create/codegen-dom.js
+++ b/benchmark/vdom/codegen-create/codegen-dom.js
@@ -1,29 +1,33 @@
module.exports = function(node) {
-
var nextId = 0;
- var code = '';
+ var code = "";
function codegenEl(node, level) {
- var varName = level === 0 ? 'root' : `node${nextId++}`;
+ var varName = level === 0 ? "root" : `node${nextId++}`;
- code += `var ${varName} = document.createElement(${JSON.stringify(node.nodeName)})\n`;
+ code += `var ${varName} = document.createElement(${JSON.stringify(
+ node.nodeName
+ )})\n`;
var attributes = node.attributes;
- for (var i=0; i [options]')
- .example('Compile a single template', '$0 template.marko')
- .example('Compile all templates in the current directory', '$0 .')
- .example('Compile multiple templates', '$0 template.marko src/ foo/')
- .example('Delete all *.marko.js files in the current directory', '$0 . --clean')
+ .usage("Usage: $0 [options]")
+ .example("Compile a single template", "$0 template.marko")
+ .example("Compile all templates in the current directory", "$0 .")
+ .example("Compile multiple templates", "$0 template.marko src/ foo/")
+ .example(
+ "Delete all *.marko.js files in the current directory",
+ "$0 . --clean"
+ )
.validate(function(result) {
if (result.help) {
this.printUsage();
process.exit(0);
} else if (result.version) {
- console.log('markoc@' + markocPkgVersion);
+ console.log("markoc@" + markocPkgVersion);
if (markoPkgVersion) {
- console.log('marko@' + markoPkgVersion);
+ console.log("marko@" + markoPkgVersion);
}
process.exit(0);
@@ -114,20 +127,19 @@ var args = require('argly').createParser({
})
.parse();
-var output = 'html';
+var output = "html";
var isForBrowser = false;
if (args.vdom) {
- output = 'vdom';
+ output = "vdom";
isForBrowser = true;
}
-
var compileOptions = {
output: output,
browser: isForBrowser,
- compilerType: 'markoc',
+ compilerType: "markoc",
compilerVersion: markoPkgVersion || markocPkgVersion
};
@@ -146,30 +158,28 @@ if (paths && paths.length) {
var ignoreRules = args.ignore;
if (!ignoreRules) {
- ignoreRules = ['/node_modules', '.*'];
+ ignoreRules = ["/node_modules", ".*"];
}
-ignoreRules = ignoreRules.filter(function (s) {
+ignoreRules = ignoreRules.filter(function(s) {
s = s.trim();
return s && !s.match(/^#/);
});
-ignoreRules = ignoreRules.map(function (pattern) {
-
+ignoreRules = ignoreRules.map(function(pattern) {
return new Minimatch(pattern, mmOptions);
});
-
function isIgnored(path, dir, stat) {
if (path.startsWith(dir)) {
path = path.substring(dir.length);
}
- path = path.replace(/\\/g, '/');
+ path = path.replace(/\\/g, "/");
var ignore = false;
var ignoreRulesLength = ignoreRules.length;
- for (var i=0; i {
- template.render({
- name: 'Frank',
- count: 30,
- colors: ['red', 'green', 'blue']
- }, res);
-}).listen(8080);
+http
+ .createServer()
+ .on("request", (req, res) => {
+ template.render(
+ {
+ name: "Frank",
+ count: 30,
+ colors: ["red", "green", "blue"]
+ },
+ res
+ );
+ })
+ .listen(8080);
```
#### Bonus: Friendly compile-time errors
-We all make mistakes *every now and then*. Typo in your custom tag? Forgot an
+We all make mistakes _every now and then_. Typo in your custom tag? Forgot an
ending tag? No worries! Marko will give you a friendly error message and point
you right to the problematic code.
@@ -276,7 +282,7 @@ Unrecognized tag: fancy-buttn — More details: https://github.com/marko-js/mark
Coming soon: auto correction and autonomous coding
-*****
+---
-*Cover image credit:
-*[Wikipedia](https://en.wikipedia.org/wiki/List_of_rock_formations#/media/File:Amanhecer_no_Hercules_--.jpg)
+_Cover image credit:
+_[Wikipedia](https://en.wikipedia.org/wiki/List_of_rock_formations#/media/File:Amanhecer_no_Hercules_--.jpg)
diff --git a/docs/components.md b/docs/components.md
index 3d9f316d9..7ec371b4f 100644
--- a/docs/components.md
+++ b/docs/components.md
@@ -12,15 +12,14 @@ With Marko, the DOM output of a UI component is based on input properties and a
Marko makes it easy to to co-locate your component's class and styles with the HTML view that they correspond to. The following are the key part of any UI component:
-- __View__ - The HTML template for your UI component. Receives input properties and states and renders to either HTML (server-side) or virtual DOM nodes (browser-side)
-- __Client-side behavior__ - Implemented as a JavaScript class with methods and properties to provide initialization, event handling (including DOM events, custom events and lifecycle events) and state management
-- __Styling__ - Cascading StyleSheet with support for CSS preprocessors such as Less or Sass
+* **View** - The HTML template for your UI component. Receives input properties and states and renders to either HTML (server-side) or virtual DOM nodes (browser-side)
+* **Client-side behavior** - Implemented as a JavaScript class with methods and properties to provide initialization, event handling (including DOM events, custom events and lifecycle events) and state management
+* **Styling** - Cascading StyleSheet with support for CSS preprocessors such as Less or Sass
## Server-side rendering
A UI component can be rendered on the server or in the browser, but in either case, the UI component instance will be mounted to a DOM node in the browser automatically. If a UI component tree is rendered on the server then Marko will automatically recreate the UI component tree in the browser with no extra code required. For more details, please see [Server-side rendering](/docs/server-side-rendering/).
-
## Single-file components
Marko allows you to define a `class` for a component right in the `.marko` view and call methods of that class with `on-*` attributes:
@@ -45,7 +44,7 @@ class {
### Styles
-Adding styles to your view is also made easy. These styles won't be output in a `'
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/escaped-dollar/test.js b/test/render/fixtures/escaped-dollar/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/escaped-dollar/test.js
+++ b/test/render/fixtures/escaped-dollar/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-array-index/test.js b/test/render/fixtures/for-array-index/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-array-index/test.js
+++ b/test/render/fixtures/for-array-index/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-attr-separator-html/test.js b/test/render/fixtures/for-attr-separator-html/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-attr-separator-html/test.js
+++ b/test/render/fixtures/for-attr-separator-html/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-attr-separator-status-var/test.js b/test/render/fixtures/for-attr-separator-status-var/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-attr-separator-status-var/test.js
+++ b/test/render/fixtures/for-attr-separator-status-var/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-attr-separator/test.js b/test/render/fixtures/for-attr-separator/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-attr-separator/test.js
+++ b/test/render/fixtures/for-attr-separator/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-attr-status-var-string/test.js b/test/render/fixtures/for-attr-status-var-string/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-attr-status-var-string/test.js
+++ b/test/render/fixtures/for-attr-status-var-string/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-attr/test.js b/test/render/fixtures/for-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-attr/test.js
+++ b/test/render/fixtures/for-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-if-attr/test.js b/test/render/fixtures/for-if-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-if-attr/test.js
+++ b/test/render/fixtures/for-if-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-iterator-as-target/test.js b/test/render/fixtures/for-iterator-as-target/test.js
index cd5e2a3c3..bc1e6268c 100644
--- a/test/render/fixtures/for-iterator-as-target/test.js
+++ b/test/render/fixtures/for-iterator-as-target/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
- myIterator: function (callback) {
+ myIterator: function(callback) {
for (var i = 5; i >= 0; i--) {
callback(i);
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/for-iterator-attr/test.js b/test/render/fixtures/for-iterator-attr/test.js
index 00ce9f2d3..fcba2094d 100644
--- a/test/render/fixtures/for-iterator-attr/test.js
+++ b/test/render/fixtures/for-iterator-attr/test.js
@@ -1,9 +1,9 @@
exports.templateData = {
- reverseIterator: function (arrayList, callback) {
+ reverseIterator: function(arrayList, callback) {
var statusVar = { first: 0, last: arrayList.length - 1 };
for (var i = arrayList.length - 1; i >= 0; i--) {
statusVar.index = i;
callback(arrayList[i], statusVar);
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/for-iterator-status-var-attr/test.js b/test/render/fixtures/for-iterator-status-var-attr/test.js
index 00ce9f2d3..fcba2094d 100644
--- a/test/render/fixtures/for-iterator-status-var-attr/test.js
+++ b/test/render/fixtures/for-iterator-status-var-attr/test.js
@@ -1,9 +1,9 @@
exports.templateData = {
- reverseIterator: function (arrayList, callback) {
+ reverseIterator: function(arrayList, callback) {
var statusVar = { first: 0, last: arrayList.length - 1 };
for (var i = arrayList.length - 1; i >= 0; i--) {
statusVar.index = i;
callback(arrayList[i], statusVar);
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/for-iterator-status-var/test.js b/test/render/fixtures/for-iterator-status-var/test.js
index 00ce9f2d3..fcba2094d 100644
--- a/test/render/fixtures/for-iterator-status-var/test.js
+++ b/test/render/fixtures/for-iterator-status-var/test.js
@@ -1,9 +1,9 @@
exports.templateData = {
- reverseIterator: function (arrayList, callback) {
+ reverseIterator: function(arrayList, callback) {
var statusVar = { first: 0, last: arrayList.length - 1 };
for (var i = arrayList.length - 1; i >= 0; i--) {
statusVar.index = i;
callback(arrayList[i], statusVar);
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/for-iterator/test.js b/test/render/fixtures/for-iterator/test.js
index 00ce9f2d3..fcba2094d 100644
--- a/test/render/fixtures/for-iterator/test.js
+++ b/test/render/fixtures/for-iterator/test.js
@@ -1,9 +1,9 @@
exports.templateData = {
- reverseIterator: function (arrayList, callback) {
+ reverseIterator: function(arrayList, callback) {
var statusVar = { first: 0, last: arrayList.length - 1 };
for (var i = arrayList.length - 1; i >= 0; i--) {
statusVar.index = i;
callback(arrayList[i], statusVar);
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/for-native/test.js b/test/render/fixtures/for-native/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-native/test.js
+++ b/test/render/fixtures/for-native/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-props-attr/test.js b/test/render/fixtures/for-props-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-props-attr/test.js
+++ b/test/render/fixtures/for-props-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-props-map/test.js b/test/render/fixtures/for-props-map/test.js
index d60cd6272..d19992164 100644
--- a/test/render/fixtures/for-props-map/test.js
+++ b/test/render/fixtures/for-props-map/test.js
@@ -1,10 +1,10 @@
-'use strict';
+"use strict";
const myMap = new Map();
-myMap.set('foo', 'low');
-myMap.set('bar', 'high');
+myMap.set("foo", "low");
+myMap.set("bar", "high");
exports.templateData = {
myMap: myMap
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/for-props-separator/test.js b/test/render/fixtures/for-props-separator/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-props-separator/test.js
+++ b/test/render/fixtures/for-props-separator/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-props-status-var-separator/test.js b/test/render/fixtures/for-props-status-var-separator/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-props-status-var-separator/test.js
+++ b/test/render/fixtures/for-props-status-var-separator/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-props-status-var/test.js b/test/render/fixtures/for-props-status-var/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-props-status-var/test.js
+++ b/test/render/fixtures/for-props-status-var/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-props/test.js b/test/render/fixtures/for-props/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-props/test.js
+++ b/test/render/fixtures/for-props/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range-descending-step/test.js b/test/render/fixtures/for-range-descending-step/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range-descending-step/test.js
+++ b/test/render/fixtures/for-range-descending-step/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range-descending/test.js b/test/render/fixtures/for-range-descending/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range-descending/test.js
+++ b/test/render/fixtures/for-range-descending/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range-from-to-expr/test.js b/test/render/fixtures/for-range-from-to-expr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range-from-to-expr/test.js
+++ b/test/render/fixtures/for-range-from-to-expr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range-step-2/test.js b/test/render/fixtures/for-range-step-2/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range-step-2/test.js
+++ b/test/render/fixtures/for-range-step-2/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range-step-neg2/test.js b/test/render/fixtures/for-range-step-neg2/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range-step-neg2/test.js
+++ b/test/render/fixtures/for-range-step-neg2/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range-to-expr/test.js b/test/render/fixtures/for-range-to-expr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range-to-expr/test.js
+++ b/test/render/fixtures/for-range-to-expr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-range/test.js b/test/render/fixtures/for-range/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-range/test.js
+++ b/test/render/fixtures/for-range/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-tag-array-expression/test.js b/test/render/fixtures/for-tag-array-expression/test.js
index b00094c8b..925a90aa5 100644
--- a/test/render/fixtures/for-tag-array-expression/test.js
+++ b/test/render/fixtures/for-tag-array-expression/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- colors: ['red', 'green', 'blue']
-};
\ No newline at end of file
+ colors: ["red", "green", "blue"]
+};
diff --git a/test/render/fixtures/for-tag-invalid-option/test.js b/test/render/fixtures/for-tag-invalid-option/test.js
index 66b5cc37f..0edf92184 100644
--- a/test/render/fixtures/for-tag-invalid-option/test.js
+++ b/test/render/fixtures/for-tag-invalid-option/test.js
@@ -1,7 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (err) {
- expect(err.toString()).to.contain('template.marko:1:0] Unexpected input: foo');
-};
\ No newline at end of file
+exports.checkError = function(err) {
+ expect(err.toString()).to.contain(
+ "template.marko:1:0] Unexpected input: foo"
+ );
+};
diff --git a/test/render/fixtures/for-tag-native/test.js b/test/render/fixtures/for-tag-native/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-tag-native/test.js
+++ b/test/render/fixtures/for-tag-native/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-tag-no-arg/test.js b/test/render/fixtures/for-tag-no-arg/test.js
index 9a2462b6b..4b2136087 100644
--- a/test/render/fixtures/for-tag-no-arg/test.js
+++ b/test/render/fixtures/for-tag-no-arg/test.js
@@ -1,7 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (err) {
- expect(err.toString()).to.contain('Invalid tag. Argument is missing.');
-};
\ No newline at end of file
+exports.checkError = function(err) {
+ expect(err.toString()).to.contain(
+ "Invalid tag. Argument is missing."
+ );
+};
diff --git a/test/render/fixtures/for-tag-separator-status-var/test.js b/test/render/fixtures/for-tag-separator-status-var/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-tag-separator-status-var/test.js
+++ b/test/render/fixtures/for-tag-separator-status-var/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-tag-separator/test.js b/test/render/fixtures/for-tag-separator/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-tag-separator/test.js
+++ b/test/render/fixtures/for-tag-separator/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-tag-status-var/test.js b/test/render/fixtures/for-tag-status-var/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-tag-status-var/test.js
+++ b/test/render/fixtures/for-tag-status-var/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/for-tag/test.js b/test/render/fixtures/for-tag/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/for-tag/test.js
+++ b/test/render/fixtures/for-tag/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/global-data/test.js b/test/render/fixtures/global-data/test.js
index 77eeb4f3c..d57823adb 100644
--- a/test/render/fixtures/global-data/test.js
+++ b/test/render/fixtures/global-data/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
$global: {
- foo: 'bar'
+ foo: "bar"
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/hello-dynamic/test.js b/test/render/fixtures/hello-dynamic/test.js
index dcd06d3ce..761736115 100644
--- a/test/render/fixtures/hello-dynamic/test.js
+++ b/test/render/fixtures/hello-dynamic/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "John"
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/hello-static/test.js b/test/render/fixtures/hello-static/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/hello-static/test.js
+++ b/test/render/fixtures/hello-static/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/helpers-empty-notEmpty-import/test.js b/test/render/fixtures/helpers-empty-notEmpty-import/test.js
index dcd06d3ce..761736115 100644
--- a/test/render/fixtures/helpers-empty-notEmpty-import/test.js
+++ b/test/render/fixtures/helpers-empty-notEmpty-import/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "John"
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/html-comment-tag/test.js b/test/render/fixtures/html-comment-tag/test.js
index 1908aabb0..0e1da5404 100644
--- a/test/render/fixtures/html-comment-tag/test.js
+++ b/test/render/fixtures/html-comment-tag/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- "name": "World"
+ name: "World"
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/html-elements-register-nested-multiple/components/hello/html-elements.json b/test/render/fixtures/html-elements-register-nested-multiple/components/hello/html-elements.json
index cede48e1e..64e1d5316 100644
--- a/test/render/fixtures/html-elements-register-nested-multiple/components/hello/html-elements.json
+++ b/test/render/fixtures/html-elements-register-nested-multiple/components/hello/html-elements.json
@@ -1,3 +1,3 @@
{
"": {}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/html-elements-register-nested-multiple/html-elements.json b/test/render/fixtures/html-elements-register-nested-multiple/html-elements.json
index a4964fd72..c7225cb74 100644
--- a/test/render/fixtures/html-elements-register-nested-multiple/html-elements.json
+++ b/test/render/fixtures/html-elements-register-nested-multiple/html-elements.json
@@ -1,3 +1,3 @@
{
"": {}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/html-elements-register-nested-multiple/test.js b/test/render/fixtures/html-elements-register-nested-multiple/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/html-elements-register-nested-multiple/test.js
+++ b/test/render/fixtures/html-elements-register-nested-multiple/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/html-elements-register-nested/html-elements.json b/test/render/fixtures/html-elements-register-nested/html-elements.json
index a4964fd72..c7225cb74 100644
--- a/test/render/fixtures/html-elements-register-nested/html-elements.json
+++ b/test/render/fixtures/html-elements-register-nested/html-elements.json
@@ -1,3 +1,3 @@
{
"": {}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/html-elements-register-nested/test.js b/test/render/fixtures/html-elements-register-nested/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/html-elements-register-nested/test.js
+++ b/test/render/fixtures/html-elements-register-nested/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/html-elements-register/html-elements.json b/test/render/fixtures/html-elements-register/html-elements.json
index a4964fd72..c7225cb74 100644
--- a/test/render/fixtures/html-elements-register/html-elements.json
+++ b/test/render/fixtures/html-elements-register/html-elements.json
@@ -1,3 +1,3 @@
{
"": {}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/html-elements-register/test.js b/test/render/fixtures/html-elements-register/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/html-elements-register/test.js
+++ b/test/render/fixtures/html-elements-register/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/html-entities-body/test.js b/test/render/fixtures/html-entities-body/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/html-entities-body/test.js
+++ b/test/render/fixtures/html-entities-body/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/html/test.js b/test/render/fixtures/html/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/html/test.js
+++ b/test/render/fixtures/html/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-attr/test.js b/test/render/fixtures/if-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-attr/test.js
+++ b/test/render/fixtures/if-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-concise/test.js b/test/render/fixtures/if-concise/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-concise/test.js
+++ b/test/render/fixtures/if-concise/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-else-attr/test.js b/test/render/fixtures/if-else-attr/test.js
index b3c51e957..7e583087e 100644
--- a/test/render/fixtures/if-else-attr/test.js
+++ b/test/render/fixtures/if-else-attr/test.js
@@ -1,19 +1,24 @@
exports.templateData = {
- "accounts": [{
- "balance": 0,
- "balanceFormatted": "$0.00",
- "status": "open"
- }, {
- "balance": 10,
- "balanceFormatted": "$10.00",
- "status": "closed"
- }, {
- "balance": -100,
- "balanceFormatted": "$-100.00",
- "status": "suspended"
- }, {
- "balance": 999,
- "balanceFormatted": "$999.00",
- "status": "open"
- }]
-};
\ No newline at end of file
+ accounts: [
+ {
+ balance: 0,
+ balanceFormatted: "$0.00",
+ status: "open"
+ },
+ {
+ balance: 10,
+ balanceFormatted: "$10.00",
+ status: "closed"
+ },
+ {
+ balance: -100,
+ balanceFormatted: "$-100.00",
+ status: "suspended"
+ },
+ {
+ balance: 999,
+ balanceFormatted: "$999.00",
+ status: "open"
+ }
+ ]
+};
diff --git a/test/render/fixtures/if-else-concise/test.js b/test/render/fixtures/if-else-concise/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-else-concise/test.js
+++ b/test/render/fixtures/if-else-concise/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-else-if-attr/test.js b/test/render/fixtures/if-else-if-attr/test.js
index b3c51e957..7e583087e 100644
--- a/test/render/fixtures/if-else-if-attr/test.js
+++ b/test/render/fixtures/if-else-if-attr/test.js
@@ -1,19 +1,24 @@
exports.templateData = {
- "accounts": [{
- "balance": 0,
- "balanceFormatted": "$0.00",
- "status": "open"
- }, {
- "balance": 10,
- "balanceFormatted": "$10.00",
- "status": "closed"
- }, {
- "balance": -100,
- "balanceFormatted": "$-100.00",
- "status": "suspended"
- }, {
- "balance": 999,
- "balanceFormatted": "$999.00",
- "status": "open"
- }]
-};
\ No newline at end of file
+ accounts: [
+ {
+ balance: 0,
+ balanceFormatted: "$0.00",
+ status: "open"
+ },
+ {
+ balance: 10,
+ balanceFormatted: "$10.00",
+ status: "closed"
+ },
+ {
+ balance: -100,
+ balanceFormatted: "$-100.00",
+ status: "suspended"
+ },
+ {
+ balance: 999,
+ balanceFormatted: "$999.00",
+ status: "open"
+ }
+ ]
+};
diff --git a/test/render/fixtures/if-else-if-concise/test.js b/test/render/fixtures/if-else-if-concise/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-else-if-concise/test.js
+++ b/test/render/fixtures/if-else-if-concise/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-else-if-else-attr/test.js b/test/render/fixtures/if-else-if-else-attr/test.js
index b3c51e957..7e583087e 100644
--- a/test/render/fixtures/if-else-if-else-attr/test.js
+++ b/test/render/fixtures/if-else-if-else-attr/test.js
@@ -1,19 +1,24 @@
exports.templateData = {
- "accounts": [{
- "balance": 0,
- "balanceFormatted": "$0.00",
- "status": "open"
- }, {
- "balance": 10,
- "balanceFormatted": "$10.00",
- "status": "closed"
- }, {
- "balance": -100,
- "balanceFormatted": "$-100.00",
- "status": "suspended"
- }, {
- "balance": 999,
- "balanceFormatted": "$999.00",
- "status": "open"
- }]
-};
\ No newline at end of file
+ accounts: [
+ {
+ balance: 0,
+ balanceFormatted: "$0.00",
+ status: "open"
+ },
+ {
+ balance: 10,
+ balanceFormatted: "$10.00",
+ status: "closed"
+ },
+ {
+ balance: -100,
+ balanceFormatted: "$-100.00",
+ status: "suspended"
+ },
+ {
+ balance: 999,
+ balanceFormatted: "$999.00",
+ status: "open"
+ }
+ ]
+};
diff --git a/test/render/fixtures/if-else-if-else-concise/test.js b/test/render/fixtures/if-else-if-else-concise/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-else-if-else-concise/test.js
+++ b/test/render/fixtures/if-else-if-else-concise/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-else-if-else/test.js b/test/render/fixtures/if-else-if-else/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-else-if-else/test.js
+++ b/test/render/fixtures/if-else-if-else/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-else-if/test.js b/test/render/fixtures/if-else-if/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-else-if/test.js
+++ b/test/render/fixtures/if-else-if/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-else/test.js b/test/render/fixtures/if-else/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if-else/test.js
+++ b/test/render/fixtures/if-else/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/if-no-arg/test.js b/test/render/fixtures/if-no-arg/test.js
index a29b7d94a..135a12f9a 100644
--- a/test/render/fixtures/if-no-arg/test.js
+++ b/test/render/fixtures/if-no-arg/test.js
@@ -1,7 +1,7 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (err) {
- expect(err.toString()).to.contain('Invalid tag. Argument is missing.');
-};
\ No newline at end of file
+exports.checkError = function(err) {
+ expect(err.toString()).to.contain("Invalid tag. Argument is missing.");
+};
diff --git a/test/render/fixtures/if/test.js b/test/render/fixtures/if/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/if/test.js
+++ b/test/render/fixtures/if/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/ignore-unrecognized-tag/test.js b/test/render/fixtures/ignore-unrecognized-tag/test.js
index 9d6a6b75a..0b895d3cc 100644
--- a/test/render/fixtures/ignore-unrecognized-tag/test.js
+++ b/test/render/fixtures/ignore-unrecognized-tag/test.js
@@ -1,4 +1,2 @@
-var expect = require('chai').expect;
-
exports.templateData = {};
-exports.ignoreUnrecognizedTags = true;
\ No newline at end of file
+exports.ignoreUnrecognizedTags = true;
diff --git a/test/render/fixtures/img/test.js b/test/render/fixtures/img/test.js
index a98bcb7fe..135bfb311 100644
--- a/test/render/fixtures/img/test.js
+++ b/test/render/fixtures/img/test.js
@@ -1,14 +1,18 @@
exports.templateData = {
- "options": [{
- "value": "red",
- "selected": false
- }, {
- "value": "green",
- "selected": true
- }, {
- "value": "blue",
- "selected": false
- }],
- "disabled": false,
- "checked": true
-};
\ No newline at end of file
+ options: [
+ {
+ value: "red",
+ selected: false
+ },
+ {
+ value: "green",
+ selected: true
+ },
+ {
+ value: "blue",
+ selected: false
+ }
+ ],
+ disabled: false,
+ checked: true
+};
diff --git a/test/render/fixtures/import/bar.js b/test/render/fixtures/import/bar.js
index f86512989..2327d1785 100644
--- a/test/render/fixtures/import/bar.js
+++ b/test/render/fixtures/import/bar.js
@@ -1,4 +1,4 @@
module.exports = {
foo: "Foo",
b: "Bar"
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-attr-error-missing-argument/test.js b/test/render/fixtures/include-attr-error-missing-argument/test.js
index 62976b452..f08b0a677 100644
--- a/test/render/fixtures/include-attr-error-missing-argument/test.js
+++ b/test/render/fixtures/include-attr-error-missing-argument/test.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (e) {
+exports.checkError = function(e) {
var message = e.toString();
- expect(message).to.contain('template.marko:1:0');
- expect(message).to.contain('The include attribute must have an argument');
-};
\ No newline at end of file
+ expect(message).to.contain("template.marko:1:0");
+ expect(message).to.contain("The include attribute must have an argument");
+};
diff --git a/test/render/fixtures/include-attr-no-arg/test.js b/test/render/fixtures/include-attr-no-arg/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-attr-no-arg/test.js
+++ b/test/render/fixtures/include-attr-no-arg/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-attr/test.js b/test/render/fixtures/include-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-attr/test.js
+++ b/test/render/fixtures/include-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-body-empty/test.js b/test/render/fixtures/include-body-empty/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-body-empty/test.js
+++ b/test/render/fixtures/include-body-empty/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-body/test.js b/test/render/fixtures/include-body/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-body/test.js
+++ b/test/render/fixtures/include-body/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-component/components/my-component/index.js b/test/render/fixtures/include-component/components/my-component/index.js
index db791a380..8f4007928 100644
--- a/test/render/fixtures/include-component/components/my-component/index.js
+++ b/test/render/fixtures/include-component/components/my-component/index.js
@@ -1,7 +1,7 @@
module.exports = {
- renderer: function (input, out) {
- out.beginElement('div');
+ renderer: function(input, out) {
+ out.beginElement("div");
out.text(input.name.toUpperCase());
out.endElement();
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-component/test.js b/test/render/fixtures/include-component/test.js
index 7feb612aa..41eba273b 100644
--- a/test/render/fixtures/include-component/test.js
+++ b/test/render/fixtures/include-component/test.js
@@ -1,5 +1,5 @@
-var myComponent = require('./components/my-component');
+var myComponent = require("./components/my-component");
exports.templateData = {
component: myComponent
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-data-body/test.js b/test/render/fixtures/include-data-body/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-data-body/test.js
+++ b/test/render/fixtures/include-data-body/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-data/test.js b/test/render/fixtures/include-data/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-data/test.js
+++ b/test/render/fixtures/include-data/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-dynamic/test.js b/test/render/fixtures/include-dynamic/test.js
index 56d8c403f..7cbc23e5c 100644
--- a/test/render/fixtures/include-dynamic/test.js
+++ b/test/render/fixtures/include-dynamic/test.js
@@ -1,4 +1,4 @@
-var includeTarget = require('./include-target.marko');
+var includeTarget = require("./include-target.marko");
exports.templateData = {
includeTarget: includeTarget
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-html/test.js b/test/render/fixtures/include-html/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-html/test.js
+++ b/test/render/fixtures/include-html/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-hyphen-attrs-multiple/test.js b/test/render/fixtures/include-hyphen-attrs-multiple/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-hyphen-attrs-multiple/test.js
+++ b/test/render/fixtures/include-hyphen-attrs-multiple/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-hyphen-attrs/test.js b/test/render/fixtures/include-hyphen-attrs/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-hyphen-attrs/test.js
+++ b/test/render/fixtures/include-hyphen-attrs/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-layout-data-attrs/test.js b/test/render/fixtures/include-layout-data-attrs/test.js
index 65e779f09..319770571 100644
--- a/test/render/fixtures/include-layout-data-attrs/test.js
+++ b/test/render/fixtures/include-layout-data-attrs/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- layoutDynamic: require('./layout-default.marko')
-};
\ No newline at end of file
+ layoutDynamic: require("./layout-default.marko")
+};
diff --git a/test/render/fixtures/include-layout-data/test.js b/test/render/fixtures/include-layout-data/test.js
index 65e779f09..319770571 100644
--- a/test/render/fixtures/include-layout-data/test.js
+++ b/test/render/fixtures/include-layout-data/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- layoutDynamic: require('./layout-default.marko')
-};
\ No newline at end of file
+ layoutDynamic: require("./layout-default.marko")
+};
diff --git a/test/render/fixtures/include-layout-v3-compat/test.js b/test/render/fixtures/include-layout-v3-compat/test.js
index 65e779f09..319770571 100644
--- a/test/render/fixtures/include-layout-v3-compat/test.js
+++ b/test/render/fixtures/include-layout-v3-compat/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- layoutDynamic: require('./layout-default.marko')
-};
\ No newline at end of file
+ layoutDynamic: require("./layout-default.marko")
+};
diff --git a/test/render/fixtures/include-layout/test.js b/test/render/fixtures/include-layout/test.js
index 65e779f09..319770571 100644
--- a/test/render/fixtures/include-layout/test.js
+++ b/test/render/fixtures/include-layout/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- layoutDynamic: require('./layout-default.marko')
-};
\ No newline at end of file
+ layoutDynamic: require("./layout-default.marko")
+};
diff --git a/test/render/fixtures/include-renderBody-data-and-attrs/test.js b/test/render/fixtures/include-renderBody-data-and-attrs/test.js
index e08ba8dfe..44cfd8490 100644
--- a/test/render/fixtures/include-renderBody-data-and-attrs/test.js
+++ b/test/render/fixtures/include-renderBody-data-and-attrs/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
renderBody(out, data) {
- out.beginElement('div');
- out.text(data.name + ':' + data.age);
+ out.beginElement("div");
+ out.text(data.name + ":" + data.age);
out.endElement();
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-renderBody-no-data/test.js b/test/render/fixtures/include-renderBody-no-data/test.js
index dce6264ff..8160ca9a1 100644
--- a/test/render/fixtures/include-renderBody-no-data/test.js
+++ b/test/render/fixtures/include-renderBody-no-data/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
renderBody(out) {
- out.beginElement('div');
- out.text('foo');
+ out.beginElement("div");
+ out.text("foo");
out.endElement();
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-renderBody-string-arg/test.js b/test/render/fixtures/include-renderBody-string-arg/test.js
index 10f58ec71..3870fb0d1 100644
--- a/test/render/fixtures/include-renderBody-string-arg/test.js
+++ b/test/render/fixtures/include-renderBody-string-arg/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
renderBody(out, name) {
- out.beginElement('div');
+ out.beginElement("div");
out.text(name);
out.endElement();
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-renderBody/test.js b/test/render/fixtures/include-renderBody/test.js
index 6ee5ec298..fe5c5c6f1 100644
--- a/test/render/fixtures/include-renderBody/test.js
+++ b/test/render/fixtures/include-renderBody/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
renderBody(out, data) {
- out.beginElement('div');
+ out.beginElement("div");
out.text(data.name);
out.endElement();
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/include-safeHTML/test.js b/test/render/fixtures/include-safeHTML/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-safeHTML/test.js
+++ b/test/render/fixtures/include-safeHTML/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-string/test.js b/test/render/fixtures/include-string/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-string/test.js
+++ b/test/render/fixtures/include-string/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-tag-error-missing-argument/test.js b/test/render/fixtures/include-tag-error-missing-argument/test.js
index 17bc9cfbb..8dcf2055a 100644
--- a/test/render/fixtures/include-tag-error-missing-argument/test.js
+++ b/test/render/fixtures/include-tag-error-missing-argument/test.js
@@ -1,8 +1,8 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (e) {
+exports.checkError = function(e) {
var message = e.toString();
- expect(message).to.contain('The tag must have an argument');
-};
\ No newline at end of file
+ expect(message).to.contain("The tag must have an argument");
+};
diff --git a/test/render/fixtures/include-text/test.js b/test/render/fixtures/include-text/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-text/test.js
+++ b/test/render/fixtures/include-text/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include-whitespace/test.js b/test/render/fixtures/include-whitespace/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include-whitespace/test.js
+++ b/test/render/fixtures/include-whitespace/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/include/test.js b/test/render/fixtures/include/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/include/test.js
+++ b/test/render/fixtures/include/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/inline-script/test.js b/test/render/fixtures/inline-script/test.js
index 1908aabb0..0e1da5404 100644
--- a/test/render/fixtures/inline-script/test.js
+++ b/test/render/fixtures/inline-script/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- "name": "World"
+ name: "World"
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/invoke/test.js b/test/render/fixtures/invoke/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/invoke/test.js
+++ b/test/render/fixtures/invoke/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/label-for/test.js b/test/render/fixtures/label-for/test.js
index c7310eea8..bd8475e2e 100644
--- a/test/render/fixtures/label-for/test.js
+++ b/test/render/fixtures/label-for/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "Hello "
-};
\ No newline at end of file
+ name: 'Hello '
+};
diff --git a/test/render/fixtures/macro-body/test.js b/test/render/fixtures/macro-body/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/macro-body/test.js
+++ b/test/render/fixtures/macro-body/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/macro-boolean/test.js b/test/render/fixtures/macro-boolean/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/macro-boolean/test.js
+++ b/test/render/fixtures/macro-boolean/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/macro-no-args/test.js b/test/render/fixtures/macro-no-args/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/macro-no-args/test.js
+++ b/test/render/fixtures/macro-no-args/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/macro-positional-args/test.js b/test/render/fixtures/macro-positional-args/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/macro-positional-args/test.js
+++ b/test/render/fixtures/macro-positional-args/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/macro/test.js b/test/render/fixtures/macro/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/macro/test.js
+++ b/test/render/fixtures/macro/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/macros-ordering/test.js b/test/render/fixtures/macros-ordering/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/macros-ordering/test.js
+++ b/test/render/fixtures/macros-ordering/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/marko-body-attr-parsed-text/test.js b/test/render/fixtures/marko-body-attr-parsed-text/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/marko-body-attr-parsed-text/test.js
+++ b/test/render/fixtures/marko-body-attr-parsed-text/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/marko-body-attr-static-text/test.js b/test/render/fixtures/marko-body-attr-static-text/test.js
index c128acd4a..7889b1c32 100644
--- a/test/render/fixtures/marko-body-attr-static-text/test.js
+++ b/test/render/fixtures/marko-body-attr-static-text/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
- "myAttrs": {
- "style": "background-color: #FF0000; ",
- "class": "my-div",
- "checked": true
+ myAttrs: {
+ style: "background-color: #FF0000; ",
+ class: "my-div",
+ checked: true
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/marko-compiler-options-preserve-comments/test.js b/test/render/fixtures/marko-compiler-options-preserve-comments/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/marko-compiler-options-preserve-comments/test.js
+++ b/test/render/fixtures/marko-compiler-options-preserve-comments/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/marko-compiler-options-preserve-whitespace-nested/test.js b/test/render/fixtures/marko-compiler-options-preserve-whitespace-nested/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/marko-compiler-options-preserve-whitespace-nested/test.js
+++ b/test/render/fixtures/marko-compiler-options-preserve-whitespace-nested/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/marko-compiler-options-preserve-whitespace-trim/test.js b/test/render/fixtures/marko-compiler-options-preserve-whitespace-trim/test.js
index 651f5cf87..e1e58ae90 100644
--- a/test/render/fixtures/marko-compiler-options-preserve-whitespace-trim/test.js
+++ b/test/render/fixtures/marko-compiler-options-preserve-whitespace-trim/test.js
@@ -1,2 +1,2 @@
exports.templateData = {};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/marko-compiler-options-preserve-whitespace/test.js b/test/render/fixtures/marko-compiler-options-preserve-whitespace/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/marko-compiler-options-preserve-whitespace/test.js
+++ b/test/render/fixtures/marko-compiler-options-preserve-whitespace/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/marko-preserve-whitespace-attr/test.js b/test/render/fixtures/marko-preserve-whitespace-attr/test.js
index c128acd4a..7889b1c32 100644
--- a/test/render/fixtures/marko-preserve-whitespace-attr/test.js
+++ b/test/render/fixtures/marko-preserve-whitespace-attr/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
- "myAttrs": {
- "style": "background-color: #FF0000; ",
- "class": "my-div",
- "checked": true
+ myAttrs: {
+ style: "background-color: #FF0000; ",
+ class: "my-div",
+ checked: true
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/marko-preserve-whitespace-tag/test.js b/test/render/fixtures/marko-preserve-whitespace-tag/test.js
index c128acd4a..7889b1c32 100644
--- a/test/render/fixtures/marko-preserve-whitespace-tag/test.js
+++ b/test/render/fixtures/marko-preserve-whitespace-tag/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
- "myAttrs": {
- "style": "background-color: #FF0000; ",
- "class": "my-div",
- "checked": true
+ myAttrs: {
+ style: "background-color: #FF0000; ",
+ class: "my-div",
+ checked: true
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-bad/test.js b/test/render/fixtures/nested-tag-bad/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-bad/test.js
+++ b/test/render/fixtures/nested-tag-bad/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/components/test-message/marko-tag.json b/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/components/test-message/marko-tag.json
index 4c287eeda..725698989 100644
--- a/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/components/test-message/marko-tag.json
+++ b/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/components/test-message/marko-tag.json
@@ -2,4 +2,4 @@
"@items - []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/test.js b/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-complex-logic-repeated/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-complex-logic/test.js b/test/render/fixtures/nested-tag-shorthand-complex-logic/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-complex-logic/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-complex-logic/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-hyphens-repeated/test.js b/test/render/fixtures/nested-tag-shorthand-hyphens-repeated/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-hyphens-repeated/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-hyphens-repeated/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-hyphens/test.js b/test/render/fixtures/nested-tag-shorthand-hyphens/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-hyphens/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-hyphens/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-conditional/test.js b/test/render/fixtures/nested-tag-shorthand-simple-conditional/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-conditional/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-simple-conditional/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/components/test-message/marko-tag.json b/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/components/test-message/marko-tag.json
index 0966afc2f..a39a36e21 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/components/test-message/marko-tag.json
+++ b/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/components/test-message/marko-tag.json
@@ -5,4 +5,4 @@
"": {
"@label": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/test.js b/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/test.js
index 14e8623a7..15591fd95 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-simple-declared-invalid-attribute/test.js
@@ -1,8 +1,10 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (e) {
+exports.checkError = function(e) {
var message = e.toString();
- expect(message).to.contain('Unsupported attribute of "invalid" found on the <@header> custom tag. Allowed attributes: label');
-};
\ No newline at end of file
+ expect(message).to.contain(
+ 'Unsupported attribute of "invalid" found on the <@header> custom tag. Allowed attributes: label'
+ );
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-declared/components/test-message/marko-tag.json b/test/render/fixtures/nested-tag-shorthand-simple-declared/components/test-message/marko-tag.json
index 0966afc2f..a39a36e21 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-declared/components/test-message/marko-tag.json
+++ b/test/render/fixtures/nested-tag-shorthand-simple-declared/components/test-message/marko-tag.json
@@ -5,4 +5,4 @@
"": {
"@label": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-declared/test.js b/test/render/fixtures/nested-tag-shorthand-simple-declared/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-declared/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-simple-declared/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/components/test-message/marko-tag.json b/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/components/test-message/marko-tag.json
index 4c287eeda..725698989 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/components/test-message/marko-tag.json
+++ b/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/components/test-message/marko-tag.json
@@ -2,4 +2,4 @@
"@items
- []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/test.js b/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-simple-repeated-conditional/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-repeated/components/test-message/marko-tag.json b/test/render/fixtures/nested-tag-shorthand-simple-repeated/components/test-message/marko-tag.json
index 4c287eeda..725698989 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-repeated/components/test-message/marko-tag.json
+++ b/test/render/fixtures/nested-tag-shorthand-simple-repeated/components/test-message/marko-tag.json
@@ -2,4 +2,4 @@
"@items
- []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tag-shorthand-simple-repeated/test.js b/test/render/fixtures/nested-tag-shorthand-simple-repeated/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple-repeated/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-simple-repeated/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tag-shorthand-simple/test.js b/test/render/fixtures/nested-tag-shorthand-simple/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tag-shorthand-simple/test.js
+++ b/test/render/fixtures/nested-tag-shorthand-simple/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tags-concise/marko.json b/test/render/fixtures/nested-tags-concise/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags-concise/marko.json
+++ b/test/render/fixtures/nested-tags-concise/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/marko-tag.json b/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/marko-tag.json
+++ b/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs
[]": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/renderer.js b/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/renderer.js
+++ b/test/render/fixtures/nested-tags-concise/tags/test-nested-tags-tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/nested-tags-concise/test.js b/test/render/fixtures/nested-tags-concise/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/nested-tags-concise/test.js
+++ b/test/render/fixtures/nested-tags-concise/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/nested-tags-deep/marko.json b/test/render/fixtures/nested-tags-deep/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags-deep/marko.json
+++ b/test/render/fixtures/nested-tags-deep/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/marko-tag.json b/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/marko-tag.json
index e78045946..0951772bc 100644
--- a/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/marko-tag.json
+++ b/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/marko-tag.json
@@ -3,8 +3,6 @@
"@class": "string",
"@items - []": {
"@foo": "string",
- "@body ": {
-
- }
+ "@body ": {}
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/renderer.js b/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/renderer.js
index c68c46aa0..bf57e0ec3 100644
--- a/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/renderer.js
+++ b/test/render/fixtures/nested-tags-deep/tags/test-nested-tags-deep/renderer.js
@@ -1,5 +1,5 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-module.exports = function (input, out) {
+module.exports = function(input, out) {
template.render(input, out);
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tags-deep/test.js b/test/render/fixtures/nested-tags-deep/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/nested-tags-deep/test.js
+++ b/test/render/fixtures/nested-tags-deep/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/nested-tags-empty-body/marko.json b/test/render/fixtures/nested-tags-empty-body/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags-empty-body/marko.json
+++ b/test/render/fixtures/nested-tags-empty-body/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/marko-tag.json b/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/marko-tag.json
+++ b/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs
[]": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/renderer.js b/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/renderer.js
+++ b/test/render/fixtures/nested-tags-empty-body/tags/test-nested-tags-tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/nested-tags-empty-body/test.js b/test/render/fixtures/nested-tags-empty-body/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/nested-tags-empty-body/test.js
+++ b/test/render/fixtures/nested-tags-empty-body/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/nested-tags-repeated-parent/marko.json b/test/render/fixtures/nested-tags-repeated-parent/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags-repeated-parent/marko.json
+++ b/test/render/fixtures/nested-tags-repeated-parent/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/marko-tag.json b/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/marko-tag.json
index 9686a762c..4624c93c9 100644
--- a/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/marko-tag.json
+++ b/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/marko-tag.json
@@ -20,4 +20,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/renderer.js b/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/renderer.js
index 364254e5c..89137e3b2 100644
--- a/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/renderer.js
+++ b/test/render/fixtures/nested-tags-repeated-parent/tags/test-nested-tags-overlay/renderer.js
@@ -1,13 +1,16 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var header = input.header;
var body = input.body;
var footer = input.footer;
- template.render({
- header: header,
- body: body,
- footer: footer
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ header: header,
+ body: body,
+ footer: footer
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/nested-tags-repeated-parent/test.js b/test/render/fixtures/nested-tags-repeated-parent/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tags-repeated-parent/test.js
+++ b/test/render/fixtures/nested-tags-repeated-parent/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/nested-tags-repeated/marko.json b/test/render/fixtures/nested-tags-repeated/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags-repeated/marko.json
+++ b/test/render/fixtures/nested-tags-repeated/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/marko-tag.json b/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/marko-tag.json
+++ b/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/renderer.js b/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/renderer.js
+++ b/test/render/fixtures/nested-tags-repeated/tags/test-nested-tags-tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/nested-tags-repeated/test.js b/test/render/fixtures/nested-tags-repeated/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/nested-tags-repeated/test.js
+++ b/test/render/fixtures/nested-tags-repeated/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/nested-tags-self-closing/marko.json b/test/render/fixtures/nested-tags-self-closing/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags-self-closing/marko.json
+++ b/test/render/fixtures/nested-tags-self-closing/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/marko-tag.json b/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/marko-tag.json
+++ b/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/renderer.js b/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/renderer.js
+++ b/test/render/fixtures/nested-tags-self-closing/tags/test-nested-tags-tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/nested-tags-self-closing/test.js b/test/render/fixtures/nested-tags-self-closing/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/nested-tags-self-closing/test.js
+++ b/test/render/fixtures/nested-tags-self-closing/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/nested-tags/marko.json b/test/render/fixtures/nested-tags/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/nested-tags/marko.json
+++ b/test/render/fixtures/nested-tags/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/marko-tag.json b/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/marko-tag.json
index 9686a762c..4624c93c9 100644
--- a/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/marko-tag.json
+++ b/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/marko-tag.json
@@ -20,4 +20,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/renderer.js b/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/renderer.js
index 364254e5c..89137e3b2 100644
--- a/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/renderer.js
+++ b/test/render/fixtures/nested-tags/tags/test-nested-tags-overlay/renderer.js
@@ -1,13 +1,16 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var header = input.header;
var body = input.body;
var footer = input.footer;
- template.render({
- header: header,
- body: body,
- footer: footer
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ header: header,
+ body: body,
+ footer: footer
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/nested-tags/test.js b/test/render/fixtures/nested-tags/test.js
index 5e7059361..28cca3fa6 100644
--- a/test/render/fixtures/nested-tags/test.js
+++ b/test/render/fixtures/nested-tags/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
header: {
- renderBody: function (out) {
- out.write('Header content!');
+ renderBody: function(out) {
+ out.write("Header content!");
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/open-tag-only-renderer/marko.json b/test/render/fixtures/open-tag-only-renderer/marko.json
index 6c15ba24f..96d8184f2 100644
--- a/test/render/fixtures/open-tag-only-renderer/marko.json
+++ b/test/render/fixtures/open-tag-only-renderer/marko.json
@@ -3,4 +3,4 @@
"renderer": "./renderer.js",
"open-tag-only": true
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/open-tag-only-renderer/renderer.js b/test/render/fixtures/open-tag-only-renderer/renderer.js
index c20993594..5c02b5a36 100644
--- a/test/render/fixtures/open-tag-only-renderer/renderer.js
+++ b/test/render/fixtures/open-tag-only-renderer/renderer.js
@@ -1,3 +1,3 @@
-module.exports = function (input, out) {
- out.write('Hello World ');
-};
\ No newline at end of file
+module.exports = function(input, out) {
+ out.write("Hello World ");
+};
diff --git a/test/render/fixtures/open-tag-only-renderer/test.js b/test/render/fixtures/open-tag-only-renderer/test.js
index 31b92d2a3..44b8f285a 100644
--- a/test/render/fixtures/open-tag-only-renderer/test.js
+++ b/test/render/fixtures/open-tag-only-renderer/test.js
@@ -1,4 +1,4 @@
exports.templateData = {};
exports.loadOptions = {
preserveWhitespace: true
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/open-tag-only/marko.json b/test/render/fixtures/open-tag-only/marko.json
index 35cf25b45..bad4d3f14 100644
--- a/test/render/fixtures/open-tag-only/marko.json
+++ b/test/render/fixtures/open-tag-only/marko.json
@@ -2,4 +2,4 @@
"": {
"open-tag-only": true
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/open-tag-only/test.js b/test/render/fixtures/open-tag-only/test.js
index 31b92d2a3..44b8f285a 100644
--- a/test/render/fixtures/open-tag-only/test.js
+++ b/test/render/fixtures/open-tag-only/test.js
@@ -1,4 +1,4 @@
exports.templateData = {};
exports.loadOptions = {
preserveWhitespace: true
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/paren-grouping/test.js b/test/render/fixtures/paren-grouping/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/paren-grouping/test.js
+++ b/test/render/fixtures/paren-grouping/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/parsed-text-tag/components/parsed-text/code-generator.js b/test/render/fixtures/parsed-text-tag/components/parsed-text/code-generator.js
index 1567a8c00..7403c8833 100644
--- a/test/render/fixtures/parsed-text-tag/components/parsed-text/code-generator.js
+++ b/test/render/fixtures/parsed-text-tag/components/parsed-text/code-generator.js
@@ -1,3 +1,3 @@
-module.exports = function codeGenerator(el, codegen) {
+module.exports = function codeGenerator(el) {
return el.body;
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/parsed-text-tag/components/parsed-text/marko-tag.json b/test/render/fixtures/parsed-text-tag/components/parsed-text/marko-tag.json
index b72188ee8..a67ddd624 100644
--- a/test/render/fixtures/parsed-text-tag/components/parsed-text/marko-tag.json
+++ b/test/render/fixtures/parsed-text-tag/components/parsed-text/marko-tag.json
@@ -1,4 +1,4 @@
{
"body": "parsed-text",
"preserve-whitespace": true
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/pattern-attr/test.js b/test/render/fixtures/pattern-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/pattern-attr/test.js
+++ b/test/render/fixtures/pattern-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/placeholders-body-expressions/test.js b/test/render/fixtures/placeholders-body-expressions/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/placeholders-body-expressions/test.js
+++ b/test/render/fixtures/placeholders-body-expressions/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/preserveWhitespace-global/test.js b/test/render/fixtures/preserveWhitespace-global/test.js
index 8b450ded0..e6446437a 100644
--- a/test/render/fixtures/preserveWhitespace-global/test.js
+++ b/test/render/fixtures/preserveWhitespace-global/test.js
@@ -1,3 +1,3 @@
exports.templateData = {};
exports.preserveWhitespaceGlobal = true;
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/preserveWhitespace-load-option/test.js b/test/render/fixtures/preserveWhitespace-load-option/test.js
index 82d7b4da2..d552c4c00 100644
--- a/test/render/fixtures/preserveWhitespace-load-option/test.js
+++ b/test/render/fixtures/preserveWhitespace-load-option/test.js
@@ -2,4 +2,4 @@ exports.templateData = {};
exports.loadOptions = {
preserveWhitespace: true
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/previousSibling-nextSibling/marko.json b/test/render/fixtures/previousSibling-nextSibling/marko.json
index 02ef4c8de..ff3a84a39 100644
--- a/test/render/fixtures/previousSibling-nextSibling/marko.json
+++ b/test/render/fixtures/previousSibling-nextSibling/marko.json
@@ -2,4 +2,4 @@
"": {
"transformer": "./span-transformer.js"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/previousSibling-nextSibling/span-transformer.js b/test/render/fixtures/previousSibling-nextSibling/span-transformer.js
index 04324a9ab..ac47e4257 100644
--- a/test/render/fixtures/previousSibling-nextSibling/span-transformer.js
+++ b/test/render/fixtures/previousSibling-nextSibling/span-transformer.js
@@ -1,14 +1,16 @@
-var expect = require('chai').expect;
-module.exports = function (node, context) {
+var expect = require("chai").expect;
+module.exports = function(node, context) {
var previousSibling = node.previousSibling;
var nextSibling = node.nextSibling;
- expect(previousSibling).to.be.an('object');
- expect(nextSibling).to.be.an('object');
+ expect(previousSibling).to.be.an("object");
+ expect(nextSibling).to.be.an("object");
- expect(previousSibling.tagName).to.equal('a');
- expect(nextSibling.tagName).to.equal('b');
+ expect(previousSibling.tagName).to.equal("a");
+ expect(nextSibling.tagName).to.equal("b");
- previousSibling.appendChild(context.builder.text(context.builder.literal('A')));
- nextSibling.appendChild(context.builder.text(context.builder.literal('B')));
-};
\ No newline at end of file
+ previousSibling.appendChild(
+ context.builder.text(context.builder.literal("A"))
+ );
+ nextSibling.appendChild(context.builder.text(context.builder.literal("B")));
+};
diff --git a/test/render/fixtures/regexp-attr/test.js b/test/render/fixtures/regexp-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/regexp-attr/test.js
+++ b/test/render/fixtures/regexp-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/renderer-dir-main.js/index.js b/test/render/fixtures/renderer-dir-main.js/index.js
index 11ced9c35..0799a167b 100644
--- a/test/render/fixtures/renderer-dir-main.js/index.js
+++ b/test/render/fixtures/renderer-dir-main.js/index.js
@@ -1,3 +1,3 @@
-module.exports = function (input, out) {
- out.write('Hello ' + input.name + '!');
-};
\ No newline at end of file
+module.exports = function(input, out) {
+ out.write("Hello " + input.name + "!");
+};
diff --git a/test/render/fixtures/renderer-dir-main.js/marko.json b/test/render/fixtures/renderer-dir-main.js/marko.json
index e9357266d..bad47691b 100644
--- a/test/render/fixtures/renderer-dir-main.js/marko.json
+++ b/test/render/fixtures/renderer-dir-main.js/marko.json
@@ -3,4 +3,4 @@
"renderer": "./",
"@name": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/renderer-dir-main.js/test.js b/test/render/fixtures/renderer-dir-main.js/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/renderer-dir-main.js/test.js
+++ b/test/render/fixtures/renderer-dir-main.js/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/renderer-index.js/marko.json b/test/render/fixtures/renderer-index.js/marko.json
index fea83262d..98cbf73e8 100644
--- a/test/render/fixtures/renderer-index.js/marko.json
+++ b/test/render/fixtures/renderer-index.js/marko.json
@@ -3,4 +3,4 @@
"renderer": "./renderer",
"@name": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/renderer-index.js/renderer/index.js b/test/render/fixtures/renderer-index.js/renderer/index.js
index 11ced9c35..0799a167b 100644
--- a/test/render/fixtures/renderer-index.js/renderer/index.js
+++ b/test/render/fixtures/renderer-index.js/renderer/index.js
@@ -1,3 +1,3 @@
-module.exports = function (input, out) {
- out.write('Hello ' + input.name + '!');
-};
\ No newline at end of file
+module.exports = function(input, out) {
+ out.write("Hello " + input.name + "!");
+};
diff --git a/test/render/fixtures/renderer-index.js/test.js b/test/render/fixtures/renderer-index.js/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/renderer-index.js/test.js
+++ b/test/render/fixtures/renderer-index.js/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/require/test-helpers.js b/test/render/fixtures/require/test-helpers.js
index e9a4d6252..207b9c49d 100644
--- a/test/render/fixtures/require/test-helpers.js
+++ b/test/render/fixtures/require/test-helpers.js
@@ -1,8 +1,8 @@
module.exports = {
- trim: function (str, info) {
+ trim: function(str) {
return str ? str.trim() : str;
},
- upperCase: function (str, info) {
+ upperCase: function(str) {
return str ? str.toUpperCase(str) : str;
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/require/test.js b/test/render/fixtures/require/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/require/test.js
+++ b/test/render/fixtures/require/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/reserved-words/marko.json b/test/render/fixtures/reserved-words/marko.json
index e8d84d80a..100feeffc 100644
--- a/test/render/fixtures/reserved-words/marko.json
+++ b/test/render/fixtures/reserved-words/marko.json
@@ -3,4 +3,4 @@
"renderer": "./my-custom-tag.js",
"@short": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/reserved-words/my-custom-tag.js b/test/render/fixtures/reserved-words/my-custom-tag.js
index d3b076460..8c2aa9941 100644
--- a/test/render/fixtures/reserved-words/my-custom-tag.js
+++ b/test/render/fixtures/reserved-words/my-custom-tag.js
@@ -1,3 +1,3 @@
-module.exports = function (input, out) {
- out.write('[my-custom-tag] ' + input.short);
-};
\ No newline at end of file
+module.exports = function(input, out) {
+ out.write("[my-custom-tag] " + input.short);
+};
diff --git a/test/render/fixtures/reserved-words/test.js b/test/render/fixtures/reserved-words/test.js
index 1eef3a37c..ba8230733 100644
--- a/test/render/fixtures/reserved-words/test.js
+++ b/test/render/fixtures/reserved-words/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- short: 'short'
-};
\ No newline at end of file
+ short: "short"
+};
diff --git a/test/render/fixtures/scanned-tags/marko.json b/test/render/fixtures/scanned-tags/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/scanned-tags/marko.json
+++ b/test/render/fixtures/scanned-tags/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-a/renderer.js b/test/render/fixtures/scanned-tags/tags/scanned-a/renderer.js
index cc562697a..c2f6fe508 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-a/renderer.js
+++ b/test/render/fixtures/scanned-tags/tags/scanned-a/renderer.js
@@ -1,3 +1,3 @@
module.exports = function render(input, out) {
- out.write('scanned-a: Hello ' + input.name);
-};
\ No newline at end of file
+ out.write("scanned-a: Hello " + input.name);
+};
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-c/marko-tag.json b/test/render/fixtures/scanned-tags/tags/scanned-c/marko-tag.json
index c3d3b15c3..6ca1f9c97 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-c/marko-tag.json
+++ b/test/render/fixtures/scanned-tags/tags/scanned-c/marko-tag.json
@@ -5,4 +5,4 @@
"target-property": "NAME"
}
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-c/renderer.js b/test/render/fixtures/scanned-tags/tags/scanned-c/renderer.js
index b8b5eef35..29d928355 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-c/renderer.js
+++ b/test/render/fixtures/scanned-tags/tags/scanned-c/renderer.js
@@ -1,3 +1,3 @@
module.exports = function render(input, out) {
- out.write('scanned-c: Hello ' + input.NAME);
-};
\ No newline at end of file
+ out.write("scanned-c: Hello " + input.NAME);
+};
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-e/renderer.js b/test/render/fixtures/scanned-tags/tags/scanned-e/renderer.js
index e3e9c6c1e..4d87da547 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-e/renderer.js
+++ b/test/render/fixtures/scanned-tags/tags/scanned-e/renderer.js
@@ -1,12 +1,12 @@
exports.TAG = {
- "attributes": {
- "name": {
- "type": "string",
+ attributes: {
+ name: {
+ type: "string",
"target-property": "NAME"
}
}
};
module.exports = function render(input, out) {
- out.write('scanned-e: Hello ' + input.NAME);
-};
\ No newline at end of file
+ out.write("scanned-e: Hello " + input.NAME);
+};
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-f/renderer.js b/test/render/fixtures/scanned-tags/tags/scanned-f/renderer.js
index daedb7d24..304f15a7f 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-f/renderer.js
+++ b/test/render/fixtures/scanned-tags/tags/scanned-f/renderer.js
@@ -10,5 +10,5 @@ TAG = {
*/
module.exports = function render(input, out) {
- out.write('scanned-f: Hello ' + input.NAME);
-};
\ No newline at end of file
+ out.write("scanned-f: Hello " + input.NAME);
+};
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-g/index.js b/test/render/fixtures/scanned-tags/tags/scanned-g/index.js
index cefad1c92..069aa0c8f 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-g/index.js
+++ b/test/render/fixtures/scanned-tags/tags/scanned-g/index.js
@@ -1,3 +1,3 @@
-exports.renderer = function (input, out) {
- out.write('scanned-g: Hello ' + input.name);
-};
\ No newline at end of file
+exports.renderer = function(input, out) {
+ out.write("scanned-g: Hello " + input.name);
+};
diff --git a/test/render/fixtures/scanned-tags/tags/scanned-h/index.js b/test/render/fixtures/scanned-tags/tags/scanned-h/index.js
index 68a5fd64a..47f3e4f7c 100644
--- a/test/render/fixtures/scanned-tags/tags/scanned-h/index.js
+++ b/test/render/fixtures/scanned-tags/tags/scanned-h/index.js
@@ -1,3 +1,3 @@
-exports.renderer = function (input, out) {
- out.write('scanned-h: Hello ' + input.firstName);
-};
\ No newline at end of file
+exports.renderer = function(input, out) {
+ out.write("scanned-h: Hello " + input.firstName);
+};
diff --git a/test/render/fixtures/scanned-tags/test.js b/test/render/fixtures/scanned-tags/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/scanned-tags/test.js
+++ b/test/render/fixtures/scanned-tags/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/script-nonce/script-nonce-transformer.js b/test/render/fixtures/script-nonce/script-nonce-transformer.js
index 4d3a0758d..21286c789 100644
--- a/test/render/fixtures/script-nonce/script-nonce-transformer.js
+++ b/test/render/fixtures/script-nonce/script-nonce-transformer.js
@@ -1,8 +1,7 @@
module.exports = function transform(el, context) {
- if (el.hasAttribute('csp-nonce')) {
+ if (el.hasAttribute("csp-nonce")) {
+ el.removeAttribute("csp-nonce");
- el.removeAttribute('csp-nonce');
-
- el.setAttributeValue('nonce', context.builder.literal('foo'));
+ el.setAttributeValue("nonce", context.builder.literal("foo"));
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/script-nonce/test.js b/test/render/fixtures/script-nonce/test.js
index 33340c3e8..b28b438e2 100644
--- a/test/render/fixtures/script-nonce/test.js
+++ b/test/render/fixtures/script-nonce/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- "myAttrs": {
- "hello": "world"
+ myAttrs: {
+ hello: "world"
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/script-string-literal-placeholder/test.js b/test/render/fixtures/script-string-literal-placeholder/test.js
index 6eabbc215..522c6101c 100644
--- a/test/render/fixtures/script-string-literal-placeholder/test.js
+++ b/test/render/fixtures/script-string-literal-placeholder/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "World"
-};
\ No newline at end of file
+ name: "World"
+};
diff --git a/test/render/fixtures/script-tag-entities-static/marko.json b/test/render/fixtures/script-tag-entities-static/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/script-tag-entities-static/marko.json
+++ b/test/render/fixtures/script-tag-entities-static/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/script-tag-entities-static/tags/test-script/code-generator.js b/test/render/fixtures/script-tag-entities-static/tags/test-script/code-generator.js
index 505365823..012feaab6 100644
--- a/test/render/fixtures/script-tag-entities-static/tags/test-script/code-generator.js
+++ b/test/render/fixtures/script-tag-entities-static/tags/test-script/code-generator.js
@@ -1,5 +1,6 @@
-
module.exports = function generateCode(elNode, codegen) {
var builder = codegen.builder;
- return builder.htmlElement('script', {}, [builder.text(builder.literal(''))]);
-};
\ No newline at end of file
+ return builder.htmlElement("script", {}, [
+ builder.text(builder.literal(""))
+ ]);
+};
diff --git a/test/render/fixtures/script-tag-entities-static/tags/test-script/marko-tag.json b/test/render/fixtures/script-tag-entities-static/tags/test-script/marko-tag.json
index 8d0664211..d9d3f1084 100644
--- a/test/render/fixtures/script-tag-entities-static/tags/test-script/marko-tag.json
+++ b/test/render/fixtures/script-tag-entities-static/tags/test-script/marko-tag.json
@@ -1,3 +1,3 @@
{
"code-generator": "./code-generator"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/script-tag-entities-static/test.js b/test/render/fixtures/script-tag-entities-static/test.js
index 010a2ae52..761736115 100644
--- a/test/render/fixtures/script-tag-entities-static/test.js
+++ b/test/render/fixtures/script-tag-entities-static/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'John'
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/script-tag-entities/test.js b/test/render/fixtures/script-tag-entities/test.js
index b25447bea..a61ca395a 100644
--- a/test/render/fixtures/script-tag-entities/test.js
+++ b/test/render/fixtures/script-tag-entities/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- "name": ""
+ name: ""
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/script/test.js b/test/render/fixtures/script/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/script/test.js
+++ b/test/render/fixtures/script/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/scriptlet/test.js b/test/render/fixtures/scriptlet/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/scriptlet/test.js
+++ b/test/render/fixtures/scriptlet/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/shorthand-class-merge/test.js b/test/render/fixtures/shorthand-class-merge/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-class-merge/test.js
+++ b/test/render/fixtures/shorthand-class-merge/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/shorthand-class-merge2/test.js b/test/render/fixtures/shorthand-class-merge2/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-class-merge2/test.js
+++ b/test/render/fixtures/shorthand-class-merge2/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/shorthand-class-plus-class-obj/test.js b/test/render/fixtures/shorthand-class-plus-class-obj/test.js
index 464e2f790..e53da31ec 100644
--- a/test/render/fixtures/shorthand-class-plus-class-obj/test.js
+++ b/test/render/fixtures/shorthand-class-plus-class-obj/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Marko'
-};
\ No newline at end of file
+ name: "Marko"
+};
diff --git a/test/render/fixtures/shorthand-classes-many-classes/test.js b/test/render/fixtures/shorthand-classes-many-classes/test.js
index 740d6c4dd..8740c6152 100644
--- a/test/render/fixtures/shorthand-classes-many-classes/test.js
+++ b/test/render/fixtures/shorthand-classes-many-classes/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- cls: 'test123'
-};
\ No newline at end of file
+ cls: "test123"
+};
diff --git a/test/render/fixtures/shorthand-div-id-dynamic/test.js b/test/render/fixtures/shorthand-div-id-dynamic/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-div-id-dynamic/test.js
+++ b/test/render/fixtures/shorthand-div-id-dynamic/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/shorthand-div-id/test.js b/test/render/fixtures/shorthand-div-id/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-div-id/test.js
+++ b/test/render/fixtures/shorthand-div-id/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/shorthand-div.foo/test.js b/test/render/fixtures/shorthand-div.foo/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-div.foo/test.js
+++ b/test/render/fixtures/shorthand-div.foo/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/shorthand-id-and-classes/test.js b/test/render/fixtures/shorthand-id-and-classes/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-id-and-classes/test.js
+++ b/test/render/fixtures/shorthand-id-and-classes/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/shorthand-verbose/test.js b/test/render/fixtures/shorthand-verbose/test.js
index fe50c57c5..049888cb8 100644
--- a/test/render/fixtures/shorthand-verbose/test.js
+++ b/test/render/fixtures/shorthand-verbose/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'Frank'
-};
\ No newline at end of file
+ name: "Frank"
+};
diff --git a/test/render/fixtures/simple-conditionals/test.js b/test/render/fixtures/simple-conditionals/test.js
index 157624bc2..65225fac2 100644
--- a/test/render/fixtures/simple-conditionals/test.js
+++ b/test/render/fixtures/simple-conditionals/test.js
@@ -1,4 +1,4 @@
exports.templateData = {
- "name": "John",
- "count": 51
-};
\ No newline at end of file
+ name: "John",
+ count: 51
+};
diff --git a/test/render/fixtures/simple/test.js b/test/render/fixtures/simple/test.js
index 06b2de778..8d8d6773f 100644
--- a/test/render/fixtures/simple/test.js
+++ b/test/render/fixtures/simple/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- "message": "Hello World!",
- "rootClass": "title",
- "colors": ["red", "green", "blue"]
-};
\ No newline at end of file
+ message: "Hello World!",
+ rootClass: "title",
+ colors: ["red", "green", "blue"]
+};
diff --git a/test/render/fixtures/space-around-equal-sign-for-attr/test.js b/test/render/fixtures/space-around-equal-sign-for-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/space-around-equal-sign-for-attr/test.js
+++ b/test/render/fixtures/space-around-equal-sign-for-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/space-in-complex-attr-value/test.js b/test/render/fixtures/space-in-complex-attr-value/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/space-in-complex-attr-value/test.js
+++ b/test/render/fixtures/space-in-complex-attr-value/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/static-text-tag/components/static-text/code-generator.js b/test/render/fixtures/static-text-tag/components/static-text/code-generator.js
index 1567a8c00..7403c8833 100644
--- a/test/render/fixtures/static-text-tag/components/static-text/code-generator.js
+++ b/test/render/fixtures/static-text-tag/components/static-text/code-generator.js
@@ -1,3 +1,3 @@
-module.exports = function codeGenerator(el, codegen) {
+module.exports = function codeGenerator(el) {
return el.body;
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/static-text-tag/components/static-text/marko-tag.json b/test/render/fixtures/static-text-tag/components/static-text/marko-tag.json
index 61d7f7d3f..966a51b08 100644
--- a/test/render/fixtures/static-text-tag/components/static-text/marko-tag.json
+++ b/test/render/fixtures/static-text-tag/components/static-text/marko-tag.json
@@ -1,4 +1,4 @@
{
"body": "static-text",
"preserve-whitespace": true
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/string-expressions/test.js b/test/render/fixtures/string-expressions/test.js
index e62259d13..68563f236 100644
--- a/test/render/fixtures/string-expressions/test.js
+++ b/test/render/fixtures/string-expressions/test.js
@@ -1,4 +1,4 @@
exports.templateData = {
- "name": "John",
- "count": 10
-};
\ No newline at end of file
+ name: "John",
+ count: 10
+};
diff --git a/test/render/fixtures/style-attr-object-units/test.js b/test/render/fixtures/style-attr-object-units/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/style-attr-object-units/test.js
+++ b/test/render/fixtures/style-attr-object-units/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/style-attr-object/test.js b/test/render/fixtures/style-attr-object/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/style-attr-object/test.js
+++ b/test/render/fixtures/style-attr-object/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/style-attr-string-dynamic/test.js b/test/render/fixtures/style-attr-string-dynamic/test.js
index 05e1bb330..54e167159 100644
--- a/test/render/fixtures/style-attr-string-dynamic/test.js
+++ b/test/render/fixtures/style-attr-string-dynamic/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- style: 'color: red'
-};
\ No newline at end of file
+ style: "color: red"
+};
diff --git a/test/render/fixtures/style-attr-string/test.js b/test/render/fixtures/style-attr-string/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/style-attr-string/test.js
+++ b/test/render/fixtures/style-attr-string/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/svg/test.js b/test/render/fixtures/svg/test.js
index 651f5cf87..e1e58ae90 100644
--- a/test/render/fixtures/svg/test.js
+++ b/test/render/fixtures/svg/test.js
@@ -1,2 +1,2 @@
exports.templateData = {};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/syntax-concise/marko.json b/test/render/fixtures/syntax-concise/marko.json
index 7ecc75f05..24e297e79 100644
--- a/test/render/fixtures/syntax-concise/marko.json
+++ b/test/render/fixtures/syntax-concise/marko.json
@@ -1,3 +1,3 @@
{
"": "./tabs/marko-tag.json"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/syntax-concise/tabs/marko-tag.json b/test/render/fixtures/syntax-concise/tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/syntax-concise/tabs/marko-tag.json
+++ b/test/render/fixtures/syntax-concise/tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/syntax-concise/tabs/renderer.js b/test/render/fixtures/syntax-concise/tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/syntax-concise/tabs/renderer.js
+++ b/test/render/fixtures/syntax-concise/tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/syntax-concise/test.js b/test/render/fixtures/syntax-concise/test.js
index 40282cbb0..ffdf5af75 100644
--- a/test/render/fixtures/syntax-concise/test.js
+++ b/test/render/fixtures/syntax-concise/test.js
@@ -1,3 +1,3 @@
exports.templateData = {};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/syntax-mixed/marko.json b/test/render/fixtures/syntax-mixed/marko.json
index 7ecc75f05..24e297e79 100644
--- a/test/render/fixtures/syntax-mixed/marko.json
+++ b/test/render/fixtures/syntax-mixed/marko.json
@@ -1,3 +1,3 @@
{
"": "./tabs/marko-tag.json"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/syntax-mixed/tabs/marko-tag.json b/test/render/fixtures/syntax-mixed/tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/syntax-mixed/tabs/marko-tag.json
+++ b/test/render/fixtures/syntax-mixed/tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/syntax-mixed/tabs/renderer.js b/test/render/fixtures/syntax-mixed/tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/syntax-mixed/tabs/renderer.js
+++ b/test/render/fixtures/syntax-mixed/tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/syntax-mixed/test.js b/test/render/fixtures/syntax-mixed/test.js
index 40282cbb0..ffdf5af75 100644
--- a/test/render/fixtures/syntax-mixed/test.js
+++ b/test/render/fixtures/syntax-mixed/test.js
@@ -1,3 +1,3 @@
exports.templateData = {};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/syntax-simple-concise/test.js b/test/render/fixtures/syntax-simple-concise/test.js
index bb66f142f..812be0b50 100644
--- a/test/render/fixtures/syntax-simple-concise/test.js
+++ b/test/render/fixtures/syntax-simple-concise/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- colors: ['red', 'green', 'blue']
+ colors: ["red", "green", "blue"]
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/syntax-simple-mixed/test.js b/test/render/fixtures/syntax-simple-mixed/test.js
index bb66f142f..812be0b50 100644
--- a/test/render/fixtures/syntax-simple-mixed/test.js
+++ b/test/render/fixtures/syntax-simple-mixed/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- colors: ['red', 'green', 'blue']
+ colors: ["red", "green", "blue"]
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/syntax-simple-verbose/test.js b/test/render/fixtures/syntax-simple-verbose/test.js
index bb66f142f..812be0b50 100644
--- a/test/render/fixtures/syntax-simple-verbose/test.js
+++ b/test/render/fixtures/syntax-simple-verbose/test.js
@@ -1,5 +1,5 @@
exports.templateData = {
- colors: ['red', 'green', 'blue']
+ colors: ["red", "green", "blue"]
};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/syntax-verbose/marko.json b/test/render/fixtures/syntax-verbose/marko.json
index 7ecc75f05..24e297e79 100644
--- a/test/render/fixtures/syntax-verbose/marko.json
+++ b/test/render/fixtures/syntax-verbose/marko.json
@@ -1,3 +1,3 @@
{
"": "./tabs/marko-tag.json"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/syntax-verbose/tabs/marko-tag.json b/test/render/fixtures/syntax-verbose/tabs/marko-tag.json
index 39d0e5fd9..89e98f6c9 100644
--- a/test/render/fixtures/syntax-verbose/tabs/marko-tag.json
+++ b/test/render/fixtures/syntax-verbose/tabs/marko-tag.json
@@ -4,4 +4,4 @@
"@tabs []": {
"@title": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/syntax-verbose/tabs/renderer.js b/test/render/fixtures/syntax-verbose/tabs/renderer.js
index 266c0eae0..fe0d89eab 100644
--- a/test/render/fixtures/syntax-verbose/tabs/renderer.js
+++ b/test/render/fixtures/syntax-verbose/tabs/renderer.js
@@ -1,9 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
var tabs = input.tabs;
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/syntax-verbose/test.js b/test/render/fixtures/syntax-verbose/test.js
index 651f5cf87..e1e58ae90 100644
--- a/test/render/fixtures/syntax-verbose/test.js
+++ b/test/render/fixtures/syntax-verbose/test.js
@@ -1,2 +1,2 @@
exports.templateData = {};
-exports.vdomSkip = true;
\ No newline at end of file
+exports.vdomSkip = true;
diff --git a/test/render/fixtures/tabs-tab-new/marko.json b/test/render/fixtures/tabs-tab-new/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/tabs-tab-new/marko.json
+++ b/test/render/fixtures/tabs-tab-new/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tabs-tab-new/tags/test-tab-new/marko-tag.json b/test/render/fixtures/tabs-tab-new/tags/test-tab-new/marko-tag.json
index fdfb634a9..8b4f2cef3 100644
--- a/test/render/fixtures/tabs-tab-new/tags/test-tab-new/marko-tag.json
+++ b/test/render/fixtures/tabs-tab-new/tags/test-tab-new/marko-tag.json
@@ -3,4 +3,4 @@
"tabs": "__tabsHelper"
},
"@title": "string"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tabs-tab-new/tags/test-tab-new/renderer.js b/test/render/fixtures/tabs-tab-new/tags/test-tab-new/renderer.js
index e84451ceb..c23cab712 100644
--- a/test/render/fixtures/tabs-tab-new/tags/test-tab-new/renderer.js
+++ b/test/render/fixtures/tabs-tab-new/tags/test-tab-new/renderer.js
@@ -1,4 +1,4 @@
-exports.render = function (input, out) {
- var tabs = input.tabs;
- tabs.addTab(input);
-};
\ No newline at end of file
+exports.render = function(input) {
+ var tabs = input.tabs;
+ tabs.addTab(input);
+};
diff --git a/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/marko-tag.json b/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/marko-tag.json
index 869179d98..727e90cbd 100644
--- a/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/marko-tag.json
+++ b/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/marko-tag.json
@@ -1,3 +1,3 @@
{
"body-function": "buildTabs(__tabsHelper)"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/renderer.js b/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/renderer.js
index 58fc22e08..f84a1ed52 100644
--- a/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/renderer.js
+++ b/test/render/fixtures/tabs-tab-new/tags/test-tabs-new/renderer.js
@@ -1,12 +1,12 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.render = function (input, out) {
+exports.render = function(input, out) {
var tabs = [],
activeFound = false;
if (input.buildTabs) {
input.buildTabs({
- addTab: function (tab) {
+ addTab: function(tab) {
if (tab.active) {
tab.activeFound = true;
}
@@ -21,12 +21,15 @@ exports.render = function (input, out) {
tabs[0].active = true;
}
- tabs.forEach(function (tab) {
+ tabs.forEach(function(tab) {
tab.liClass = tab.active ? "active" : "";
tab.divClass = tab.active ? "tab-pane active" : "tab-pane";
});
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/tabs-tab-new/test.js b/test/render/fixtures/tabs-tab-new/test.js
index 9775e3938..01a1e9e6b 100644
--- a/test/render/fixtures/tabs-tab-new/test.js
+++ b/test/render/fixtures/tabs-tab-new/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "showConditionalTab": false
-};
\ No newline at end of file
+ showConditionalTab: false
+};
diff --git a/test/render/fixtures/tabs-tab/marko.json b/test/render/fixtures/tabs-tab/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/tabs-tab/marko.json
+++ b/test/render/fixtures/tabs-tab/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tabs-tab/tags/test-tab/marko-tag.json b/test/render/fixtures/tabs-tab/tags/test-tab/marko-tag.json
index 8d152661a..037d87aef 100644
--- a/test/render/fixtures/tabs-tab/tags/test-tab/marko-tag.json
+++ b/test/render/fixtures/tabs-tab/tags/test-tab/marko-tag.json
@@ -3,4 +3,4 @@
"tabs": "tabs"
},
"@title": "string"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tabs-tab/tags/test-tab/renderer.js b/test/render/fixtures/tabs-tab/tags/test-tab/renderer.js
index e84451ceb..c23cab712 100644
--- a/test/render/fixtures/tabs-tab/tags/test-tab/renderer.js
+++ b/test/render/fixtures/tabs-tab/tags/test-tab/renderer.js
@@ -1,4 +1,4 @@
-exports.render = function (input, out) {
- var tabs = input.tabs;
- tabs.addTab(input);
-};
\ No newline at end of file
+exports.render = function(input) {
+ var tabs = input.tabs;
+ tabs.addTab(input);
+};
diff --git a/test/render/fixtures/tabs-tab/tags/test-tabs/marko-tag.json b/test/render/fixtures/tabs-tab/tags/test-tabs/marko-tag.json
index 720984466..f3a53d1bf 100644
--- a/test/render/fixtures/tabs-tab/tags/test-tabs/marko-tag.json
+++ b/test/render/fixtures/tabs-tab/tags/test-tabs/marko-tag.json
@@ -1,3 +1,3 @@
{
"var": "tabs"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tabs-tab/tags/test-tabs/renderer.js b/test/render/fixtures/tabs-tab/tags/test-tabs/renderer.js
index 573bc6023..f070d06e4 100644
--- a/test/render/fixtures/tabs-tab/tags/test-tabs/renderer.js
+++ b/test/render/fixtures/tabs-tab/tags/test-tabs/renderer.js
@@ -1,11 +1,11 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.render = function (input, out) {
+exports.render = function(input, out) {
var tabs = [],
activeFound = false;
input.renderBody(out, {
- addTab: function (tab) {
+ addTab: function(tab) {
if (tab.active) {
tab.activeFound = true;
}
@@ -19,12 +19,15 @@ exports.render = function (input, out) {
tabs[0].active = true;
}
- tabs.forEach(function (tab) {
+ tabs.forEach(function(tab) {
tab.liClass = tab.active ? "active" : "";
tab.divClass = tab.active ? "tab-pane active" : "tab-pane";
});
- template.render({
- tabs: tabs
- }, out);
-};
\ No newline at end of file
+ template.render(
+ {
+ tabs: tabs
+ },
+ out
+ );
+};
diff --git a/test/render/fixtures/tabs-tab/test.js b/test/render/fixtures/tabs-tab/test.js
index 9775e3938..01a1e9e6b 100644
--- a/test/render/fixtures/tabs-tab/test.js
+++ b/test/render/fixtures/tabs-tab/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "showConditionalTab": false
-};
\ No newline at end of file
+ showConditionalTab: false
+};
diff --git a/test/render/fixtures/tag-code-generator-return-array/marko.json b/test/render/fixtures/tag-code-generator-return-array/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/tag-code-generator-return-array/marko.json
+++ b/test/render/fixtures/tag-code-generator-return-array/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/code-generator.js b/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/code-generator.js
index 013ff591b..e58072db9 100644
--- a/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/code-generator.js
+++ b/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/code-generator.js
@@ -1,4 +1,7 @@
module.exports = function generateCode(elNode, codegen) {
var builder = codegen.builder;
- return [builder.text(builder.literal('Hello ')), builder.text(elNode.getAttributeValue('name'))];
-};
\ No newline at end of file
+ return [
+ builder.text(builder.literal("Hello ")),
+ builder.text(elNode.getAttributeValue("name"))
+ ];
+};
diff --git a/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/marko-tag.json b/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/marko-tag.json
index 0ec7547f9..b9633ce37 100644
--- a/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/marko-tag.json
+++ b/test/render/fixtures/tag-code-generator-return-array/tags/test-tag-code-generator-return-array/marko-tag.json
@@ -1,3 +1,3 @@
{
"@name": "string"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-array/test.js b/test/render/fixtures/tag-code-generator-return-array/test.js
index 010a2ae52..761736115 100644
--- a/test/render/fixtures/tag-code-generator-return-array/test.js
+++ b/test/render/fixtures/tag-code-generator-return-array/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'John'
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/tag-code-generator-return-node/marko.json b/test/render/fixtures/tag-code-generator-return-node/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/tag-code-generator-return-node/marko.json
+++ b/test/render/fixtures/tag-code-generator-return-node/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/code-generator.js b/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/code-generator.js
index d57abad18..d121dff59 100644
--- a/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/code-generator.js
+++ b/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/code-generator.js
@@ -1,4 +1,10 @@
module.exports = function generateCode(elNode, codegen) {
var builder = codegen.builder;
- return builder.functionCall('out.write', [builder.binaryExpression('"Hello "', '+', elNode.getAttributeValue('name'))]);
-};
\ No newline at end of file
+ return builder.functionCall("out.write", [
+ builder.binaryExpression(
+ '"Hello "',
+ "+",
+ elNode.getAttributeValue("name")
+ )
+ ]);
+};
diff --git a/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/marko-tag.json b/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/marko-tag.json
index 0ec7547f9..b9633ce37 100644
--- a/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/marko-tag.json
+++ b/test/render/fixtures/tag-code-generator-return-node/tags/test-tag-code-generator-return-node/marko-tag.json
@@ -1,3 +1,3 @@
{
"@name": "string"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-node/test.js b/test/render/fixtures/tag-code-generator-return-node/test.js
index 010a2ae52..761736115 100644
--- a/test/render/fixtures/tag-code-generator-return-node/test.js
+++ b/test/render/fixtures/tag-code-generator-return-node/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'John'
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/tag-code-generator-return-self/marko.json b/test/render/fixtures/tag-code-generator-return-self/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/tag-code-generator-return-self/marko.json
+++ b/test/render/fixtures/tag-code-generator-return-self/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/code-generator.js b/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/code-generator.js
index f57aaa8c4..ec21841c9 100644
--- a/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/code-generator.js
+++ b/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/code-generator.js
@@ -1,5 +1,5 @@
module.exports = function generateCode(elNode, codegen) {
var builder = codegen.builder;
- elNode.setAttributeValue('foo', builder.literal('bar'));
+ elNode.setAttributeValue("foo", builder.literal("bar"));
return elNode;
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/marko-tag.json b/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/marko-tag.json
index 0ec7547f9..b9633ce37 100644
--- a/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/marko-tag.json
+++ b/test/render/fixtures/tag-code-generator-return-self/tags/test-tag-code-generator-return-self/marko-tag.json
@@ -1,3 +1,3 @@
{
"@name": "string"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-self/test.js b/test/render/fixtures/tag-code-generator-return-self/test.js
index 010a2ae52..761736115 100644
--- a/test/render/fixtures/tag-code-generator-return-self/test.js
+++ b/test/render/fixtures/tag-code-generator-return-self/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'John'
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/tag-code-generator-return-tree/marko.json b/test/render/fixtures/tag-code-generator-return-tree/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/tag-code-generator-return-tree/marko.json
+++ b/test/render/fixtures/tag-code-generator-return-tree/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/code-generator.js b/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/code-generator.js
index 8e6398242..c04cfa3be 100644
--- a/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/code-generator.js
+++ b/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/code-generator.js
@@ -1,7 +1,14 @@
module.exports = function generateCode(elNode, codegen) {
var builder = codegen.builder;
- return builder.htmlElement('div', {
- 'class': builder.literal('greeting')
- }, [builder.text(builder.literal('Hello ')), builder.text(elNode.getAttributeValue('name'))]);
-};
\ No newline at end of file
+ return builder.htmlElement(
+ "div",
+ {
+ class: builder.literal("greeting")
+ },
+ [
+ builder.text(builder.literal("Hello ")),
+ builder.text(elNode.getAttributeValue("name"))
+ ]
+ );
+};
diff --git a/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/marko-tag.json b/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/marko-tag.json
index 0ec7547f9..b9633ce37 100644
--- a/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/marko-tag.json
+++ b/test/render/fixtures/tag-code-generator-return-tree/tags/test-tag-code-generator-return-tree/marko-tag.json
@@ -1,3 +1,3 @@
{
"@name": "string"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tag-code-generator-return-tree/test.js b/test/render/fixtures/tag-code-generator-return-tree/test.js
index 010a2ae52..761736115 100644
--- a/test/render/fixtures/tag-code-generator-return-tree/test.js
+++ b/test/render/fixtures/tag-code-generator-return-tree/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- name: 'John'
-};
\ No newline at end of file
+ name: "John"
+};
diff --git a/test/render/fixtures/taglib-imports-nested/marko.json b/test/render/fixtures/taglib-imports-nested/marko.json
index 0879e323a..717c0738c 100644
--- a/test/render/fixtures/taglib-imports-nested/marko.json
+++ b/test/render/fixtures/taglib-imports-nested/marko.json
@@ -1,3 +1,3 @@
{
"taglib-imports": ["./nested-import/marko.json"]
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/taglib-imports-nested/nested-import/components/list/icon-list/renderer.js b/test/render/fixtures/taglib-imports-nested/nested-import/components/list/icon-list/renderer.js
index 61d97f1f9..adca2ea94 100644
--- a/test/render/fixtures/taglib-imports-nested/nested-import/components/list/icon-list/renderer.js
+++ b/test/render/fixtures/taglib-imports-nested/nested-import/components/list/icon-list/renderer.js
@@ -1,5 +1,5 @@
-var template = require('./template.marko');
+var template = require("./template.marko");
-exports.renderer = function (input, out) {
+exports.renderer = function(input, out) {
template.render(input, out);
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/taglib-imports-nested/nested-import/components/list/marko.json b/test/render/fixtures/taglib-imports-nested/nested-import/components/list/marko.json
index 22f864b56..0004e405b 100644
--- a/test/render/fixtures/taglib-imports-nested/nested-import/components/list/marko.json
+++ b/test/render/fixtures/taglib-imports-nested/nested-import/components/list/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "."
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/taglib-imports-nested/nested-import/components/marko.json b/test/render/fixtures/taglib-imports-nested/nested-import/components/marko.json
index 46ac26c7d..5363c7daa 100644
--- a/test/render/fixtures/taglib-imports-nested/nested-import/components/marko.json
+++ b/test/render/fixtures/taglib-imports-nested/nested-import/components/marko.json
@@ -1,6 +1,3 @@
{
- "taglib-imports": [
- "./list/marko.json",
- "../marko.json"
- ]
+ "taglib-imports": ["./list/marko.json", "../marko.json"]
}
diff --git a/test/render/fixtures/taglib-imports-nested/nested-import/marko.json b/test/render/fixtures/taglib-imports-nested/nested-import/marko.json
index 271c44fce..004ca7b65 100644
--- a/test/render/fixtures/taglib-imports-nested/nested-import/marko.json
+++ b/test/render/fixtures/taglib-imports-nested/nested-import/marko.json
@@ -1,5 +1,3 @@
{
- "taglib-imports": [
- "./components/marko.json"
- ]
+ "taglib-imports": ["./components/marko.json"]
}
diff --git a/test/render/fixtures/taglib-imports-nested/test.js b/test/render/fixtures/taglib-imports-nested/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/taglib-imports-nested/test.js
+++ b/test/render/fixtures/taglib-imports-nested/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/taglib-imports-package-json/marko.json b/test/render/fixtures/taglib-imports-package-json/marko.json
index d2c629afd..0085a96fa 100644
--- a/test/render/fixtures/taglib-imports-package-json/marko.json
+++ b/test/render/fixtures/taglib-imports-package-json/marko.json
@@ -1,3 +1,3 @@
{
"taglib-imports": ["./package.json"]
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/taglib-imports-package-json/package.json b/test/render/fixtures/taglib-imports-package-json/package.json
index 5742f6160..2c2338538 100644
--- a/test/render/fixtures/taglib-imports-package-json/package.json
+++ b/test/render/fixtures/taglib-imports-package-json/package.json
@@ -3,4 +3,4 @@
"imported-foo": "^1.0.0",
"imported-bar": "^1.0.0"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/taglib-imports-package-json/test.js b/test/render/fixtures/taglib-imports-package-json/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/taglib-imports-package-json/test.js
+++ b/test/render/fixtures/taglib-imports-package-json/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/tags-dir-null/marko.json b/test/render/fixtures/tags-dir-null/marko.json
index a0b2f0553..23a5fa196 100644
--- a/test/render/fixtures/tags-dir-null/marko.json
+++ b/test/render/fixtures/tags-dir-null/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": null
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/tags-dir-null/test.js b/test/render/fixtures/tags-dir-null/test.js
index 0330eb11b..eb9c3ed5b 100644
--- a/test/render/fixtures/tags-dir-null/test.js
+++ b/test/render/fixtures/tags-dir-null/test.js
@@ -1,11 +1,11 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (e) {
+exports.checkError = function(e) {
//includes the tag it broke on
- expect(e.message).to.contain('Unrecognized tag: test-hello');
+ expect(e.message).to.contain("Unrecognized tag: test-hello");
//includes the line number of the template
- expect(e.message).to.contain('template.marko:1:0');
-};
\ No newline at end of file
+ expect(e.message).to.contain("template.marko:1:0");
+};
diff --git a/test/render/fixtures/template-tag-dynamic-attributes/marko.json b/test/render/fixtures/template-tag-dynamic-attributes/marko.json
index e85a78200..7720f87ea 100644
--- a/test/render/fixtures/template-tag-dynamic-attributes/marko.json
+++ b/test/render/fixtures/template-tag-dynamic-attributes/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/template-tag-dynamic-attributes/test.js b/test/render/fixtures/template-tag-dynamic-attributes/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/template-tag-dynamic-attributes/test.js
+++ b/test/render/fixtures/template-tag-dynamic-attributes/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/template-transformer/marko.json b/test/render/fixtures/template-transformer/marko.json
index 31935b486..4a3e32f05 100644
--- a/test/render/fixtures/template-transformer/marko.json
+++ b/test/render/fixtures/template-transformer/marko.json
@@ -1,3 +1,3 @@
{
"transformer": "./transformer"
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/template-transformer/transformer.js b/test/render/fixtures/template-transformer/transformer.js
index 935b1cbed..6c3103d44 100644
--- a/test/render/fixtures/template-transformer/transformer.js
+++ b/test/render/fixtures/template-transformer/transformer.js
@@ -1,10 +1,14 @@
-var path = require('path');
+var path = require("path");
-module.exports = function (rootNode, context) {
+module.exports = function(rootNode, context) {
var builder = context.builder;
var templateName = path.basename(context.filename);
- rootNode.prependChild(builder.htmlComment(builder.literal('BEGIN: ' + templateName)));
- rootNode.appendChild(builder.htmlComment(builder.literal('END: ' + templateName)));
-};
\ No newline at end of file
+ rootNode.prependChild(
+ builder.htmlComment(builder.literal("BEGIN: " + templateName))
+ );
+ rootNode.appendChild(
+ builder.htmlComment(builder.literal("END: " + templateName))
+ );
+};
diff --git a/test/render/fixtures/text-replacement/test.js b/test/render/fixtures/text-replacement/test.js
index c9e089d50..64fe138be 100644
--- a/test/render/fixtures/text-replacement/test.js
+++ b/test/render/fixtures/text-replacement/test.js
@@ -1,12 +1,12 @@
exports.templateData = {
- "zero": 0,
- "person": {
- "name": "John",
- "address": {
- "city": "San Jose",
- "state": "CA",
- "line1": "2065 E. Hamilton Ave.",
- "zip": "95125"
+ zero: 0,
+ person: {
+ name: "John",
+ address: {
+ city: "San Jose",
+ state: "CA",
+ line1: "2065 E. Hamilton Ave.",
+ zip: "95125"
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/toHTML/test.js b/test/render/fixtures/toHTML/test.js
index 37962e7e7..d18ffc997 100644
--- a/test/render/fixtures/toHTML/test.js
+++ b/test/render/fixtures/toHTML/test.js
@@ -1,7 +1,7 @@
exports.templateData = {
message: {
- toHTML: function () {
- return 'Hello World ';
+ toHTML: function() {
+ return "Hello World ";
}
}
-};
\ No newline at end of file
+};
diff --git a/test/render/fixtures/toString-object/test.js b/test/render/fixtures/toString-object/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/toString-object/test.js
+++ b/test/render/fixtures/toString-object/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/transformer-dynamic-tag-name/marko.json b/test/render/fixtures/transformer-dynamic-tag-name/marko.json
index b05e3ca0a..ee9def4c4 100644
--- a/test/render/fixtures/transformer-dynamic-tag-name/marko.json
+++ b/test/render/fixtures/transformer-dynamic-tag-name/marko.json
@@ -3,4 +3,4 @@
"@foo": "string",
"transformer": "./transformer.js"
}
-}
\ No newline at end of file
+}
diff --git a/test/render/fixtures/transformer-dynamic-tag-name/test.js b/test/render/fixtures/transformer-dynamic-tag-name/test.js
index ee622f902..5e8f873fe 100644
--- a/test/render/fixtures/transformer-dynamic-tag-name/test.js
+++ b/test/render/fixtures/transformer-dynamic-tag-name/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- tagName: 'p'
-};
\ No newline at end of file
+ tagName: "p"
+};
diff --git a/test/render/fixtures/transformer-dynamic-tag-name/transformer.js b/test/render/fixtures/transformer-dynamic-tag-name/transformer.js
index 52ea163d7..234163d32 100644
--- a/test/render/fixtures/transformer-dynamic-tag-name/transformer.js
+++ b/test/render/fixtures/transformer-dynamic-tag-name/transformer.js
@@ -1,4 +1,4 @@
module.exports = function transform(el, context) {
- el.removeAttribute('foo');
- el.setAttributeValue('bar', context.builder.literal('hello'));
-};
\ No newline at end of file
+ el.removeAttribute("foo");
+ el.setAttributeValue("bar", context.builder.literal("hello"));
+};
diff --git a/test/render/fixtures/unless-else/test.js b/test/render/fixtures/unless-else/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/unless-else/test.js
+++ b/test/render/fixtures/unless-else/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/unless-no-arg/test.js b/test/render/fixtures/unless-no-arg/test.js
index 250e8bcd6..a476115f9 100644
--- a/test/render/fixtures/unless-no-arg/test.js
+++ b/test/render/fixtures/unless-no-arg/test.js
@@ -1,7 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (err) {
- expect(err.toString()).to.contain('Invalid tag. Argument is missing.');
-};
\ No newline at end of file
+exports.checkError = function(err) {
+ expect(err.toString()).to.contain(
+ "Invalid tag. Argument is missing."
+ );
+};
diff --git a/test/render/fixtures/var-assign/test.js b/test/render/fixtures/var-assign/test.js
index 35f9fefee..9c854c695 100644
--- a/test/render/fixtures/var-assign/test.js
+++ b/test/render/fixtures/var-assign/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "active": true
-};
\ No newline at end of file
+ active: true
+};
diff --git a/test/render/fixtures/var-new-Date/test.js b/test/render/fixtures/var-new-Date/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/var-new-Date/test.js
+++ b/test/render/fixtures/var-new-Date/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/var-tag-commas/test.js b/test/render/fixtures/var-tag-commas/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/var-tag-commas/test.js
+++ b/test/render/fixtures/var-tag-commas/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/var/test.js b/test/render/fixtures/var/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/var/test.js
+++ b/test/render/fixtures/var/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/variable-id-root-node/test.js b/test/render/fixtures/variable-id-root-node/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/variable-id-root-node/test.js
+++ b/test/render/fixtures/variable-id-root-node/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/while-attr/test.js b/test/render/fixtures/while-attr/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/while-attr/test.js
+++ b/test/render/fixtures/while-attr/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/while-tag-no-arg/test.js b/test/render/fixtures/while-tag-no-arg/test.js
index 55c5602a2..b90a38dc2 100644
--- a/test/render/fixtures/while-tag-no-arg/test.js
+++ b/test/render/fixtures/while-tag-no-arg/test.js
@@ -1,7 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
exports.templateData = {};
-exports.checkError = function (err) {
- expect(err.toString()).to.contain('Invalid tag. Argument is missing.');
-};
\ No newline at end of file
+exports.checkError = function(err) {
+ expect(err.toString()).to.contain(
+ "Invalid tag. Argument is missing."
+ );
+};
diff --git a/test/render/fixtures/while-tag/test.js b/test/render/fixtures/while-tag/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/while-tag/test.js
+++ b/test/render/fixtures/while-tag/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-contentplaceholder-literal-string/test.js b/test/render/fixtures/whitespace-contentplaceholder-literal-string/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace-contentplaceholder-literal-string/test.js
+++ b/test/render/fixtures/whitespace-contentplaceholder-literal-string/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-div/test.js b/test/render/fixtures/whitespace-div/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace-div/test.js
+++ b/test/render/fixtures/whitespace-div/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-inline-elements/test.js b/test/render/fixtures/whitespace-inline-elements/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace-inline-elements/test.js
+++ b/test/render/fixtures/whitespace-inline-elements/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-marko-preserve-whitespace-attr/test.js b/test/render/fixtures/whitespace-marko-preserve-whitespace-attr/test.js
index 6eabbc215..522c6101c 100644
--- a/test/render/fixtures/whitespace-marko-preserve-whitespace-attr/test.js
+++ b/test/render/fixtures/whitespace-marko-preserve-whitespace-attr/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "World"
-};
\ No newline at end of file
+ name: "World"
+};
diff --git a/test/render/fixtures/whitespace-normalize-inner-whitespace-concise/test.js b/test/render/fixtures/whitespace-normalize-inner-whitespace-concise/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace-normalize-inner-whitespace-concise/test.js
+++ b/test/render/fixtures/whitespace-normalize-inner-whitespace-concise/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-normalize-inner-whitespace/test.js b/test/render/fixtures/whitespace-normalize-inner-whitespace/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace-normalize-inner-whitespace/test.js
+++ b/test/render/fixtures/whitespace-normalize-inner-whitespace/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-normalize-inner-whitespace2/test.js b/test/render/fixtures/whitespace-normalize-inner-whitespace2/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace-normalize-inner-whitespace2/test.js
+++ b/test/render/fixtures/whitespace-normalize-inner-whitespace2/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/whitespace-pre-code/test.js b/test/render/fixtures/whitespace-pre-code/test.js
index 6eabbc215..522c6101c 100644
--- a/test/render/fixtures/whitespace-pre-code/test.js
+++ b/test/render/fixtures/whitespace-pre-code/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "World"
-};
\ No newline at end of file
+ name: "World"
+};
diff --git a/test/render/fixtures/whitespace-pre/test.js b/test/render/fixtures/whitespace-pre/test.js
index 6eabbc215..522c6101c 100644
--- a/test/render/fixtures/whitespace-pre/test.js
+++ b/test/render/fixtures/whitespace-pre/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "World"
-};
\ No newline at end of file
+ name: "World"
+};
diff --git a/test/render/fixtures/whitespace-script/test.js b/test/render/fixtures/whitespace-script/test.js
index 6eabbc215..522c6101c 100644
--- a/test/render/fixtures/whitespace-script/test.js
+++ b/test/render/fixtures/whitespace-script/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "World"
-};
\ No newline at end of file
+ name: "World"
+};
diff --git a/test/render/fixtures/whitespace-textarea/test.js b/test/render/fixtures/whitespace-textarea/test.js
index 6eabbc215..522c6101c 100644
--- a/test/render/fixtures/whitespace-textarea/test.js
+++ b/test/render/fixtures/whitespace-textarea/test.js
@@ -1,3 +1,3 @@
exports.templateData = {
- "name": "World"
-};
\ No newline at end of file
+ name: "World"
+};
diff --git a/test/render/fixtures/whitespace/test.js b/test/render/fixtures/whitespace/test.js
index 5ca2ed02c..c4013b344 100644
--- a/test/render/fixtures/whitespace/test.js
+++ b/test/render/fixtures/whitespace/test.js
@@ -1 +1 @@
-exports.templateData = {};
\ No newline at end of file
+exports.templateData = {};
diff --git a/test/render/fixtures/xml-escaping/test.js b/test/render/fixtures/xml-escaping/test.js
index a6bb4cb51..4b819cd62 100644
--- a/test/render/fixtures/xml-escaping/test.js
+++ b/test/render/fixtures/xml-escaping/test.js
@@ -1,4 +1,4 @@
exports.templateData = {
- "name": "",
- "welcome": "Welcome "
-};
\ No newline at end of file
+ name: "",
+ welcome: "Welcome "
+};
diff --git a/test/render/html.test.js b/test/render/html.test.js
index 62ba3af50..5c9637f04 100644
--- a/test/render/html.test.js
+++ b/test/render/html.test.js
@@ -1,24 +1,23 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-var path = require('path');
-var autotest = require('../autotest');
-var runRenderTest = require('../__util__/runRenderTest');
-
-describe('render-html', function () {
- autotest.scanDir(path.join(__dirname, './fixtures'), run);
+var path = require("path");
+var autotest = require("../autotest");
+var runRenderTest = require("../__util__/runRenderTest");
+describe("render-html", function() {
+ autotest.scanDir(path.join(__dirname, "./fixtures"), run);
});
-describe('render-html (deprecated)', function () {
- autotest.scanDir(path.join(__dirname, './fixtures-deprecated'), run);
-})
+describe("render-html (deprecated)", function() {
+ autotest.scanDir(path.join(__dirname, "./fixtures-deprecated"), run);
+});
function run(dir, helpers, done) {
runRenderTest(dir, helpers, done, {
- output: 'html'
+ output: "html"
});
}
diff --git a/test/render/vdom.test.js b/test/render/vdom.test.js
index 62ba4d174..ef019bbf7 100644
--- a/test/render/vdom.test.js
+++ b/test/render/vdom.test.js
@@ -1,24 +1,23 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-var path = require('path');
-var autotest = require('../autotest');
-var runRenderTest = require('../__util__/runRenderTest');
-
-describe('render-vdom', function () {
- autotest.scanDir(path.join(__dirname, './fixtures'), run);
+var path = require("path");
+var autotest = require("../autotest");
+var runRenderTest = require("../__util__/runRenderTest");
+describe("render-vdom", function() {
+ autotest.scanDir(path.join(__dirname, "./fixtures"), run);
});
-describe('render-vdom (deprecated)', function () {
- autotest.scanDir(path.join(__dirname, './fixtures-deprecated'), run);
+describe("render-vdom (deprecated)", function() {
+ autotest.scanDir(path.join(__dirname, "./fixtures-deprecated"), run);
});
function run(dir, helpers, done) {
runRenderTest(dir, helpers, done, {
- output: 'vdom'
+ output: "vdom"
});
}
diff --git a/test/taglib-finder/fixtures/deeply-nested-gaps/a/b/c/marko.json b/test/taglib-finder/fixtures/deeply-nested-gaps/a/b/c/marko.json
index 544b7b4dd..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested-gaps/a/b/c/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested-gaps/a/b/c/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested-gaps/a/marko.json b/test/taglib-finder/fixtures/deeply-nested-gaps/a/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested-gaps/a/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested-gaps/a/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested-gaps/package.json b/test/taglib-finder/fixtures/deeply-nested-gaps/package.json
index 78708c533..6a1e6b11c 100644
--- a/test/taglib-finder/fixtures/deeply-nested-gaps/package.json
+++ b/test/taglib-finder/fixtures/deeply-nested-gaps/package.json
@@ -1,4 +1,4 @@
{
"name": "taglib-finder-test",
"version": "0.0.0"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-finder/fixtures/deeply-nested-gaps/test.js b/test/taglib-finder/fixtures/deeply-nested-gaps/test.js
index 5f8b06142..a73da99ab 100644
--- a/test/taglib-finder/fixtures/deeply-nested-gaps/test.js
+++ b/test/taglib-finder/fixtures/deeply-nested-gaps/test.js
@@ -1 +1 @@
-exports.dir = 'a/b/c';
\ No newline at end of file
+exports.dir = "a/b/c";
diff --git a/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/c/marko.json b/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/c/marko.json
index 544b7b4dd..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/c/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/c/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/marko.json b/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/b/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/marko.json b/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested-plus-installed/a/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested-plus-installed/package.json b/test/taglib-finder/fixtures/deeply-nested-plus-installed/package.json
index 91d554dbe..89464154c 100644
--- a/test/taglib-finder/fixtures/deeply-nested-plus-installed/package.json
+++ b/test/taglib-finder/fixtures/deeply-nested-plus-installed/package.json
@@ -13,5 +13,4 @@
"peer-dependency-with-taglib": "0.0.1",
"peer-dependency-without-taglib": "0.0.1"
}
-
-}
\ No newline at end of file
+}
diff --git a/test/taglib-finder/fixtures/deeply-nested-plus-installed/test.js b/test/taglib-finder/fixtures/deeply-nested-plus-installed/test.js
index 5f8b06142..a73da99ab 100644
--- a/test/taglib-finder/fixtures/deeply-nested-plus-installed/test.js
+++ b/test/taglib-finder/fixtures/deeply-nested-plus-installed/test.js
@@ -1 +1 @@
-exports.dir = 'a/b/c';
\ No newline at end of file
+exports.dir = "a/b/c";
diff --git a/test/taglib-finder/fixtures/deeply-nested/a/b/c/marko.json b/test/taglib-finder/fixtures/deeply-nested/a/b/c/marko.json
index 544b7b4dd..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested/a/b/c/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested/a/b/c/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested/a/b/marko.json b/test/taglib-finder/fixtures/deeply-nested/a/b/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested/a/b/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested/a/b/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested/a/marko.json b/test/taglib-finder/fixtures/deeply-nested/a/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/deeply-nested/a/marko.json
+++ b/test/taglib-finder/fixtures/deeply-nested/a/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/deeply-nested/package.json b/test/taglib-finder/fixtures/deeply-nested/package.json
index 78708c533..6a1e6b11c 100644
--- a/test/taglib-finder/fixtures/deeply-nested/package.json
+++ b/test/taglib-finder/fixtures/deeply-nested/package.json
@@ -1,4 +1,4 @@
{
"name": "taglib-finder-test",
"version": "0.0.0"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-finder/fixtures/deeply-nested/test.js b/test/taglib-finder/fixtures/deeply-nested/test.js
index 5f8b06142..a73da99ab 100644
--- a/test/taglib-finder/fixtures/deeply-nested/test.js
+++ b/test/taglib-finder/fixtures/deeply-nested/test.js
@@ -1 +1 @@
-exports.dir = 'a/b/c';
\ No newline at end of file
+exports.dir = "a/b/c";
diff --git a/test/taglib-finder/fixtures/excluded-dir-autodiscover/a/b/marko.json b/test/taglib-finder/fixtures/excluded-dir-autodiscover/a/b/marko.json
index 2e70b49ed..60fd6ab09 100644
--- a/test/taglib-finder/fixtures/excluded-dir-autodiscover/a/b/marko.json
+++ b/test/taglib-finder/fixtures/excluded-dir-autodiscover/a/b/marko.json
@@ -1,3 +1,3 @@
{
- "tags-dir":"./components"
-}
\ No newline at end of file
+ "tags-dir": "./components"
+}
diff --git a/test/taglib-finder/fixtures/excluded-dir-autodiscover/package.json b/test/taglib-finder/fixtures/excluded-dir-autodiscover/package.json
index 78708c533..6a1e6b11c 100644
--- a/test/taglib-finder/fixtures/excluded-dir-autodiscover/package.json
+++ b/test/taglib-finder/fixtures/excluded-dir-autodiscover/package.json
@@ -1,4 +1,4 @@
{
"name": "taglib-finder-test",
"version": "0.0.0"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-finder/fixtures/excluded-dir-autodiscover/test.js b/test/taglib-finder/fixtures/excluded-dir-autodiscover/test.js
index 4edf86df1..0cddf13bd 100644
--- a/test/taglib-finder/fixtures/excluded-dir-autodiscover/test.js
+++ b/test/taglib-finder/fixtures/excluded-dir-autodiscover/test.js
@@ -1,12 +1,12 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.dir = 'a/b';
+exports.dir = "a/b";
-exports.before = function (taglibFinder) {
- taglibFinder.excludeDir(nodePath.join(__dirname, 'a/b'));
- taglibFinder.excludeDir(nodePath.join(__dirname, 'a/components'));
+exports.before = function(taglibFinder) {
+ taglibFinder.excludeDir(nodePath.join(__dirname, "a/b"));
+ taglibFinder.excludeDir(nodePath.join(__dirname, "a/components"));
};
-exports.after = function (taglibFinder) {
+exports.after = function(taglibFinder) {
taglibFinder.reset();
-};
\ No newline at end of file
+};
diff --git a/test/taglib-finder/fixtures/excluded-dir/a/b-excluded/marko.json b/test/taglib-finder/fixtures/excluded-dir/a/b-excluded/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/excluded-dir/a/b-excluded/marko.json
+++ b/test/taglib-finder/fixtures/excluded-dir/a/b-excluded/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/excluded-dir/a/marko.json b/test/taglib-finder/fixtures/excluded-dir/a/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/excluded-dir/a/marko.json
+++ b/test/taglib-finder/fixtures/excluded-dir/a/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/excluded-dir/package.json b/test/taglib-finder/fixtures/excluded-dir/package.json
index 78708c533..6a1e6b11c 100644
--- a/test/taglib-finder/fixtures/excluded-dir/package.json
+++ b/test/taglib-finder/fixtures/excluded-dir/package.json
@@ -1,4 +1,4 @@
{
"name": "taglib-finder-test",
"version": "0.0.0"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-finder/fixtures/excluded-dir/test.js b/test/taglib-finder/fixtures/excluded-dir/test.js
index 5cbebdfd3..26689608b 100644
--- a/test/taglib-finder/fixtures/excluded-dir/test.js
+++ b/test/taglib-finder/fixtures/excluded-dir/test.js
@@ -1,11 +1,11 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.dir = 'a/b-excluded';
+exports.dir = "a/b-excluded";
-exports.before = function (taglibFinder) {
- taglibFinder.excludeDir(nodePath.join(__dirname, 'a/b-excluded'));
+exports.before = function(taglibFinder) {
+ taglibFinder.excludeDir(nodePath.join(__dirname, "a/b-excluded"));
};
-exports.after = function (taglibFinder) {
+exports.after = function(taglibFinder) {
taglibFinder.reset();
-};
\ No newline at end of file
+};
diff --git a/test/taglib-finder/fixtures/excluded-package/a/b/c/marko.json b/test/taglib-finder/fixtures/excluded-package/a/b/c/marko.json
index 544b7b4dd..0967ef424 100644
--- a/test/taglib-finder/fixtures/excluded-package/a/b/c/marko.json
+++ b/test/taglib-finder/fixtures/excluded-package/a/b/c/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/excluded-package/a/b/marko.json b/test/taglib-finder/fixtures/excluded-package/a/b/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/excluded-package/a/b/marko.json
+++ b/test/taglib-finder/fixtures/excluded-package/a/b/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/excluded-package/a/marko.json b/test/taglib-finder/fixtures/excluded-package/a/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/excluded-package/a/marko.json
+++ b/test/taglib-finder/fixtures/excluded-package/a/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/excluded-package/test.js b/test/taglib-finder/fixtures/excluded-package/test.js
index eeac589f0..ca8847d72 100644
--- a/test/taglib-finder/fixtures/excluded-package/test.js
+++ b/test/taglib-finder/fixtures/excluded-package/test.js
@@ -1,9 +1,9 @@
-exports.dir = 'a/b/c';
+exports.dir = "a/b/c";
-exports.before = function (taglibFinder) {
- taglibFinder.excludePackage('excluded-dependency');
+exports.before = function(taglibFinder) {
+ taglibFinder.excludePackage("excluded-dependency");
};
-exports.after = function (taglibFinder) {
+exports.after = function(taglibFinder) {
taglibFinder.reset();
-};
\ No newline at end of file
+};
diff --git a/test/taglib-finder/fixtures/reset/a/b/c/marko.json b/test/taglib-finder/fixtures/reset/a/b/c/marko.json
index 544b7b4dd..0967ef424 100644
--- a/test/taglib-finder/fixtures/reset/a/b/c/marko.json
+++ b/test/taglib-finder/fixtures/reset/a/b/c/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/reset/a/b/marko.json b/test/taglib-finder/fixtures/reset/a/b/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/reset/a/b/marko.json
+++ b/test/taglib-finder/fixtures/reset/a/b/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/reset/a/marko.json b/test/taglib-finder/fixtures/reset/a/marko.json
index 0e0dcd235..0967ef424 100644
--- a/test/taglib-finder/fixtures/reset/a/marko.json
+++ b/test/taglib-finder/fixtures/reset/a/marko.json
@@ -1,3 +1 @@
-{
-
-}
\ No newline at end of file
+{}
diff --git a/test/taglib-finder/fixtures/reset/test.js b/test/taglib-finder/fixtures/reset/test.js
index c4df85cd2..5b39de1c9 100644
--- a/test/taglib-finder/fixtures/reset/test.js
+++ b/test/taglib-finder/fixtures/reset/test.js
@@ -1,8 +1,8 @@
-var nodePath = require('path');
-var expect = require('chai').expect;
+var nodePath = require("path");
+var expect = require("chai").expect;
-exports.check = function (taglibFinder) {
- var finderDir = nodePath.join(__dirname, 'a/b/c');
+exports.check = function(taglibFinder) {
+ var finderDir = nodePath.join(__dirname, "a/b/c");
function getPaths() {
return taglibFinder.find(finderDir, []).map(taglib => {
@@ -12,7 +12,7 @@ exports.check = function (taglibFinder) {
var pathsBeforeExclude = getPaths();
- taglibFinder.excludePackage('excluded-dependency');
+ taglibFinder.excludePackage("excluded-dependency");
taglibFinder.clearCache();
@@ -24,4 +24,4 @@ exports.check = function (taglibFinder) {
expect(pathsBeforeExclude).to.not.deep.equal(pathsAfterExclude);
expect(pathsBeforeExclude).to.deep.equal(pathsAfterReset);
-};
\ No newline at end of file
+};
diff --git a/test/taglib-finder/index.test.js b/test/taglib-finder/index.test.js
index a77777b89..18e51b467 100644
--- a/test/taglib-finder/index.test.js
+++ b/test/taglib-finder/index.test.js
@@ -1,22 +1,22 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-require('chai').should();
+require("chai").should();
-var nodePath = require('path');
-require('marko/compiler');
-var autotest = require('../autotest');
+var nodePath = require("path");
+require("marko/compiler");
+var autotest = require("../autotest");
-var taglibFinder = require('marko/compiler/taglib-finder');
+var taglibFinder = require("marko/compiler/taglib-finder");
-describe('taglib-finder', function () {
- var autoTestDir = nodePath.join(__dirname, './fixtures');
+describe("taglib-finder", function() {
+ var autoTestDir = nodePath.join(__dirname, "./fixtures");
autotest.scanDir(autoTestDir, function run(dir, helpers, done) {
- var test = require(nodePath.join(dir, 'test.js'));
+ var test = require(nodePath.join(dir, "test.js"));
if (test.check) {
test.check(taglibFinder, helpers);
@@ -28,13 +28,15 @@ describe('taglib-finder', function () {
var finderDir = nodePath.join(dir, test.dir);
var found = taglibFinder.find(finderDir, []).map(taglib => {
if (taglib.path.startsWith(dir)) {
- return taglib.path.substring(dir.length).replace(/[\\]/g, '/');
+ return taglib.path
+ .substring(dir.length)
+ .replace(/[\\]/g, "/");
} else {
- return 'BAD:' + taglib.path;
+ return "BAD:" + taglib.path;
}
});
- helpers.compare(found, '.json');
+ helpers.compare(found, ".json");
if (test.after) {
test.after(taglibFinder);
@@ -43,4 +45,4 @@ describe('taglib-finder', function () {
return done();
});
-});
\ No newline at end of file
+});
diff --git a/test/taglib-loader/fixtures/custom-extensions/marko.json b/test/taglib-loader/fixtures/custom-extensions/marko.json
index e85a78200..7720f87ea 100644
--- a/test/taglib-loader/fixtures/custom-extensions/marko.json
+++ b/test/taglib-loader/fixtures/custom-extensions/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/custom-extensions/tags/test-declared-attributes/renderer.js b/test/taglib-loader/fixtures/custom-extensions/tags/test-declared-attributes/renderer.js
index fb402864c..e78fe8540 100644
--- a/test/taglib-loader/fixtures/custom-extensions/tags/test-declared-attributes/renderer.js
+++ b/test/taglib-loader/fixtures/custom-extensions/tags/test-declared-attributes/renderer.js
@@ -1,4 +1,4 @@
module.exports = function simple(input, out) {
var daysOld = input.age * 365;
- out.write('Hello ' + input.name + '! You are ' + daysOld + ' days old.');
-};
\ No newline at end of file
+ out.write("Hello " + input.name + "! You are " + daysOld + " days old.");
+};
diff --git a/test/taglib-loader/fixtures/custom-extensions/test.js b/test/taglib-loader/fixtures/custom-extensions/test.js
index a7a248efb..97f0c9f53 100644
--- a/test/taglib-loader/fixtures/custom-extensions/test.js
+++ b/test/taglib-loader/fixtures/custom-extensions/test.js
@@ -1,8 +1,12 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (taglibLoader, expect) {
- var taglib = taglibLoader.loadTaglibFromFile(nodePath.join(__dirname, 'marko.json'));
+exports.check = function(taglibLoader, expect) {
+ var taglib = taglibLoader.loadTaglibFromFile(
+ nodePath.join(__dirname, "marko.json")
+ );
expect(taglib != null).to.equal(true);
- expect(taglib).to.have.deep.property("tags.test-declared-attributes.renderer").to.have.string('renderer.js');
-};
\ No newline at end of file
+ expect(taglib)
+ .to.have.deep.property("tags.test-declared-attributes.renderer")
+ .to.have.string("renderer.js");
+};
diff --git a/test/taglib-loader/fixtures/invalid-marko-tag-file/marko.json b/test/taglib-loader/fixtures/invalid-marko-tag-file/marko.json
index 78dfe1821..5e5174b31 100644
--- a/test/taglib-loader/fixtures/invalid-marko-tag-file/marko.json
+++ b/test/taglib-loader/fixtures/invalid-marko-tag-file/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./missing"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/invalid-marko-tag-file/test.js b/test/taglib-loader/fixtures/invalid-marko-tag-file/test.js
index a399270e6..a8ba4ffd2 100644
--- a/test/taglib-loader/fixtures/invalid-marko-tag-file/test.js
+++ b/test/taglib-loader/fixtures/invalid-marko-tag-file/test.js
@@ -1,7 +1,7 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (taglibLoader, expect) {
- expect(function () {
- taglibLoader.loadTaglibFromFile(nodePath.join(__dirname, 'marko.json'));
+exports.check = function(taglibLoader, expect) {
+ expect(function() {
+ taglibLoader.loadTaglibFromFile(nodePath.join(__dirname, "marko.json"));
}).to.throw('Error while applying option of "tags-dir"');
-};
\ No newline at end of file
+};
diff --git a/test/taglib-loader/fixtures/invalid-taglib-tag/marko.json b/test/taglib-loader/fixtures/invalid-taglib-tag/marko.json
index 11a76c5e2..3024e8a6b 100644
--- a/test/taglib-loader/fixtures/invalid-taglib-tag/marko.json
+++ b/test/taglib-loader/fixtures/invalid-taglib-tag/marko.json
@@ -2,4 +2,4 @@
"": {
"INVALID": "PROPERTY"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/invalid-taglib-tag/test.js b/test/taglib-loader/fixtures/invalid-taglib-tag/test.js
index 403504a61..4e82448ab 100644
--- a/test/taglib-loader/fixtures/invalid-taglib-tag/test.js
+++ b/test/taglib-loader/fixtures/invalid-taglib-tag/test.js
@@ -1,9 +1,9 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (taglibLoader, expect) {
- var taglibPath = nodePath.join(__dirname, 'marko.json');
+exports.check = function(taglibLoader, expect) {
+ var taglibPath = nodePath.join(__dirname, "marko.json");
- expect(function () {
+ expect(function() {
taglibLoader.loadTaglibFromFile(taglibPath);
}).to.throw(`Invalid option: INVALID ([${taglibPath} → ])`);
-};
\ No newline at end of file
+};
diff --git a/test/taglib-loader/fixtures/invalid-tags-dir/marko.json b/test/taglib-loader/fixtures/invalid-tags-dir/marko.json
index 80988a1b9..d0a47a334 100644
--- a/test/taglib-loader/fixtures/invalid-tags-dir/marko.json
+++ b/test/taglib-loader/fixtures/invalid-tags-dir/marko.json
@@ -1,3 +1,3 @@
{
"": "./tags/foo/marko-tag.json"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/invalid-tags-dir/tags/foo/marko-tag.json b/test/taglib-loader/fixtures/invalid-tags-dir/tags/foo/marko-tag.json
index 04554cf88..f81115c5a 100644
--- a/test/taglib-loader/fixtures/invalid-tags-dir/tags/foo/marko-tag.json
+++ b/test/taglib-loader/fixtures/invalid-tags-dir/tags/foo/marko-tag.json
@@ -1,3 +1,3 @@
{
"INVALID": "BAD"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/invalid-tags-dir/test.js b/test/taglib-loader/fixtures/invalid-tags-dir/test.js
index 7f0261d11..b8f4dee13 100644
--- a/test/taglib-loader/fixtures/invalid-tags-dir/test.js
+++ b/test/taglib-loader/fixtures/invalid-tags-dir/test.js
@@ -1,10 +1,12 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (taglibLoader, expect) {
- var taglibPath = nodePath.join(__dirname, 'marko.json');
- var tagPath = nodePath.join(__dirname, 'tags/foo/marko-tag.json');
+exports.check = function(taglibLoader, expect) {
+ var taglibPath = nodePath.join(__dirname, "marko.json");
+ var tagPath = nodePath.join(__dirname, "tags/foo/marko-tag.json");
- expect(function () {
+ expect(function() {
taglibLoader.loadTaglibFromFile(taglibPath);
- }).to.throw(`Invalid option: INVALID ([${taglibPath} → → ${tagPath}]`);
-};
\ No newline at end of file
+ }).to.throw(
+ `Invalid option: INVALID ([${taglibPath} → → ${tagPath}]`
+ );
+};
diff --git a/test/taglib-loader/fixtures/paths/marko.json b/test/taglib-loader/fixtures/paths/marko.json
index ee82ed6a2..24555e96d 100644
--- a/test/taglib-loader/fixtures/paths/marko.json
+++ b/test/taglib-loader/fixtures/paths/marko.json
@@ -4,4 +4,4 @@
"@name": "string",
"@age": "integer"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/marko-tag.json b/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/marko-tag.json
index 2e84817de..60f3d275b 100644
--- a/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/marko-tag.json
+++ b/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/marko-tag.json
@@ -1,4 +1,4 @@
{
"@name": "string",
"@age": "integer"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/renderer.js b/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/renderer.js
index fb402864c..e78fe8540 100644
--- a/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/renderer.js
+++ b/test/taglib-loader/fixtures/paths/tags/test-hello-scanned/renderer.js
@@ -1,4 +1,4 @@
module.exports = function simple(input, out) {
var daysOld = input.age * 365;
- out.write('Hello ' + input.name + '! You are ' + daysOld + ' days old.');
-};
\ No newline at end of file
+ out.write("Hello " + input.name + "! You are " + daysOld + " days old.");
+};
diff --git a/test/taglib-loader/fixtures/paths/test.js b/test/taglib-loader/fixtures/paths/test.js
index 50fa3f173..0c82e5e42 100644
--- a/test/taglib-loader/fixtures/paths/test.js
+++ b/test/taglib-loader/fixtures/paths/test.js
@@ -1,19 +1,29 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (taglibLoader, expect) {
- var taglib = taglibLoader.loadTaglibFromFile(nodePath.join(__dirname, 'marko.json'));
+exports.check = function(taglibLoader, expect) {
+ var taglib = taglibLoader.loadTaglibFromFile(
+ nodePath.join(__dirname, "marko.json")
+ );
expect(taglib != null).to.equal(true);
- expect(taglib.filePath).to.equal(nodePath.join(__dirname, 'marko.json'));
+ expect(taglib.filePath).to.equal(nodePath.join(__dirname, "marko.json"));
- var helloTagScanned = taglib.tags['test-hello-scanned'];
- expect(helloTagScanned.filePath).to.equal(nodePath.join(__dirname, 'tags/test-hello-scanned/marko-tag.json'));
- expect(helloTagScanned.dir).to.equal(nodePath.join(__dirname, 'tags/test-hello-scanned'));
- expect(helloTagScanned.attributes.name.filePath).to.equal(nodePath.join(__dirname, 'tags/test-hello-scanned/marko-tag.json'));
+ var helloTagScanned = taglib.tags["test-hello-scanned"];
+ expect(helloTagScanned.filePath).to.equal(
+ nodePath.join(__dirname, "tags/test-hello-scanned/marko-tag.json")
+ );
+ expect(helloTagScanned.dir).to.equal(
+ nodePath.join(__dirname, "tags/test-hello-scanned")
+ );
+ expect(helloTagScanned.attributes.name.filePath).to.equal(
+ nodePath.join(__dirname, "tags/test-hello-scanned/marko-tag.json")
+ );
- var helloTag = taglib.tags['test-hello'];
- expect(helloTag.filePath).to.equal(nodePath.join(__dirname, 'marko.json'));
+ var helloTag = taglib.tags["test-hello"];
+ expect(helloTag.filePath).to.equal(nodePath.join(__dirname, "marko.json"));
expect(helloTag.dir).to.equal(__dirname);
- expect(helloTag.attributes.name.filePath).to.equal(nodePath.join(__dirname, 'marko.json'));
-};
\ No newline at end of file
+ expect(helloTag.attributes.name.filePath).to.equal(
+ nodePath.join(__dirname, "marko.json")
+ );
+};
diff --git a/test/taglib-loader/fixtures/shorthand-attrs-and-tags/marko.json b/test/taglib-loader/fixtures/shorthand-attrs-and-tags/marko.json
index d32dbbc14..099d70d65 100644
--- a/test/taglib-loader/fixtures/shorthand-attrs-and-tags/marko.json
+++ b/test/taglib-loader/fixtures/shorthand-attrs-and-tags/marko.json
@@ -24,4 +24,4 @@
"@orientation": "string"
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-loader/fixtures/shorthand-attrs-and-tags/test.js b/test/taglib-loader/fixtures/shorthand-attrs-and-tags/test.js
index ef7a43ea2..146a34154 100644
--- a/test/taglib-loader/fixtures/shorthand-attrs-and-tags/test.js
+++ b/test/taglib-loader/fixtures/shorthand-attrs-and-tags/test.js
@@ -1,22 +1,26 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (taglibLoader, expect) {
- var taglib = taglibLoader.loadTaglibFromFile(nodePath.join(__dirname, 'marko.json'));
+exports.check = function(taglibLoader, expect) {
+ var taglib = taglibLoader.loadTaglibFromFile(
+ nodePath.join(__dirname, "marko.json")
+ );
expect(taglib != null).to.equal(true);
- var shorthandCheckbox = taglib.tags['shorthand-checkbox'];
- expect(shorthandCheckbox.attributes.checked.type).to.equal('boolean');
- expect(shorthandCheckbox.attributes.label.type).to.equal('object');
- expect(shorthandCheckbox.nestedTags.label.type).to.equal('object');
- expect(shorthandCheckbox.nestedTags.foo.attributes.bar.type).to.equal('string');
+ var shorthandCheckbox = taglib.tags["shorthand-checkbox"];
+ expect(shorthandCheckbox.attributes.checked.type).to.equal("boolean");
+ expect(shorthandCheckbox.attributes.label.type).to.equal("object");
+ expect(shorthandCheckbox.nestedTags.label.type).to.equal("object");
+ expect(shorthandCheckbox.nestedTags.foo.attributes.bar.type).to.equal(
+ "string"
+ );
- var shorthandTabsTag = taglib.tags['shorthand-tabs'];
+ var shorthandTabsTag = taglib.tags["shorthand-tabs"];
expect(shorthandTabsTag.attributes.orientation != null).to.equal(true);
- expect(shorthandTabsTag.attributes.orientation.type).to.equal('string');
- expect(shorthandTabsTag.attributes.tabs.type).to.equal('expression');
+ expect(shorthandTabsTag.attributes.orientation.type).to.equal("string");
+ expect(shorthandTabsTag.attributes.tabs.type).to.equal("expression");
var nestedTabTag = shorthandTabsTag.nestedTags.tab;
expect(nestedTabTag.attributes.label != null).to.equal(true);
expect(nestedTabTag.isRepeated).to.equal(true);
- expect(nestedTabTag.targetProperty).to.equal('tabs');
-};
\ No newline at end of file
+ expect(nestedTabTag.targetProperty).to.equal("tabs");
+};
diff --git a/test/taglib-loader/index.test.js b/test/taglib-loader/index.test.js
index c57968f9d..9d2017a5e 100644
--- a/test/taglib-loader/index.test.js
+++ b/test/taglib-loader/index.test.js
@@ -1,22 +1,22 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-var expect = require('chai').expect;
-var nodePath = require('path');
-require('../../compiler');
-var autotest = require('../autotest');
-var taglibLoader = require('../../compiler').taglibLoader;
+var expect = require("chai").expect;
+var nodePath = require("path");
+require("../../compiler");
+var autotest = require("../autotest");
+var taglibLoader = require("../../compiler").taglibLoader;
-describe('taglib-loader', function () {
- var autoTestDir = nodePath.join(__dirname, './fixtures');
+describe("taglib-loader", function() {
+ var autoTestDir = nodePath.join(__dirname, "./fixtures");
autotest.scanDir(autoTestDir, function run(dir, helpers, done) {
- var test = require(nodePath.join(dir, 'test.js'));
+ var test = require(nodePath.join(dir, "test.js"));
test.check(taglibLoader, expect);
done();
});
-});
\ No newline at end of file
+});
diff --git a/test/taglib-lookup/fixtures/attribute-groups/marko.json b/test/taglib-lookup/fixtures/attribute-groups/marko.json
index af0fc6938..2ca7cf2f8 100644
--- a/test/taglib-lookup/fixtures/attribute-groups/marko.json
+++ b/test/taglib-lookup/fixtures/attribute-groups/marko.json
@@ -1,15 +1,11 @@
{
"": {
"@cat": "boolean",
- "attribute-groups": [
- "my-attribute-group"
- ]
+ "attribute-groups": ["my-attribute-group"]
},
"": {
"@dog": "boolean",
- "attribute-groups": [
- "my-attribute-group"
- ]
+ "attribute-groups": ["my-attribute-group"]
},
"attribute-groups": {
@@ -17,4 +13,4 @@
"age": "integer"
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/attribute-groups/test.js b/test/taglib-lookup/fixtures/attribute-groups/test.js
index 8b3572932..fdea903f1 100644
--- a/test/taglib-lookup/fixtures/attribute-groups/test.js
+++ b/test/taglib-lookup/fixtures/attribute-groups/test.js
@@ -1,9 +1,9 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- expect(lookup.getAttribute('foo', 'cat').type).to.equal('boolean');
- expect(lookup.getAttribute('foo', 'age').type).to.equal('integer');
- expect(lookup.getAttribute('bar', 'dog').type).to.equal('boolean');
- expect(lookup.getAttribute('bar', 'age').type).to.equal('integer');
-};
\ No newline at end of file
+ expect(lookup.getAttribute("foo", "cat").type).to.equal("boolean");
+ expect(lookup.getAttribute("foo", "age").type).to.equal("integer");
+ expect(lookup.getAttribute("bar", "dog").type).to.equal("boolean");
+ expect(lookup.getAttribute("bar", "age").type).to.equal("integer");
+};
diff --git a/test/taglib-lookup/fixtures/attribute-ref/marko.json b/test/taglib-lookup/fixtures/attribute-ref/marko.json
index 92f832ae6..90569af82 100644
--- a/test/taglib-lookup/fixtures/attribute-ref/marko.json
+++ b/test/taglib-lookup/fixtures/attribute-ref/marko.json
@@ -8,4 +8,4 @@
"@shared-hello": {
"type": "shared"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/attribute-ref/test.js b/test/taglib-lookup/fixtures/attribute-ref/test.js
index dc0b85071..05daeaf73 100644
--- a/test/taglib-lookup/fixtures/attribute-ref/test.js
+++ b/test/taglib-lookup/fixtures/attribute-ref/test.js
@@ -1,10 +1,10 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- var sharedAttrDef = lookup.getAttribute('foo', 'hello');
- expect(sharedAttrDef.type).equal('shared');
+ var sharedAttrDef = lookup.getAttribute("foo", "hello");
+ expect(sharedAttrDef.type).equal("shared");
- sharedAttrDef = lookup.getAttribute('bar', 'hello');
- expect(sharedAttrDef.type).equal('shared');
-};
\ No newline at end of file
+ sharedAttrDef = lookup.getAttribute("bar", "hello");
+ expect(sharedAttrDef.type).equal("shared");
+};
diff --git a/test/taglib-lookup/fixtures/cache-lookup/baz/marko.json b/test/taglib-lookup/fixtures/cache-lookup/baz/marko.json
index 8f6c0129d..49bc96969 100644
--- a/test/taglib-lookup/fixtures/cache-lookup/baz/marko.json
+++ b/test/taglib-lookup/fixtures/cache-lookup/baz/marko.json
@@ -2,4 +2,4 @@
"": {
"renderer": "./baz-tag.js"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/cache-lookup/foo/marko.json b/test/taglib-lookup/fixtures/cache-lookup/foo/marko.json
index 4b268a5d7..1966ebd01 100644
--- a/test/taglib-lookup/fixtures/cache-lookup/foo/marko.json
+++ b/test/taglib-lookup/fixtures/cache-lookup/foo/marko.json
@@ -2,4 +2,4 @@
"": {
"renderer": "./foo-tag.js"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/cache-lookup/test.js b/test/taglib-lookup/fixtures/cache-lookup/test.js
index 41b143dd7..0d3a75d57 100644
--- a/test/taglib-lookup/fixtures/cache-lookup/test.js
+++ b/test/taglib-lookup/fixtures/cache-lookup/test.js
@@ -1,12 +1,14 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
- var lookup1 = taglibLookup.buildLookup(nodePath.join(__dirname, 'foo'));
- var lookup2 = taglibLookup.buildLookup(nodePath.join(__dirname, 'foo'));
- var lookup3 = taglibLookup.buildLookup(nodePath.join(__dirname, 'foo/empty'));
- var lookup4 = taglibLookup.buildLookup(nodePath.join(__dirname, 'baz'));
+ var lookup1 = taglibLookup.buildLookup(nodePath.join(__dirname, "foo"));
+ var lookup2 = taglibLookup.buildLookup(nodePath.join(__dirname, "foo"));
+ var lookup3 = taglibLookup.buildLookup(
+ nodePath.join(__dirname, "foo/empty")
+ );
+ var lookup4 = taglibLookup.buildLookup(nodePath.join(__dirname, "baz"));
expect(lookup1).to.equal(lookup2);
expect(lookup2).to.equal(lookup3);
expect(lookup1).to.not.equal(lookup4);
-};
\ No newline at end of file
+};
diff --git a/test/taglib-lookup/fixtures/core-attributes/test.js b/test/taglib-lookup/fixtures/core-attributes/test.js
index 0b6e7d0e4..c3c342f3e 100644
--- a/test/taglib-lookup/fixtures/core-attributes/test.js
+++ b/test/taglib-lookup/fixtures/core-attributes/test.js
@@ -1,8 +1,8 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
// console.log('LOOKUP: ', Object.keys(lookup.attributes));
- var ifAttr = lookup.getAttribute('div', 'if');
+ var ifAttr = lookup.getAttribute("div", "if");
expect(ifAttr != null).to.equal(true);
- expect(ifAttr.type).to.equal('statement');
-};
\ No newline at end of file
+ expect(ifAttr.type).to.equal("statement");
+};
diff --git a/test/taglib-lookup/fixtures/core-tag/test.js b/test/taglib-lookup/fixtures/core-tag/test.js
index 3bdb0e7e5..0618926b3 100644
--- a/test/taglib-lookup/fixtures/core-tag/test.js
+++ b/test/taglib-lookup/fixtures/core-tag/test.js
@@ -1,7 +1,7 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- var ifTag = lookup.getTag('if');
+ var ifTag = lookup.getTag("if");
expect(ifTag != null).to.equal(true);
- expect(ifTag.name).to.equal('if');
-};
\ No newline at end of file
+ expect(ifTag.name).to.equal("if");
+};
diff --git a/test/taglib-lookup/fixtures/custom-tag/marko.json b/test/taglib-lookup/fixtures/custom-tag/marko.json
index 0433c6aa8..699ffe259 100644
--- a/test/taglib-lookup/fixtures/custom-tag/marko.json
+++ b/test/taglib-lookup/fixtures/custom-tag/marko.json
@@ -1,3 +1,3 @@
{
"": "taglib/test-hello/marko-tag.json"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/custom-tag/taglib/test-hello/marko-tag.json b/test/taglib-lookup/fixtures/custom-tag/taglib/test-hello/marko-tag.json
index 4b5607da1..14a0c4f51 100644
--- a/test/taglib-lookup/fixtures/custom-tag/taglib/test-hello/marko-tag.json
+++ b/test/taglib-lookup/fixtures/custom-tag/taglib/test-hello/marko-tag.json
@@ -1,3 +1,3 @@
{
"renderer": "./renderer.js"
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/custom-tag/test.js b/test/taglib-lookup/fixtures/custom-tag/test.js
index 5e32847ab..f02263b1c 100644
--- a/test/taglib-lookup/fixtures/custom-tag/test.js
+++ b/test/taglib-lookup/fixtures/custom-tag/test.js
@@ -1,8 +1,8 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- var tag = lookup.getTag('test-hello');
+ var tag = lookup.getTag("test-hello");
// console.log(Object.keys(lookup.tags));
expect(tag != null).to.equal(true);
- expect(tag.name).to.equal('test-hello');
-};
\ No newline at end of file
+ expect(tag.name).to.equal("test-hello");
+};
diff --git a/test/taglib-lookup/fixtures/de-dupe/foo-renderer.js b/test/taglib-lookup/fixtures/de-dupe/foo-renderer.js
index a38fad98d..150fe73fc 100644
--- a/test/taglib-lookup/fixtures/de-dupe/foo-renderer.js
+++ b/test/taglib-lookup/fixtures/de-dupe/foo-renderer.js
@@ -1 +1 @@
-exports.render = function (input, out) {};
\ No newline at end of file
+exports.render = function() {};
diff --git a/test/taglib-lookup/fixtures/de-dupe/marko.json b/test/taglib-lookup/fixtures/de-dupe/marko.json
index abe89e11c..3d601e4d7 100644
--- a/test/taglib-lookup/fixtures/de-dupe/marko.json
+++ b/test/taglib-lookup/fixtures/de-dupe/marko.json
@@ -3,4 +3,4 @@
"": {
"renderer": "./foo-renderer.js"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/bar-renderer.js b/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/bar-renderer.js
index a38fad98d..150fe73fc 100644
--- a/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/bar-renderer.js
+++ b/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/bar-renderer.js
@@ -1 +1 @@
-exports.render = function (input, out) {};
\ No newline at end of file
+exports.render = function() {};
diff --git a/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/marko.json b/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/marko.json
index b9bd03fdf..ec9561d57 100644
--- a/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/marko.json
+++ b/test/taglib-lookup/fixtures/de-dupe/taglib-duplicate/marko.json
@@ -3,4 +3,4 @@
"": {
"renderer": "./bar-renderer.js"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/de-dupe/test.js b/test/taglib-lookup/fixtures/de-dupe/test.js
index 862b7e676..60b820b3f 100644
--- a/test/taglib-lookup/fixtures/de-dupe/test.js
+++ b/test/taglib-lookup/fixtures/de-dupe/test.js
@@ -1,17 +1,19 @@
-var nodePath = require('path');
+var nodePath = require("path");
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
- var lookup = taglibLookup.buildLookup(nodePath.join(__dirname, 'taglib-duplicate'));
+ var lookup = taglibLookup.buildLookup(
+ nodePath.join(__dirname, "taglib-duplicate")
+ );
// The "duplicate-bar" tag was declared in the lower
// taglib so it should have been found since the taglib
// should not have been de-duped.
- var barTag = lookup.getTag('duplicate-bar');
+ var barTag = lookup.getTag("duplicate-bar");
expect(barTag != null).to.equal(true);
// The "duplicate-foo" tag was declared in the higher
// up taglib so it should have been discarded
- var fooTag = lookup.getTag('duplicate-foo');
+ var fooTag = lookup.getTag("duplicate-foo");
expect(fooTag == null).to.equal(true);
-};
\ No newline at end of file
+};
diff --git a/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/marko.json b/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/marko.json
index 5a1c3270f..412a4db71 100644
--- a/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/marko.json
+++ b/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/marko.json
@@ -4,4 +4,4 @@
"@foo": "string",
"@*": "boolean"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/renderer.js b/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/renderer.js
index 9eca6812d..0a55f349a 100644
--- a/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/renderer.js
+++ b/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/renderer.js
@@ -1 +1 @@
-module.exports = function () {};
\ No newline at end of file
+module.exports = function() {};
diff --git a/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/test.js b/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/test.js
index 821dfed0c..359c63eb5 100644
--- a/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/test.js
+++ b/test/taglib-lookup/fixtures/declared-and-dynamic-attrs/test.js
@@ -1,13 +1,13 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
// console.log(Object.keys(lookup.attributes));
- var attr = lookup.getAttribute('test-dynamic-attribute', 'DYNAMIC');
+ var attr = lookup.getAttribute("test-dynamic-attribute", "DYNAMIC");
expect(attr != null).to.equal(true);
- expect(attr.type).to.equal('boolean');
- expect(attr.name).to.equal('*');
+ expect(attr.type).to.equal("boolean");
+ expect(attr.name).to.equal("*");
- attr = lookup.getAttribute('test-dynamic-attribute', 'foo');
+ attr = lookup.getAttribute("test-dynamic-attribute", "foo");
expect(attr != null).to.equal(true);
- expect(attr.type).to.equal('string');
-};
\ No newline at end of file
+ expect(attr.type).to.equal("string");
+};
diff --git a/test/taglib-lookup/fixtures/forEachAttribute-html-tag/test.js b/test/taglib-lookup/fixtures/forEachAttribute-html-tag/test.js
index e359c0ee9..fd7dff3d6 100644
--- a/test/taglib-lookup/fixtures/forEachAttribute-html-tag/test.js
+++ b/test/taglib-lookup/fixtures/forEachAttribute-html-tag/test.js
@@ -1,14 +1,14 @@
-exports.check = function (markoCompiler, expect, helpers) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
var hasHrefAttr = false;
- lookup.forEachAttribute('a', attr => {
- if (attr.name === 'href') {
+ lookup.forEachAttribute("a", attr => {
+ if (attr.name === "href") {
hasHrefAttr = true;
}
});
expect(hasHrefAttr).to.equal(true);
-};
\ No newline at end of file
+};
diff --git a/test/taglib-lookup/fixtures/forEachAttribute/marko.json b/test/taglib-lookup/fixtures/forEachAttribute/marko.json
index eb44efed5..d2ff69c9a 100644
--- a/test/taglib-lookup/fixtures/forEachAttribute/marko.json
+++ b/test/taglib-lookup/fixtures/forEachAttribute/marko.json
@@ -9,4 +9,4 @@
"": {
"@baz": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/forEachAttribute/test.js b/test/taglib-lookup/fixtures/forEachAttribute/test.js
index ff4d0b30d..8dba04894 100644
--- a/test/taglib-lookup/fixtures/forEachAttribute/test.js
+++ b/test/taglib-lookup/fixtures/forEachAttribute/test.js
@@ -1,12 +1,12 @@
-exports.check = function (markoCompiler, expect, helpers) {
+exports.check = function(markoCompiler, expect, helpers) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
var attrNames = [];
- lookup.forEachAttribute('foo', attr => {
+ lookup.forEachAttribute("foo", attr => {
attrNames.push(attr.name);
});
- helpers.compare(attrNames, '.json');
-};
\ No newline at end of file
+ helpers.compare(attrNames, ".json");
+};
diff --git a/test/taglib-lookup/fixtures/forEachTag/marko.json b/test/taglib-lookup/fixtures/forEachTag/marko.json
index be36c43b2..19623cfbe 100644
--- a/test/taglib-lookup/fixtures/forEachTag/marko.json
+++ b/test/taglib-lookup/fixtures/forEachTag/marko.json
@@ -8,4 +8,4 @@
"": {
"@name": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/forEachTag/test.js b/test/taglib-lookup/fixtures/forEachTag/test.js
index 4e3276713..331efda93 100644
--- a/test/taglib-lookup/fixtures/forEachTag/test.js
+++ b/test/taglib-lookup/fixtures/forEachTag/test.js
@@ -1,4 +1,4 @@
-exports.check = function (markoCompiler, expect, helpers) {
+exports.check = function(markoCompiler, expect, helpers) {
var lookup = markoCompiler.buildTaglibLookup(__dirname);
var tagNames = [];
@@ -7,5 +7,5 @@ exports.check = function (markoCompiler, expect, helpers) {
tagNames.push(tag.name);
});
- helpers.compare(tagNames, '.json');
-};
\ No newline at end of file
+ helpers.compare(tagNames, ".json");
+};
diff --git a/test/taglib-lookup/fixtures/getTagsSorted/marko.json b/test/taglib-lookup/fixtures/getTagsSorted/marko.json
index f60437c54..033fd78f4 100644
--- a/test/taglib-lookup/fixtures/getTagsSorted/marko.json
+++ b/test/taglib-lookup/fixtures/getTagsSorted/marko.json
@@ -8,4 +8,4 @@
"": {
"@name": "string"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/getTagsSorted/test.js b/test/taglib-lookup/fixtures/getTagsSorted/test.js
index 58285f99b..105585880 100644
--- a/test/taglib-lookup/fixtures/getTagsSorted/test.js
+++ b/test/taglib-lookup/fixtures/getTagsSorted/test.js
@@ -1,4 +1,4 @@
-exports.check = function (markoCompiler, expect, helpers) {
+exports.check = function(markoCompiler, expect, helpers) {
var lookup = markoCompiler.buildTaglibLookup(__dirname);
var tagNames = [];
@@ -8,5 +8,5 @@ exports.check = function (markoCompiler, expect, helpers) {
tagNames.push(tag.name);
});
- helpers.compare(tagNames, '.json');
-};
\ No newline at end of file
+ helpers.compare(tagNames, ".json");
+};
diff --git a/test/taglib-lookup/fixtures/global-attrs/marko.json b/test/taglib-lookup/fixtures/global-attrs/marko.json
index 9acdd3ce6..f15a02fce 100644
--- a/test/taglib-lookup/fixtures/global-attrs/marko.json
+++ b/test/taglib-lookup/fixtures/global-attrs/marko.json
@@ -2,4 +2,4 @@
"<*>": {
"@global-attribute": "boolean"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/global-attrs/test.js b/test/taglib-lookup/fixtures/global-attrs/test.js
index 97d569074..82ba332c9 100644
--- a/test/taglib-lookup/fixtures/global-attrs/test.js
+++ b/test/taglib-lookup/fixtures/global-attrs/test.js
@@ -1,8 +1,11 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
// console.log('LOOKUP: ', Object.keys(lookup.attributes));
- var attrDef = lookup.getAttribute('test-dynamic-attributes', 'global-attribute');
+ var attrDef = lookup.getAttribute(
+ "test-dynamic-attributes",
+ "global-attribute"
+ );
expect(attrDef != null).to.equal(true);
- expect(attrDef.type).to.equal('boolean');
-};
\ No newline at end of file
+ expect(attrDef.type).to.equal("boolean");
+};
diff --git a/test/taglib-lookup/fixtures/html-any-attr/marko.json b/test/taglib-lookup/fixtures/html-any-attr/marko.json
index 92f832ae6..90569af82 100644
--- a/test/taglib-lookup/fixtures/html-any-attr/marko.json
+++ b/test/taglib-lookup/fixtures/html-any-attr/marko.json
@@ -8,4 +8,4 @@
"@shared-hello": {
"type": "shared"
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/html-any-attr/test.js b/test/taglib-lookup/fixtures/html-any-attr/test.js
index 5246920a7..51fc56763 100644
--- a/test/taglib-lookup/fixtures/html-any-attr/test.js
+++ b/test/taglib-lookup/fixtures/html-any-attr/test.js
@@ -1,7 +1,7 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- var attrDef = lookup.getAttribute('div', 'blah');
- expect(attrDef).to.be.an('object');
-};
\ No newline at end of file
+ var attrDef = lookup.getAttribute("div", "blah");
+ expect(attrDef).to.be.an("object");
+};
diff --git a/test/taglib-lookup/fixtures/html-tag/marko.json b/test/taglib-lookup/fixtures/html-tag/marko.json
index af0fc6938..2ca7cf2f8 100644
--- a/test/taglib-lookup/fixtures/html-tag/marko.json
+++ b/test/taglib-lookup/fixtures/html-tag/marko.json
@@ -1,15 +1,11 @@
{
"": {
"@cat": "boolean",
- "attribute-groups": [
- "my-attribute-group"
- ]
+ "attribute-groups": ["my-attribute-group"]
},
"": {
"@dog": "boolean",
- "attribute-groups": [
- "my-attribute-group"
- ]
+ "attribute-groups": ["my-attribute-group"]
},
"attribute-groups": {
@@ -17,4 +13,4 @@
"age": "integer"
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/html-tag/test.js b/test/taglib-lookup/fixtures/html-tag/test.js
index a8ad9d87b..17300b187 100644
--- a/test/taglib-lookup/fixtures/html-tag/test.js
+++ b/test/taglib-lookup/fixtures/html-tag/test.js
@@ -1,7 +1,7 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- expect(lookup.getTag('div').html).to.equal(true);
- expect(lookup.getAttribute('div', 'id').html).to.equal(true);
-};
\ No newline at end of file
+ expect(lookup.getTag("div").html).to.equal(true);
+ expect(lookup.getAttribute("div", "id").html).to.equal(true);
+};
diff --git a/test/taglib-lookup/fixtures/nested-tags-attrs/foo-renderer.js b/test/taglib-lookup/fixtures/nested-tags-attrs/foo-renderer.js
index c6bd5fc82..67636a92a 100644
--- a/test/taglib-lookup/fixtures/nested-tags-attrs/foo-renderer.js
+++ b/test/taglib-lookup/fixtures/nested-tags-attrs/foo-renderer.js
@@ -1,3 +1,3 @@
-exports.render = function (input, out) {
- out.write('nested/a');
-};
\ No newline at end of file
+exports.render = function(input, out) {
+ out.write("nested/a");
+};
diff --git a/test/taglib-lookup/fixtures/nested-tags-attrs/marko.json b/test/taglib-lookup/fixtures/nested-tags-attrs/marko.json
index db511eda3..02fb7f039 100644
--- a/test/taglib-lookup/fixtures/nested-tags-attrs/marko.json
+++ b/test/taglib-lookup/fixtures/nested-tags-attrs/marko.json
@@ -7,4 +7,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/nested-tags-attrs/test.js b/test/taglib-lookup/fixtures/nested-tags-attrs/test.js
index 7a1e47c63..6184635a4 100644
--- a/test/taglib-lookup/fixtures/nested-tags-attrs/test.js
+++ b/test/taglib-lookup/fixtures/nested-tags-attrs/test.js
@@ -1,8 +1,8 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
// console.log(Object.keys(lookup.attributes));
- var attr = lookup.getAttribute('nested-foo', 'attr1');
+ var attr = lookup.getAttribute("nested-foo", "attr1");
expect(attr != null).to.equal(true);
- expect(attr.type).to.equal('string');
-};
\ No newline at end of file
+ expect(attr.type).to.equal("string");
+};
diff --git a/test/taglib-lookup/fixtures/nested-tags/foo-renderer.js b/test/taglib-lookup/fixtures/nested-tags/foo-renderer.js
index c6bd5fc82..67636a92a 100644
--- a/test/taglib-lookup/fixtures/nested-tags/foo-renderer.js
+++ b/test/taglib-lookup/fixtures/nested-tags/foo-renderer.js
@@ -1,3 +1,3 @@
-exports.render = function (input, out) {
- out.write('nested/a');
-};
\ No newline at end of file
+exports.render = function(input, out) {
+ out.write("nested/a");
+};
diff --git a/test/taglib-lookup/fixtures/nested-tags/marko.json b/test/taglib-lookup/fixtures/nested-tags/marko.json
index db511eda3..02fb7f039 100644
--- a/test/taglib-lookup/fixtures/nested-tags/marko.json
+++ b/test/taglib-lookup/fixtures/nested-tags/marko.json
@@ -7,4 +7,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/nested-tags/test.js b/test/taglib-lookup/fixtures/nested-tags/test.js
index 0c859e7aa..5a7f85a16 100644
--- a/test/taglib-lookup/fixtures/nested-tags/test.js
+++ b/test/taglib-lookup/fixtures/nested-tags/test.js
@@ -1,8 +1,8 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var lookup = taglibLookup.buildLookup(__dirname);
- var tag = lookup.getTag('nested-foo');
+ var tag = lookup.getTag("nested-foo");
expect(tag != null).to.equal(true);
- expect(tag.name).to.equal('nested-foo');
-};
\ No newline at end of file
+ expect(tag.name).to.equal("nested-foo");
+};
diff --git a/test/taglib-lookup/fixtures/transformers-core-only/foo-renderer.js b/test/taglib-lookup/fixtures/transformers-core-only/foo-renderer.js
index c6bd5fc82..67636a92a 100644
--- a/test/taglib-lookup/fixtures/transformers-core-only/foo-renderer.js
+++ b/test/taglib-lookup/fixtures/transformers-core-only/foo-renderer.js
@@ -1,3 +1,3 @@
-exports.render = function (input, out) {
- out.write('nested/a');
-};
\ No newline at end of file
+exports.render = function(input, out) {
+ out.write("nested/a");
+};
diff --git a/test/taglib-lookup/fixtures/transformers-core-only/marko.json b/test/taglib-lookup/fixtures/transformers-core-only/marko.json
index db511eda3..02fb7f039 100644
--- a/test/taglib-lookup/fixtures/transformers-core-only/marko.json
+++ b/test/taglib-lookup/fixtures/transformers-core-only/marko.json
@@ -7,4 +7,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/transformers-core-only/test.js b/test/taglib-lookup/fixtures/transformers-core-only/test.js
index 29ec2c294..7ffb118d6 100644
--- a/test/taglib-lookup/fixtures/transformers-core-only/test.js
+++ b/test/taglib-lookup/fixtures/transformers-core-only/test.js
@@ -1,9 +1,9 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var transformers = [];
var lookup = taglibLookup.buildLookup(__dirname);
- lookup.forEachTagTransformer('div', function (transformer) {
+ lookup.forEachTagTransformer("div", function(transformer) {
transformers.push(transformer);
});
diff --git a/test/taglib-lookup/fixtures/transformers-custom-node/foo-renderer.js b/test/taglib-lookup/fixtures/transformers-custom-node/foo-renderer.js
index c6bd5fc82..67636a92a 100644
--- a/test/taglib-lookup/fixtures/transformers-custom-node/foo-renderer.js
+++ b/test/taglib-lookup/fixtures/transformers-custom-node/foo-renderer.js
@@ -1,3 +1,3 @@
-exports.render = function (input, out) {
- out.write('nested/a');
-};
\ No newline at end of file
+exports.render = function(input, out) {
+ out.write("nested/a");
+};
diff --git a/test/taglib-lookup/fixtures/transformers-custom-node/marko.json b/test/taglib-lookup/fixtures/transformers-custom-node/marko.json
index db511eda3..02fb7f039 100644
--- a/test/taglib-lookup/fixtures/transformers-custom-node/marko.json
+++ b/test/taglib-lookup/fixtures/transformers-custom-node/marko.json
@@ -7,4 +7,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/transformers-custom-node/test.js b/test/taglib-lookup/fixtures/transformers-custom-node/test.js
index 73882c685..3200f3be2 100644
--- a/test/taglib-lookup/fixtures/transformers-custom-node/test.js
+++ b/test/taglib-lookup/fixtures/transformers-custom-node/test.js
@@ -1,14 +1,16 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var transformers = [];
var lookup = taglibLookup.buildLookup(__dirname);
- lookup.forEachTagTransformer('else', function (transformer) {
+ lookup.forEachTagTransformer("else", function(transformer) {
transformers.push(transformer);
});
expect(transformers.length).to.equal(2);
- expect(transformers[0].path.indexOf('core-transformer')).to.not.equal(-1);
- expect(transformers[1].path.indexOf('components-transformer')).to.not.equal(-1);
+ expect(transformers[0].path.indexOf("core-transformer")).to.not.equal(-1);
+ expect(transformers[1].path.indexOf("components-transformer")).to.not.equal(
+ -1
+ );
};
diff --git a/test/taglib-lookup/fixtures/transformers/bar-transformer.js b/test/taglib-lookup/fixtures/transformers/bar-transformer.js
index dab1ffdc7..b680892d4 100644
--- a/test/taglib-lookup/fixtures/transformers/bar-transformer.js
+++ b/test/taglib-lookup/fixtures/transformers/bar-transformer.js
@@ -1 +1 @@
-exports.transform = function (node, compiler, template) {};
\ No newline at end of file
+exports.transform = function() {};
diff --git a/test/taglib-lookup/fixtures/transformers/foo-transformer.js b/test/taglib-lookup/fixtures/transformers/foo-transformer.js
index dab1ffdc7..b680892d4 100644
--- a/test/taglib-lookup/fixtures/transformers/foo-transformer.js
+++ b/test/taglib-lookup/fixtures/transformers/foo-transformer.js
@@ -1 +1 @@
-exports.transform = function (node, compiler, template) {};
\ No newline at end of file
+exports.transform = function() {};
diff --git a/test/taglib-lookup/fixtures/transformers/marko.json b/test/taglib-lookup/fixtures/transformers/marko.json
index ef22aeb20..10e2677f1 100644
--- a/test/taglib-lookup/fixtures/transformers/marko.json
+++ b/test/taglib-lookup/fixtures/transformers/marko.json
@@ -15,4 +15,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/test/taglib-lookup/fixtures/transformers/test.js b/test/taglib-lookup/fixtures/transformers/test.js
index f8d09e74a..e4eb11344 100644
--- a/test/taglib-lookup/fixtures/transformers/test.js
+++ b/test/taglib-lookup/fixtures/transformers/test.js
@@ -1,4 +1,4 @@
-exports.check = function (markoCompiler, expect) {
+exports.check = function(markoCompiler, expect) {
var taglibLookup = markoCompiler.taglibLookup;
var transformers;
var lookup;
@@ -14,22 +14,26 @@ exports.check = function (markoCompiler, expect) {
lookup = taglibLookup.buildLookup(__dirname);
transformers = [];
- lookup.forEachTagTransformer('transform-foo', function (transformer) {
+ lookup.forEachTagTransformer("transform-foo", function(transformer) {
transformers.push(transformer);
});
expect(transformers.length).to.equal(3);
- expect(transformers[0].path.indexOf('foo')).to.not.equal(-1);
- expect(transformers[1].path.indexOf('core-transformer')).to.not.equal(-1);
- expect(transformers[2].path.indexOf('components-transformer')).to.not.equal(-1);
+ expect(transformers[0].path.indexOf("foo")).to.not.equal(-1);
+ expect(transformers[1].path.indexOf("core-transformer")).to.not.equal(-1);
+ expect(transformers[2].path.indexOf("components-transformer")).to.not.equal(
+ -1
+ );
transformers = [];
- lookup.forEachTagTransformer('transform-bar', function (transformer) {
+ lookup.forEachTagTransformer("transform-bar", function(transformer) {
transformers.push(transformer);
});
expect(transformers.length).to.equal(3);
- expect(transformers[0].path.indexOf('core-transformer')).to.not.equal(-1);
- expect(transformers[1].path.indexOf('bar')).to.not.equal(-1);
- expect(transformers[2].path.indexOf('components-transformer')).to.not.equal(-1);
+ expect(transformers[0].path.indexOf("core-transformer")).to.not.equal(-1);
+ expect(transformers[1].path.indexOf("bar")).to.not.equal(-1);
+ expect(transformers[2].path.indexOf("components-transformer")).to.not.equal(
+ -1
+ );
};
diff --git a/test/taglib-lookup/index.test.js b/test/taglib-lookup/index.test.js
index 305445e3a..4731cbe29 100644
--- a/test/taglib-lookup/index.test.js
+++ b/test/taglib-lookup/index.test.js
@@ -1,23 +1,23 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-var expect = require('chai').expect;
-var nodePath = require('path');
-var autotest = require('../autotest');
-var markoCompiler = require('../../compiler');
+var expect = require("chai").expect;
+var nodePath = require("path");
+var autotest = require("../autotest");
+var markoCompiler = require("../../compiler");
markoCompiler.buildTaglibLookup(__dirname);
-describe('taglib-lookup', function () {
- var autoTestDir = nodePath.join(__dirname, './fixtures');
+describe("taglib-lookup", function() {
+ var autoTestDir = nodePath.join(__dirname, "./fixtures");
autotest.scanDir(autoTestDir, function run(dir, helpers, done) {
- var test = require(nodePath.join(dir, 'test.js'));
+ var test = require(nodePath.join(dir, "test.js"));
test.check(markoCompiler, expect, helpers);
done();
});
-});
\ No newline at end of file
+});
diff --git a/test/vdom-compiler/fixtures/custom-tag/marko.json b/test/vdom-compiler/fixtures/custom-tag/marko.json
index e85a78200..7720f87ea 100644
--- a/test/vdom-compiler/fixtures/custom-tag/marko.json
+++ b/test/vdom-compiler/fixtures/custom-tag/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/marko-tag.json b/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/marko-tag.json
index e83d0748c..ba1ca98b1 100644
--- a/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/marko-tag.json
+++ b/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/marko-tag.json
@@ -2,4 +2,4 @@
"renderer": "./renderer.js",
"@name": "string",
"@adult": "boolean"
-}
\ No newline at end of file
+}
diff --git a/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/renderer.js b/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/renderer.js
index a38fad98d..150fe73fc 100644
--- a/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/renderer.js
+++ b/test/vdom-compiler/fixtures/custom-tag/tags/test-hello/renderer.js
@@ -1 +1 @@
-exports.render = function (input, out) {};
\ No newline at end of file
+exports.render = function() {};
diff --git a/test/vdom-compiler/fixtures/tag-body/marko.json b/test/vdom-compiler/fixtures/tag-body/marko.json
index e85a78200..7720f87ea 100644
--- a/test/vdom-compiler/fixtures/tag-body/marko.json
+++ b/test/vdom-compiler/fixtures/tag-body/marko.json
@@ -1,3 +1,3 @@
{
"tags-dir": "./tags"
-}
\ No newline at end of file
+}
diff --git a/test/vdom-compiler/fixtures/tag-body/tags/test-hello/marko-tag.json b/test/vdom-compiler/fixtures/tag-body/tags/test-hello/marko-tag.json
index e83d0748c..ba1ca98b1 100644
--- a/test/vdom-compiler/fixtures/tag-body/tags/test-hello/marko-tag.json
+++ b/test/vdom-compiler/fixtures/tag-body/tags/test-hello/marko-tag.json
@@ -2,4 +2,4 @@
"renderer": "./renderer.js",
"@name": "string",
"@adult": "boolean"
-}
\ No newline at end of file
+}
diff --git a/test/vdom-compiler/fixtures/tag-body/tags/test-hello/renderer.js b/test/vdom-compiler/fixtures/tag-body/tags/test-hello/renderer.js
index a38fad98d..150fe73fc 100644
--- a/test/vdom-compiler/fixtures/tag-body/tags/test-hello/renderer.js
+++ b/test/vdom-compiler/fixtures/tag-body/tags/test-hello/renderer.js
@@ -1 +1 @@
-exports.render = function (input, out) {};
\ No newline at end of file
+exports.render = function() {};
diff --git a/test/vdom-compiler/index.test.js b/test/vdom-compiler/index.test.js
index b28169215..9df3e1b2e 100644
--- a/test/vdom-compiler/index.test.js
+++ b/test/vdom-compiler/index.test.js
@@ -1,27 +1,31 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-var path = require('path');
-var compiler = require('../../compiler');
-var autotest = require('../autotest');
-var fs = require('fs');
+var path = require("path");
+var compiler = require("../../compiler");
+var autotest = require("../autotest");
+var fs = require("fs");
-describe('vdom-compiler', function () {
- var autoTestDir = path.join(__dirname, './fixtures');
+describe("vdom-compiler", function() {
+ var autoTestDir = path.join(__dirname, "./fixtures");
autotest.scanDir(autoTestDir, function run(dir, helpers, done) {
- var templatePath = path.join(dir, 'template.marko');
- var mainPath = path.join(dir, 'test.js');
+ var templatePath = path.join(dir, "template.marko");
+ var mainPath = path.join(dir, "test.js");
var main;
if (fs.existsSync(mainPath)) {
main = require(mainPath);
}
- var compilerOptions = { output: 'vdom', writeVersionComment: false, autoKeyEnabled: false };
+ var compilerOptions = {
+ output: "vdom",
+ writeVersionComment: false,
+ autoKeyEnabled: false
+ };
if (main && main.checkError) {
var e;
@@ -33,16 +37,19 @@ describe('vdom-compiler', function () {
}
if (!e) {
- throw new Error('Error expected');
+ throw new Error("Error expected");
}
main.checkError(e);
done();
} else {
- var compiledTemplate = compiler.compileFileForBrowser(templatePath, Object.assign(compilerOptions, main && main.compilerOptions));
+ var compiledTemplate = compiler.compileFileForBrowser(
+ templatePath,
+ Object.assign(compilerOptions, main && main.compilerOptions)
+ );
var actualSrc = compiledTemplate.code;
- actualSrc = actualSrc.replace(/marko\/dist\//g, 'marko/src/');
- helpers.compare(actualSrc, '.js');
+ actualSrc = actualSrc.replace(/marko\/dist\//g, "marko/src/");
+ helpers.compare(actualSrc, ".js");
done();
}
});
diff --git a/test/vdom-create/fixtures/appendDocumentFragment-children/index.js b/test/vdom-create/fixtures/appendDocumentFragment-children/index.js
index 15db74627..c99fe6d64 100644
--- a/test/vdom-create/fixtures/appendDocumentFragment-children/index.js
+++ b/test/vdom-create/fixtures/appendDocumentFragment-children/index.js
@@ -1,12 +1,14 @@
-module.exports = function (helpers) {
- var root = helpers.vdom.createElement('div', { class: 'root' });
+module.exports = function(helpers) {
+ var root = helpers.vdom.createElement("div", { class: "root" });
- root.e('div', { class: 'first-child' });
+ root.e("div", { class: "first-child" });
var docFragment = root.___appendDocumentFragment();
- docFragment.___appendChild(helpers.vdom.createElement('div', { class: 'middle-child' }));
+ docFragment.___appendChild(
+ helpers.vdom.createElement("div", { class: "middle-child" })
+ );
- root.e('div', { class: 'last-child' });
+ root.e("div", { class: "last-child" });
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/appendDocumentFragment-no-children/index.js b/test/vdom-create/fixtures/appendDocumentFragment-no-children/index.js
index e070d7f38..e1a88acea 100644
--- a/test/vdom-create/fixtures/appendDocumentFragment-no-children/index.js
+++ b/test/vdom-create/fixtures/appendDocumentFragment-no-children/index.js
@@ -1,11 +1,11 @@
-module.exports = function (helpers) {
- var root = helpers.vdom.createElement('div', { class: 'root' });
+module.exports = function(helpers) {
+ var root = helpers.vdom.createElement("div", { class: "root" });
- root.e('div', { class: 'first-child' });
+ root.e("div", { class: "first-child" });
root.___appendDocumentFragment();
- root.e('div', { class: 'last-child' });
+ root.e("div", { class: "last-child" });
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/assignAttributes/index.js b/test/vdom-create/fixtures/assignAttributes/index.js
index 70af833f8..5add5bcf6 100644
--- a/test/vdom-create/fixtures/assignAttributes/index.js
+++ b/test/vdom-create/fixtures/assignAttributes/index.js
@@ -1,10 +1,12 @@
-
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var morphAttrs = helpers.vdom.VElement.___morphAttrs;
- var fromEl = helpers.document.createElement('div');
+ var fromEl = helpers.document.createElement("div");
var vFromEl = helpers.vdom.virtualizeElement(fromEl);
- var toEl = helpers.vdom.createElement('div', { class: 'foo', 'xlink:href': 'bar.com' });
+ var toEl = helpers.vdom.createElement("div", {
+ class: "foo",
+ "xlink:href": "bar.com"
+ });
morphAttrs(fromEl, vFromEl, toEl);
return fromEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/attributes-attr-collection-child/index.js b/test/vdom-create/fixtures/attributes-attr-collection-child/index.js
index 8571a1c50..8de3a957f 100644
--- a/test/vdom-create/fixtures/attributes-attr-collection-child/index.js
+++ b/test/vdom-create/fixtures/attributes-attr-collection-child/index.js
@@ -1,5 +1,10 @@
-module.exports = function (helpers) {
- var attributes = { class: 'foo', id: 'bar' };
+module.exports = function(helpers) {
+ var attributes = { class: "foo", id: "bar" };
- return helpers.vdom.createElement('div', null, 2 /* childCount */).e('span', null, 1).e('p', attributes, 1).e('span', { 'class': 'leaf' }, 0).e('a', null, 0);
-};
\ No newline at end of file
+ return helpers.vdom
+ .createElement("div", null, 2 /* childCount */)
+ .e("span", null, 1)
+ .e("p", attributes, 1)
+ .e("span", { class: "leaf" }, 0)
+ .e("a", null, 0);
+};
diff --git a/test/vdom-create/fixtures/attributes-attr-collection/index.js b/test/vdom-create/fixtures/attributes-attr-collection/index.js
index f9a3841d2..5695667e3 100644
--- a/test/vdom-create/fixtures/attributes-attr-collection/index.js
+++ b/test/vdom-create/fixtures/attributes-attr-collection/index.js
@@ -1,5 +1,9 @@
-module.exports = function (helpers) {
- var attributes = { class: 'foo', id: 'bar' };
+module.exports = function(helpers) {
+ var attributes = { class: "foo", id: "bar" };
- return helpers.vdom.createElement('div', null, 2 /* childCount */).e('span', null, 1).e('p', attributes, 0).e('a', null, 0);
-};
\ No newline at end of file
+ return helpers.vdom
+ .createElement("div", null, 2 /* childCount */)
+ .e("span", null, 1)
+ .e("p", attributes, 0)
+ .e("a", null, 0);
+};
diff --git a/test/vdom-create/fixtures/attributes-null-false/index.js b/test/vdom-create/fixtures/attributes-null-false/index.js
index 9c01bba84..f7b5750c4 100644
--- a/test/vdom-create/fixtures/attributes-null-false/index.js
+++ b/test/vdom-create/fixtures/attributes-null-false/index.js
@@ -1,3 +1,17 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', null, 2 /* childCount */).e('span', null, 1).e('p', { class: 'foo', id: 'bar', title: null, 'data-bar': false, 'checked': true }, 0).e('a', null, 0);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement("div", null, 2 /* childCount */)
+ .e("span", null, 1)
+ .e(
+ "p",
+ {
+ class: "foo",
+ id: "bar",
+ title: null,
+ "data-bar": false,
+ checked: true
+ },
+ 0
+ )
+ .e("a", null, 0);
+};
diff --git a/test/vdom-create/fixtures/attributes-object/index.js b/test/vdom-create/fixtures/attributes-object/index.js
index 460042929..976fd644e 100644
--- a/test/vdom-create/fixtures/attributes-object/index.js
+++ b/test/vdom-create/fixtures/attributes-object/index.js
@@ -1,3 +1,7 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', null, 2 /* childCount */).e('span', null, 1).e('p', { class: 'foo', id: 'bar' }, 0).e('a', null, 0);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement("div", null, 2 /* childCount */)
+ .e("span", null, 1)
+ .e("p", { class: "foo", id: "bar" }, 0)
+ .e("a", null, 0);
+};
diff --git a/test/vdom-create/fixtures/attributes-true/index.js b/test/vdom-create/fixtures/attributes-true/index.js
index 766a73f05..ba112e7fe 100644
--- a/test/vdom-create/fixtures/attributes-true/index.js
+++ b/test/vdom-create/fixtures/attributes-true/index.js
@@ -1,5 +1,7 @@
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('select', null, null, null, 1 /* childCount */).e('option', { selected: true }, null, null, 0);
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom
+ .createElement("select", null, null, null, 1 /* childCount */)
+ .e("option", { selected: true }, null, null, 0);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/cloneNode-comment/index.js b/test/vdom-create/fixtures/cloneNode-comment/index.js
index 280df439e..e12a6e7f3 100644
--- a/test/vdom-create/fixtures/cloneNode-comment/index.js
+++ b/test/vdom-create/fixtures/cloneNode-comment/index.js
@@ -1,10 +1,10 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var comment = helpers.vdom.createComment('This is a comment');
+module.exports = function(helpers) {
+ var comment = helpers.vdom.createComment("This is a comment");
var commentClone = comment.___cloneNode();
expect(commentClone).to.not.equal(comment);
- expect(comment.___nodeValue).to.equal('This is a comment');
- expect(commentClone.___nodeValue).to.equal('This is a comment');
+ expect(comment.___nodeValue).to.equal("This is a comment");
+ expect(commentClone.___nodeValue).to.equal("This is a comment");
return comment;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/cloneNode-documentFragment/index.js b/test/vdom-create/fixtures/cloneNode-documentFragment/index.js
index 8354fe12a..df0763247 100644
--- a/test/vdom-create/fixtures/cloneNode-documentFragment/index.js
+++ b/test/vdom-create/fixtures/cloneNode-documentFragment/index.js
@@ -1,18 +1,25 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var SVG_FLAGS = 1; // SVG
- var svg = helpers.vdom.createElement('svg', null /* attrs */, null /* key */, null /* component */, null /* child count */, SVG_FLAGS);
+ var svg = helpers.vdom.createElement(
+ "svg",
+ null /* attrs */,
+ null /* key */,
+ null /* component */,
+ null /* child count */,
+ SVG_FLAGS
+ );
var docFragment = helpers.vdom.createDocumentFragment();
svg.___appendChild(docFragment);
- expect(svg.___namespaceURI).to.equal('http://www.w3.org/2000/svg');
+ expect(svg.___namespaceURI).to.equal("http://www.w3.org/2000/svg");
var docFragmentClone = docFragment.___cloneNode();
expect(docFragmentClone.___nextSibling).to.equal(null);
expect(docFragmentClone.___parentNode == null).to.equal(true);
return svg;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/cloneNode-text/index.js b/test/vdom-create/fixtures/cloneNode-text/index.js
index f840b0a06..d79620a54 100644
--- a/test/vdom-create/fixtures/cloneNode-text/index.js
+++ b/test/vdom-create/fixtures/cloneNode-text/index.js
@@ -1,10 +1,10 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var text = helpers.vdom.createText('Hello World');
+module.exports = function(helpers) {
+ var text = helpers.vdom.createText("Hello World");
var textClone = text.___cloneNode();
expect(textClone).to.not.equal(text);
- expect(text.___nodeValue).to.equal('Hello World');
- expect(textClone.___nodeValue).to.equal('Hello World');
+ expect(text.___nodeValue).to.equal("Hello World");
+ expect(textClone.___nodeValue).to.equal("Hello World");
return text;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/cloneNode/index.js b/test/vdom-create/fixtures/cloneNode/index.js
index 16fc98fb7..2763f743f 100644
--- a/test/vdom-create/fixtures/cloneNode/index.js
+++ b/test/vdom-create/fixtures/cloneNode/index.js
@@ -1,31 +1,56 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var SVG_FLAGS = 1; // SVG
- var el = helpers.vdom.createElement('div', {
- 'class': 'foo',
- 'onclick': 'doSomething()'
- }, null, null, 1 /* childCount */).e('svg', {
- width: '100',
- height: '100'
- }, null, null, 1, SVG_FLAGS, null).e('circle', {
- 'cx': '50',
- 'cy': '50',
- 'r': '40',
- 'stroke': 'green',
- 'stroke-width': '4',
- 'fill': 'yellow',
- 'xlink:href': 'http://ebay.com/'
- }, null, null, 0, SVG_FLAGS, null);
+ var el = helpers.vdom
+ .createElement(
+ "div",
+ {
+ class: "foo",
+ onclick: "doSomething()"
+ },
+ null,
+ null,
+ 1 /* childCount */
+ )
+ .e(
+ "svg",
+ {
+ width: "100",
+ height: "100"
+ },
+ null,
+ null,
+ 1,
+ SVG_FLAGS,
+ null
+ )
+ .e(
+ "circle",
+ {
+ cx: "50",
+ cy: "50",
+ r: "40",
+ stroke: "green",
+ "stroke-width": "4",
+ fill: "yellow",
+ "xlink:href": "http://ebay.com/"
+ },
+ null,
+ null,
+ 0,
+ SVG_FLAGS,
+ null
+ );
var clone = el.___cloneNode();
expect(clone).to.not.equal(el);
- expect(clone.___nodeName).to.equal('div');
- expect(clone.___hasAttribute('class')).to.equal(true);
+ expect(clone.___nodeName).to.equal("div");
+ expect(clone.___hasAttribute("class")).to.equal(true);
expect(clone.firstChild).to.equal(el.firstChild);
- var root = helpers.vdom.createElement('div', { class: 'root' });
+ var root = helpers.vdom.createElement("div", { class: "root" });
root.___appendChild(clone);
@@ -33,4 +58,4 @@ module.exports = function (helpers) {
expect(clone.___parentNode).to.equal(root);
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/comment/index.js b/test/vdom-create/fixtures/comment/index.js
index 3e1ec368d..b4d1bd650 100644
--- a/test/vdom-create/fixtures/comment/index.js
+++ b/test/vdom-create/fixtures/comment/index.js
@@ -1,6 +1,14 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', {
- class: 'foo',
- onclick: 'doSomething()'
- }, 1 /* childCount */).e('span', { class: 'bar' }, 1).c('This is a comment').e('p', 0, 0);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement(
+ "div",
+ {
+ class: "foo",
+ onclick: "doSomething()"
+ },
+ 1 /* childCount */
+ )
+ .e("span", { class: "bar" }, 1)
+ .c("This is a comment")
+ .e("p", 0, 0);
+};
diff --git a/test/vdom-create/fixtures/createAttributes/index.js b/test/vdom-create/fixtures/createAttributes/index.js
index 21efb372d..3e1405432 100644
--- a/test/vdom-create/fixtures/createAttributes/index.js
+++ b/test/vdom-create/fixtures/createAttributes/index.js
@@ -1,14 +1,25 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var attributes = {
- id: 'link',
- href: 'http://ebay.com'
+ id: "link",
+ href: "http://ebay.com"
};
- var el = helpers.vdom.createElement('div', null, null /* key */, null /* component */, 2 /* childCount */).e('span', null, null /* key */, null /* component */, 1).e('a', attributes, null /* key */, null /* component */, 1).t('eBay').e('footer', null, null /* key */, null /* component */, 0);
+ var el = helpers.vdom
+ .createElement(
+ "div",
+ null,
+ null /* key */,
+ null /* component */,
+ 2 /* childCount */
+ )
+ .e("span", null, null /* key */, null /* component */, 1)
+ .e("a", attributes, null /* key */, null /* component */, 1)
+ .t("eBay")
+ .e("footer", null, null /* key */, null /* component */, 0);
- expect(el.___firstChild.___firstChild.___attributes.id).to.equal('link');
+ expect(el.___firstChild.___firstChild.___attributes.id).to.equal("link");
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/deeply-nested-element-2/index.js b/test/vdom-create/fixtures/deeply-nested-element-2/index.js
index 33d837710..f82e1b029 100644
--- a/test/vdom-create/fixtures/deeply-nested-element-2/index.js
+++ b/test/vdom-create/fixtures/deeply-nested-element-2/index.js
@@ -1,3 +1,7 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', 0 /* attrCount */, 2 /* childCount */).e('span', null, 1).e('p', null, 1).e('a', null, 0);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement("div", 0 /* attrCount */, 2 /* childCount */)
+ .e("span", null, 1)
+ .e("p", null, 1)
+ .e("a", null, 0);
+};
diff --git a/test/vdom-create/fixtures/deeply-nested-element/index.js b/test/vdom-create/fixtures/deeply-nested-element/index.js
index 54ef8503e..34afebd88 100644
--- a/test/vdom-create/fixtures/deeply-nested-element/index.js
+++ b/test/vdom-create/fixtures/deeply-nested-element/index.js
@@ -1,3 +1,7 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', 0 /* attrCount */, 2 /* childCount */).e('span', null, 1).e('p', null, 0).e('a', null, 0);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement("div", 0 /* attrCount */, 2 /* childCount */)
+ .e("span", null, 1)
+ .e("p", null, 0)
+ .e("a", null, 0);
+};
diff --git a/test/vdom-create/fixtures/doc-fragment-child-with-sibling/index.js b/test/vdom-create/fixtures/doc-fragment-child-with-sibling/index.js
index e8c15bafe..23277d4ae 100644
--- a/test/vdom-create/fixtures/doc-fragment-child-with-sibling/index.js
+++ b/test/vdom-create/fixtures/doc-fragment-child-with-sibling/index.js
@@ -1,20 +1,22 @@
-module.exports = function (helpers) {
- var root = helpers.vdom.createElement('div', { class: 'root' });
+module.exports = function(helpers) {
+ var root = helpers.vdom.createElement("div", { class: "root" });
var docFragment = helpers.vdom.createDocumentFragment();
- var div1 = helpers.vdom.createElement('div', {
- class: 'foo1',
- onclick: 'doSomething()'
+ var div1 = helpers.vdom.createElement("div", {
+ class: "foo1",
+ onclick: "doSomething()"
});
- var div2 = helpers.vdom.createElement('div', { class: 'foo2' });
+ var div2 = helpers.vdom.createElement("div", { class: "foo2" });
docFragment.___appendChild(div1);
docFragment.___appendChild(div2);
root.___appendChild(docFragment);
- root.___appendChild(helpers.vdom.createElement('div', { class: 'sibling' }));
+ root.___appendChild(
+ helpers.vdom.createElement("div", { class: "sibling" })
+ );
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/doc-fragment-child/index.js b/test/vdom-create/fixtures/doc-fragment-child/index.js
index 5e467b806..0797e16dc 100644
--- a/test/vdom-create/fixtures/doc-fragment-child/index.js
+++ b/test/vdom-create/fixtures/doc-fragment-child/index.js
@@ -1,15 +1,15 @@
-module.exports = function (helpers) {
- var root = helpers.vdom.createElement('div', { class: 'root' });
+module.exports = function(helpers) {
+ var root = helpers.vdom.createElement("div", { class: "root" });
var docFragment = helpers.vdom.createDocumentFragment();
- var div1 = helpers.vdom.createElement('div', {
- class: 'foo1',
- onclick: 'doSomething()'
+ var div1 = helpers.vdom.createElement("div", {
+ class: "foo1",
+ onclick: "doSomething()"
});
- var div2 = helpers.vdom.createElement('div', {
- class: 'foo2'
+ var div2 = helpers.vdom.createElement("div", {
+ class: "foo2"
});
docFragment.___appendChild(div1);
@@ -18,4 +18,4 @@ module.exports = function (helpers) {
root.___appendChild(docFragment);
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/doc-fragment-deeply-nested-empty/index.js b/test/vdom-create/fixtures/doc-fragment-deeply-nested-empty/index.js
index cba639e0b..5350f7b98 100644
--- a/test/vdom-create/fixtures/doc-fragment-deeply-nested-empty/index.js
+++ b/test/vdom-create/fixtures/doc-fragment-deeply-nested-empty/index.js
@@ -1,4 +1,4 @@
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var root = helpers.vdom.createDocumentFragment();
var docFragmentA = helpers.vdom.createDocumentFragment();
@@ -11,11 +11,11 @@ module.exports = function (helpers) {
var docFragmentBB = helpers.vdom.createDocumentFragment();
docFragmentB.___appendChild(docFragmentBB);
- docFragmentBB.___appendChild(helpers.vdom.createText('bb1'));
- docFragmentBB.___appendChild(helpers.vdom.createText('bb2'));
+ docFragmentBB.___appendChild(helpers.vdom.createText("bb1"));
+ docFragmentBB.___appendChild(helpers.vdom.createText("bb2"));
root.___appendChild(docFragmentA);
root.___appendChild(docFragmentB);
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/doc-fragment-deeply-nested-text/index.js b/test/vdom-create/fixtures/doc-fragment-deeply-nested-text/index.js
index 5cdce699d..bf2cc8466 100644
--- a/test/vdom-create/fixtures/doc-fragment-deeply-nested-text/index.js
+++ b/test/vdom-create/fixtures/doc-fragment-deeply-nested-text/index.js
@@ -1,4 +1,4 @@
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var root = helpers.vdom.createDocumentFragment();
var docFragmentA = helpers.vdom.createDocumentFragment();
@@ -6,19 +6,19 @@ module.exports = function (helpers) {
var docFragmentAA = helpers.vdom.createDocumentFragment();
docFragmentA.___appendChild(docFragmentAA);
- docFragmentAA.___appendChild(helpers.vdom.createText('aa1'));
- docFragmentAA.___appendChild(helpers.vdom.createText('aa2'));
+ docFragmentAA.___appendChild(helpers.vdom.createText("aa1"));
+ docFragmentAA.___appendChild(helpers.vdom.createText("aa2"));
var docFragmentB = helpers.vdom.createDocumentFragment();
var docFragmentBB = helpers.vdom.createDocumentFragment();
docFragmentB.___appendChild(docFragmentBB);
- docFragmentBB.___appendChild(helpers.vdom.createText('bb1'));
- docFragmentBB.___appendChild(helpers.vdom.createText('bb2'));
+ docFragmentBB.___appendChild(helpers.vdom.createText("bb1"));
+ docFragmentBB.___appendChild(helpers.vdom.createText("bb2"));
root.___appendChild(docFragmentA);
root.___appendChild(docFragmentB);
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/doc-fragment-deeply-nested/index.js b/test/vdom-create/fixtures/doc-fragment-deeply-nested/index.js
index 9359bb99f..975955f62 100644
--- a/test/vdom-create/fixtures/doc-fragment-deeply-nested/index.js
+++ b/test/vdom-create/fixtures/doc-fragment-deeply-nested/index.js
@@ -1,4 +1,4 @@
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var root = helpers.vdom.createDocumentFragment();
var docFragmentA = helpers.vdom.createDocumentFragment();
@@ -6,15 +6,23 @@ module.exports = function (helpers) {
var docFragmentAA = helpers.vdom.createDocumentFragment();
docFragmentA.___appendChild(docFragmentAA);
- docFragmentAA.___appendChild(helpers.vdom.createElement('div', { class: 'aa1' }));
- docFragmentAA.___appendChild(helpers.vdom.createElement('div', { class: 'aa2' }));
+ docFragmentAA.___appendChild(
+ helpers.vdom.createElement("div", { class: "aa1" })
+ );
+ docFragmentAA.___appendChild(
+ helpers.vdom.createElement("div", { class: "aa2" })
+ );
var docFragmentB = helpers.vdom.createDocumentFragment();
- docFragmentB.___appendChild(helpers.vdom.createElement('div', { class: 'b1' }));
- docFragmentB.___appendChild(helpers.vdom.createElement('div', { class: 'b2' }));
+ docFragmentB.___appendChild(
+ helpers.vdom.createElement("div", { class: "b1" })
+ );
+ docFragmentB.___appendChild(
+ helpers.vdom.createElement("div", { class: "b2" })
+ );
root.___appendChild(docFragmentA);
root.___appendChild(docFragmentB);
return root;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-empty-string/index.js b/test/vdom-create/fixtures/hasAttributeNS-empty-string/index.js
index b44d7b0ab..6a782ce33 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-empty-string/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-empty-string/index.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: '' });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", { selected: "" });
- expect(virtualEl.___hasAttribute('selected')).to.equal(true);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(true);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-false/index.js b/test/vdom-create/fixtures/hasAttributeNS-false/index.js
index 2587aa63e..658b7fd6d 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-false/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-false/index.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: false });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", { selected: false });
- expect(virtualEl.___hasAttribute('selected')).to.equal(false);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(false);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-null/index.js b/test/vdom-create/fixtures/hasAttributeNS-null/index.js
index b75c608ce..a99e5d6bc 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-null/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-null/index.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: null });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", { selected: null });
- expect(virtualEl.___hasAttribute('selected')).to.equal(false);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(false);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-number-zero/index.js b/test/vdom-create/fixtures/hasAttributeNS-number-zero/index.js
index 84a2bcd92..c2c2a6ff4 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-number-zero/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-number-zero/index.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: 0 });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", { selected: 0 });
- expect(virtualEl.___hasAttribute('selected')).to.equal(true);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(true);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-number/index.js b/test/vdom-create/fixtures/hasAttributeNS-number/index.js
index cdc4ac69a..8ebba96aa 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-number/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-number/index.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: 1 });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", { selected: 1 });
- expect(virtualEl.___hasAttribute('selected')).to.equal(true);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(true);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-true/index.js b/test/vdom-create/fixtures/hasAttributeNS-true/index.js
index 22fe02c2c..dfa0aa7fc 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-true/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-true/index.js
@@ -1,9 +1,9 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: true });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", { selected: true });
- expect(virtualEl.___hasAttribute('selected')).to.equal(true);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(true);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/hasAttributeNS-undefined/index.js b/test/vdom-create/fixtures/hasAttributeNS-undefined/index.js
index 5aa4ad904..f0c3c02fe 100644
--- a/test/vdom-create/fixtures/hasAttributeNS-undefined/index.js
+++ b/test/vdom-create/fixtures/hasAttributeNS-undefined/index.js
@@ -1,9 +1,11 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var virtualEl = helpers.vdom.createElement('option', { selected: undefined });
+module.exports = function(helpers) {
+ var virtualEl = helpers.vdom.createElement("option", {
+ selected: undefined
+ });
- expect(virtualEl.___hasAttribute('selected')).to.equal(false);
+ expect(virtualEl.___hasAttribute("selected")).to.equal(false);
return virtualEl;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/id/index.js b/test/vdom-create/fixtures/id/index.js
index 7ea784c20..81e1bbd94 100644
--- a/test/vdom-create/fixtures/id/index.js
+++ b/test/vdom-create/fixtures/id/index.js
@@ -1,7 +1,13 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var el = helpers.vdom.createElement('input', { id: 'foo' }, null /* key */, null /* component */, 0 /* childCount */);
- expect(el.___attributes.id).to.equal('foo');
+module.exports = function(helpers) {
+ var el = helpers.vdom.createElement(
+ "input",
+ { id: "foo" },
+ null /* key */,
+ null /* component */,
+ 0 /* childCount */
+ );
+ expect(el.___attributes.id).to.equal("foo");
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/input-checked/index.js b/test/vdom-create/fixtures/input-checked/index.js
index 204a4e79b..995c37d4e 100644
--- a/test/vdom-create/fixtures/input-checked/index.js
+++ b/test/vdom-create/fixtures/input-checked/index.js
@@ -1,8 +1,12 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var el = helpers.vdom.createElement('input', { type: 'checkbox', checked: true }, 0 /* childCount */);
+module.exports = function(helpers) {
+ var el = helpers.vdom.createElement(
+ "input",
+ { type: "checkbox", checked: true },
+ 0 /* childCount */
+ );
expect(el.checked).to.equal(true);
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/input-disabled/index.js b/test/vdom-create/fixtures/input-disabled/index.js
index 556aa8909..cd99efb0f 100644
--- a/test/vdom-create/fixtures/input-disabled/index.js
+++ b/test/vdom-create/fixtures/input-disabled/index.js
@@ -1,8 +1,12 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var el = helpers.vdom.createElement('input', { disabled: 'disabled' }, 0 /* childCount */);
+module.exports = function(helpers) {
+ var el = helpers.vdom.createElement(
+ "input",
+ { disabled: "disabled" },
+ 0 /* childCount */
+ );
expect(el.disabled).to.equal(true);
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/input-value/index.js b/test/vdom-create/fixtures/input-value/index.js
index 759a4d863..d7ed21ed2 100644
--- a/test/vdom-create/fixtures/input-value/index.js
+++ b/test/vdom-create/fixtures/input-value/index.js
@@ -1,8 +1,14 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var el = helpers.vdom.createElement('input', { value: 'foo' }, null /* key */, null /* component */, 0 /* childCount */);
+module.exports = function(helpers) {
+ var el = helpers.vdom.createElement(
+ "input",
+ { value: "foo" },
+ null /* key */,
+ null /* component */,
+ 0 /* childCount */
+ );
- expect(el.___value).to.equal('foo');
+ expect(el.___value).to.equal("foo");
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/isSameNode-createElement/index.js b/test/vdom-create/fixtures/isSameNode-createElement/index.js
index 3a6ed96f7..2d7c80ad7 100644
--- a/test/vdom-create/fixtures/isSameNode-createElement/index.js
+++ b/test/vdom-create/fixtures/isSameNode-createElement/index.js
@@ -1,4 +1,4 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
function isSameNode(virtualEl, realEl) {
var vFromEl = realEl.___markoVElement;
@@ -10,9 +10,23 @@ function isSameNode(virtualEl, realEl) {
return false;
}
-module.exports = function (helpers) {
- var div = helpers.vdom.createElement('div', null, null /* key */, null /* component */, 0 /* childCount */, null, { i: 'abc123' /* key */ });
- var span = helpers.vdom.createElement('span', null, null /* key */, null /* component */, 0 /* childCount */);
+module.exports = function(helpers) {
+ var div = helpers.vdom.createElement(
+ "div",
+ null,
+ null /* key */,
+ null /* component */,
+ 0 /* childCount */,
+ null,
+ { i: "abc123" /* key */ }
+ );
+ var span = helpers.vdom.createElement(
+ "span",
+ null,
+ null /* key */,
+ null /* component */,
+ 0 /* childCount */
+ );
var divClone = div.___cloneNode();
// expect(div.___isSameNode(divClone)).to.equal(true);
@@ -30,4 +44,4 @@ module.exports = function (helpers) {
expect(isSameNode(div, realSpan)).to.equal(false);
return div;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/no-children/index.js b/test/vdom-create/fixtures/no-children/index.js
index ead626235..96c614569 100644
--- a/test/vdom-create/fixtures/no-children/index.js
+++ b/test/vdom-create/fixtures/no-children/index.js
@@ -1,3 +1,7 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', { class: 'foo', onclick: 'doSomething()' }, 0 /* childCount */);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom.createElement(
+ "div",
+ { class: "foo", onclick: "doSomething()" },
+ 0 /* childCount */
+ );
+};
diff --git a/test/vdom-create/fixtures/one-child-element/index.js b/test/vdom-create/fixtures/one-child-element/index.js
index 9129ef90b..522c51605 100644
--- a/test/vdom-create/fixtures/one-child-element/index.js
+++ b/test/vdom-create/fixtures/one-child-element/index.js
@@ -1,3 +1,5 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', { class: 'foo' }, 1 /* childCount */).e('span', { class: 'bar' }, 0);
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement("div", { class: "foo" }, 1 /* childCount */)
+ .e("span", { class: "bar" }, 0);
+};
diff --git a/test/vdom-create/fixtures/one-child-text/index.js b/test/vdom-create/fixtures/one-child-text/index.js
index 31f86020f..2af1b7a0d 100644
--- a/test/vdom-create/fixtures/one-child-text/index.js
+++ b/test/vdom-create/fixtures/one-child-text/index.js
@@ -1,3 +1,5 @@
-module.exports = function (helpers) {
- return helpers.vdom.createElement('div', { class: 'foo' }, 1 /* childCount */).t('Hello World!');
-};
\ No newline at end of file
+module.exports = function(helpers) {
+ return helpers.vdom
+ .createElement("div", { class: "foo" }, 1 /* childCount */)
+ .t("Hello World!");
+};
diff --git a/test/vdom-create/fixtures/option-selected/index.js b/test/vdom-create/fixtures/option-selected/index.js
index 0a694702c..9c3700b56 100644
--- a/test/vdom-create/fixtures/option-selected/index.js
+++ b/test/vdom-create/fixtures/option-selected/index.js
@@ -1,7 +1,11 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var el = helpers.vdom.createElement('option', { 'selected': '' }, 0 /* childCount */);
+module.exports = function(helpers) {
+ var el = helpers.vdom.createElement(
+ "option",
+ { selected: "" },
+ 0 /* childCount */
+ );
expect(el.selected).to.equal(true);
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/static-tree-svg/index.js b/test/vdom-create/fixtures/static-tree-svg/index.js
index 8a1827ffa..6dcc91014 100644
--- a/test/vdom-create/fixtures/static-tree-svg/index.js
+++ b/test/vdom-create/fixtures/static-tree-svg/index.js
@@ -1,15 +1,38 @@
-module.exports = function (helpers) {
-
+module.exports = function(helpers) {
var FLAGS = 1; // SVG
- var linearGradient = helpers.vdom.createElement('linearGradient', { x1: "0%", y1: "0%", x2: "100%", y2: "0%" }, null, FLAGS);
+ var linearGradient = helpers.vdom.createElement(
+ "linearGradient",
+ { x1: "0%", y1: "0%", x2: "100%", y2: "0%" },
+ null,
+ FLAGS
+ );
- linearGradient.___appendChild(helpers.vdom.createElement('stop', { offset: "0%", style: "stop-color:rgb(255,255,0);stop-opacity:1" }, null, FLAGS));
+ linearGradient.___appendChild(
+ helpers.vdom.createElement(
+ "stop",
+ { offset: "0%", style: "stop-color:rgb(255,255,0);stop-opacity:1" },
+ null,
+ FLAGS
+ )
+ );
- linearGradient.___appendChild(helpers.vdom.createElement('stop', { offset: "100%", style: "stop-color:rgb(255,0,0);stop-opacity:1" }, null, FLAGS));
+ linearGradient.___appendChild(
+ helpers.vdom.createElement(
+ "stop",
+ { offset: "100%", style: "stop-color:rgb(255,0,0);stop-opacity:1" },
+ null,
+ FLAGS
+ )
+ );
- var svg = helpers.vdom.createElement('svg', { height: "150", width: "400" }, null, FLAGS);
+ var svg = helpers.vdom.createElement(
+ "svg",
+ { height: "150", width: "400" },
+ null,
+ FLAGS
+ );
svg.___appendChild(linearGradient);
return svg;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/static-tree/index.js b/test/vdom-create/fixtures/static-tree/index.js
index 300fc50a7..1e23f8f5d 100644
--- a/test/vdom-create/fixtures/static-tree/index.js
+++ b/test/vdom-create/fixtures/static-tree/index.js
@@ -1,9 +1,26 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
- var link = helpers.vdom.createElement('a', { 'href': 'http://ebay.com' }, null /* key */, null /* component */, 1 /* childCount */).t('eBay');
+module.exports = function(helpers) {
+ var link = helpers.vdom
+ .createElement(
+ "a",
+ { href: "http://ebay.com" },
+ null /* key */,
+ null /* component */,
+ 1 /* childCount */
+ )
+ .t("eBay");
- var el = helpers.vdom.createElement('div', { 'class': 'foo', 'onclick': 'doSomething()' }, null /* key */, null /* component */, 2 /* childCount */).n(link).e('span', null, null /* key */, null /* component */, 0);
+ var el = helpers.vdom
+ .createElement(
+ "div",
+ { class: "foo", onclick: "doSomething()" },
+ null /* key */,
+ null /* component */,
+ 2 /* childCount */
+ )
+ .n(link)
+ .e("span", null, null /* key */, null /* component */, 0);
var linkClone = el.___firstChild;
@@ -11,8 +28,8 @@ module.exports = function (helpers) {
expect(link.___parentNode).to.equal(null);
expect(link.___nextSibling).to.equal(null);
- expect(linkClone.___nextSibling.___nodeName).to.equal('span');
- expect(linkClone.___parentNode.___nodeName).to.equal('div');
+ expect(linkClone.___nextSibling.___nodeName).to.equal("span");
+ expect(linkClone.___parentNode.___nodeName).to.equal("div");
return el;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/svg-dynamic/index.js b/test/vdom-create/fixtures/svg-dynamic/index.js
index e1a8b3bd1..055ebdab1 100644
--- a/test/vdom-create/fixtures/svg-dynamic/index.js
+++ b/test/vdom-create/fixtures/svg-dynamic/index.js
@@ -1,14 +1,33 @@
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var FLAGS = 1;
- return helpers.vdom.createElement('div', { class: 'foo', onclick: 'doSomething()' }, 1 /* childCount */).ed('svg', { width: '100', height: '100', xmlns: 'http://www.w3.org/2000/svg' }, 1) //NO SVG FLAG, from xmlns
- .e('circle', {
- 'cx': '50',
- 'cy': '50',
- 'r': '40',
- 'stroke': 'green',
- 'stroke-width': '4',
- 'fill': 'yellow',
- 'xlink:href': 'http://ebay.com/'
- }, 0, FLAGS);
-};
\ No newline at end of file
+ return helpers.vdom
+ .createElement(
+ "div",
+ { class: "foo", onclick: "doSomething()" },
+ 1 /* childCount */
+ )
+ .ed(
+ "svg",
+ {
+ width: "100",
+ height: "100",
+ xmlns: "http://www.w3.org/2000/svg"
+ },
+ 1
+ ) //NO SVG FLAG, from xmlns
+ .e(
+ "circle",
+ {
+ cx: "50",
+ cy: "50",
+ r: "40",
+ stroke: "green",
+ "stroke-width": "4",
+ fill: "yellow",
+ "xlink:href": "http://ebay.com/"
+ },
+ 0,
+ FLAGS
+ );
+};
diff --git a/test/vdom-create/fixtures/svg/index.js b/test/vdom-create/fixtures/svg/index.js
index 5170748a1..2f2234bd1 100644
--- a/test/vdom-create/fixtures/svg/index.js
+++ b/test/vdom-create/fixtures/svg/index.js
@@ -1,13 +1,25 @@
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var FLAGS = 1;
- return helpers.vdom.createElement('div', { class: 'foo', onclick: 'doSomething()' }, 1 /* childCount */).e('svg', { width: '100', height: '100' }, 1, FLAGS).e('circle', {
- 'cx': '50',
- 'cy': '50',
- 'r': '40',
- 'stroke': 'green',
- 'stroke-width': '4',
- 'fill': 'yellow',
- 'xlink:href': 'http://ebay.com/'
- }, 0, FLAGS);
-};
\ No newline at end of file
+ return helpers.vdom
+ .createElement(
+ "div",
+ { class: "foo", onclick: "doSomething()" },
+ 1 /* childCount */
+ )
+ .e("svg", { width: "100", height: "100" }, 1, FLAGS)
+ .e(
+ "circle",
+ {
+ cx: "50",
+ cy: "50",
+ r: "40",
+ stroke: "green",
+ "stroke-width": "4",
+ fill: "yellow",
+ "xlink:href": "http://ebay.com/"
+ },
+ 0,
+ FLAGS
+ );
+};
diff --git a/test/vdom-create/fixtures/textarea-invalid-child/index.js b/test/vdom-create/fixtures/textarea-invalid-child/index.js
index 028546dfa..534e7807d 100644
--- a/test/vdom-create/fixtures/textarea-invalid-child/index.js
+++ b/test/vdom-create/fixtures/textarea-invalid-child/index.js
@@ -1,10 +1,20 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var TEXTAREA_FLAGS = 2;
- expect(function () {
- helpers.vdom.createElement('textarea', {}, null /* key */, null /* component */, 2 /* childCount */, TEXTAREA_FLAGS).e('div', {}, null /* key */, null /* component */, 0).t('bar');
- }).to.throw('');
+ expect(function() {
+ helpers.vdom
+ .createElement(
+ "textarea",
+ {},
+ null /* key */,
+ null /* component */,
+ 2 /* childCount */,
+ TEXTAREA_FLAGS
+ )
+ .e("div", {}, null /* key */, null /* component */, 0)
+ .t("bar");
+ }).to.throw("");
return null;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/fixtures/textarea/index.js b/test/vdom-create/fixtures/textarea/index.js
index 0c09535a3..629b708b9 100644
--- a/test/vdom-create/fixtures/textarea/index.js
+++ b/test/vdom-create/fixtures/textarea/index.js
@@ -1,11 +1,21 @@
-var expect = require('chai').expect;
+var expect = require("chai").expect;
-module.exports = function (helpers) {
+module.exports = function(helpers) {
var FLAGS = 2; // TEXTAREA
- var textarea = helpers.vdom.createElement('textarea', null, null /* key */, null /* component */, 2 /* childCount */, FLAGS).t('foo').t('bar');
+ var textarea = helpers.vdom
+ .createElement(
+ "textarea",
+ null,
+ null /* key */,
+ null /* component */,
+ 2 /* childCount */,
+ FLAGS
+ )
+ .t("foo")
+ .t("bar");
- expect(textarea.___value).to.equal('foobar');
+ expect(textarea.___value).to.equal("foobar");
return textarea;
-};
\ No newline at end of file
+};
diff --git a/test/vdom-create/index.test.js b/test/vdom-create/index.test.js
index 17c16f93b..3f4505205 100644
--- a/test/vdom-create/index.test.js
+++ b/test/vdom-create/index.test.js
@@ -1,48 +1,72 @@
-require('../__util__/test-init');
+require("../__util__/test-init");
-var path = require('path');
+var path = require("path");
-var fs = require('fs');
-var domToString = require('../__util__/domToString');
-var createJSDOMModule = require('../__util__/create-jsdom-module');
+var fs = require("fs");
+var domToString = require("../__util__/domToString");
+var createJSDOMModule = require("../__util__/create-jsdom-module");
-var document = createJSDOMModule({ dir: __dirname, html: '' }).window.document;
+var document = createJSDOMModule({
+ dir: __dirname,
+ html: ""
+}).window.document;
-var vdom = require('marko/runtime/vdom/vdom');
+var vdom = require("marko/runtime/vdom/vdom");
var VElement = vdom.___VElement;
var VText = vdom.___VText;
var VComment = vdom.___VComment;
var VDocumentFragment = vdom.___VDocumentFragment;
var vdomHelpers = {
- createElement: function (tagName, attrs, key, component, childCount, flags, props) {
- return new VElement(tagName, attrs, key, component, childCount, flags, props);
+ createElement: function(
+ tagName,
+ attrs,
+ key,
+ component,
+ childCount,
+ flags,
+ props
+ ) {
+ return new VElement(
+ tagName,
+ attrs,
+ key,
+ component,
+ childCount,
+ flags,
+ props
+ );
},
- createText: function (value) {
+ createText: function(value) {
return new VText(value);
},
- createComment: function (value) {
+ createComment: function(value) {
return new VComment(value);
},
- createDocumentFragment: function () {
+ createDocumentFragment: function() {
return new VDocumentFragment();
},
VElement: VElement,
virtualizeElement: VElement.___virtualize
};
-describe('vdom-create', () => {
- require('../autotest').scanDir(path.join(__dirname, './fixtures'), function (dir, helpers, done) {
+describe("vdom-create", () => {
+ require("../autotest").scanDir(path.join(__dirname, "./fixtures"), function(
+ dir,
+ helpers,
+ done
+ ) {
helpers.vdom = vdomHelpers;
helpers.document = document;
- var mainPath = path.join(dir, 'index.js');
+ var mainPath = path.join(dir, "index.js");
if (fs.existsSync(mainPath)) {
var main = require(mainPath);
var rootNode = main(helpers);
- var rootNodeHTML = rootNode != null ? domToString(rootNode) : '(null)';
- helpers.compare(rootNodeHTML, '.html');
+ var rootNodeHTML =
+ rootNode != null ? domToString(rootNode) : "(null)";
+ helpers.compare(rootNodeHTML, ".html");
}
done();
});
diff --git a/test/vdom-virtualize/index.test.js b/test/vdom-virtualize/index.test.js
index ceeef82da..56c3ca1dc 100644
--- a/test/vdom-virtualize/index.test.js
+++ b/test/vdom-virtualize/index.test.js
@@ -1,23 +1,33 @@
-require('../__util__/test-init');
-var path = require('path');
-var virtualize = require('marko/runtime/vdom/vdom').___virtualize;
-var fs = require('fs');
-var toHTML = require('../__util__/toHTML');
-var createJSDOMModule = require('../__util__/create-jsdom-module');
+require("../__util__/test-init");
+var path = require("path");
+var virtualize = require("marko/runtime/vdom/vdom").___virtualize;
+var fs = require("fs");
+var toHTML = require("../__util__/toHTML");
+var createJSDOMModule = require("../__util__/create-jsdom-module");
-describe('vdom-virtualize', () => {
- require('../autotest').scanDir(path.join(__dirname, './fixtures'), function (dir, helpers, done) {
+describe("vdom-virtualize", () => {
+ require("../autotest").scanDir(path.join(__dirname, "./fixtures"), function(
+ dir,
+ helpers,
+ done
+ ) {
helpers.virtualize = virtualize;
- var inputPath = path.join(dir, 'input.html');
+ var inputPath = path.join(dir, "input.html");
if (fs.existsSync(inputPath)) {
- var inputHtml = fs.readFileSync(inputPath, { encoding: 'utf8' });
-
- var document = createJSDOMModule({ dir: __dirname, html: '' + inputHtml + '' }).window.document;
+ var inputHtml = fs.readFileSync(inputPath, { encoding: "utf8" });
+
+ var document = createJSDOMModule({
+ dir: __dirname,
+ html: "" + inputHtml + ""
+ }).window.document;
var domNode = document.body.firstChild;
var vdomNode = virtualize(domNode);
var vdomHTML = toHTML(vdomNode);
- helpers.compare(vdomHTML, { suffix: '.html', prefix: 'virtualized-' });
+ helpers.compare(vdomHTML, {
+ suffix: ".html",
+ prefix: "virtualized-"
+ });
}
done();
});
diff --git a/test/walker/fixtures/remove-attrs/index.js b/test/walker/fixtures/remove-attrs/index.js
index 3078cbb51..3ed9088cf 100644
--- a/test/walker/fixtures/remove-attrs/index.js
+++ b/test/walker/fixtures/remove-attrs/index.js
@@ -1,6 +1,6 @@
-'use strict';
+"use strict";
-module.exports = function (compiler) {
+module.exports = function(compiler) {
let builder = compiler.createBuilder();
let text = builder.text;
@@ -10,29 +10,41 @@ module.exports = function (compiler) {
let literal = builder.literal;
let forEach = builder.forEach;
- let rootNode = templateRoot([htmlElement('ul', {
- 'class': literal('colors'),
- 'if': {
- argument: 'notEmpty(data.colors)'
- }
- }, [htmlElement('li', {
- 'class': literal('color'),
- 'for': {
- argument: 'color in data.colors'
- }
- }, [text('color')])])]);
+ let rootNode = templateRoot([
+ htmlElement(
+ "ul",
+ {
+ class: literal("colors"),
+ if: {
+ argument: "notEmpty(data.colors)"
+ }
+ },
+ [
+ htmlElement(
+ "li",
+ {
+ class: literal("color"),
+ for: {
+ argument: "color in data.colors"
+ }
+ },
+ [text("color")]
+ )
+ ]
+ )
+ ]);
let walker = compiler.createWalker({
enter(node) {
- if (node.type === 'HtmlElement') {
- if (node.hasAttribute('for')) {
- node.wrapWith(forEach('color', 'data.colors'));
- node.removeAttribute('for');
+ if (node.type === "HtmlElement") {
+ if (node.hasAttribute("for")) {
+ node.wrapWith(forEach("color", "data.colors"));
+ node.removeAttribute("for");
}
- if (node.hasAttribute('if')) {
- node.wrapWith(ifStatement('notEmpty(data.colors)'));
- node.removeAttribute('if');
+ if (node.hasAttribute("if")) {
+ node.wrapWith(ifStatement("notEmpty(data.colors)"));
+ node.removeAttribute("if");
}
}
}
@@ -41,4 +53,4 @@ module.exports = function (compiler) {
walker.walk(rootNode);
return rootNode;
-};
\ No newline at end of file
+};
diff --git a/test/walker/fixtures/remove-exit/index.js b/test/walker/fixtures/remove-exit/index.js
index 6ef19eea8..384b25bae 100644
--- a/test/walker/fixtures/remove-exit/index.js
+++ b/test/walker/fixtures/remove-exit/index.js
@@ -1,13 +1,19 @@
-'use strict';
+"use strict";
-module.exports = function (compiler) {
+module.exports = function(compiler) {
let builder = compiler.createBuilder();
- let rootNode = builder.templateRoot([builder.htmlElement('ul', null, [builder.htmlElement('li', null, [builder.text('a')]), builder.htmlElement('REMOVEME', null, [builder.text('b')]), builder.htmlElement('li', null, [builder.text('c')])])]);
+ let rootNode = builder.templateRoot([
+ builder.htmlElement("ul", null, [
+ builder.htmlElement("li", null, [builder.text("a")]),
+ builder.htmlElement("REMOVEME", null, [builder.text("b")]),
+ builder.htmlElement("li", null, [builder.text("c")])
+ ])
+ ]);
let walker = compiler.createWalker({
exit(node) {
- if (node.type === 'HtmlElement' && node.tagName === 'REMOVEME') {
+ if (node.type === "HtmlElement" && node.tagName === "REMOVEME") {
return null;
}
}
@@ -16,4 +22,4 @@ module.exports = function (compiler) {
walker.walk(rootNode);
return rootNode;
-};
\ No newline at end of file
+};
diff --git a/test/walker/fixtures/remove-exit2/index.js b/test/walker/fixtures/remove-exit2/index.js
index 889dc7dd9..af2ef71e9 100644
--- a/test/walker/fixtures/remove-exit2/index.js
+++ b/test/walker/fixtures/remove-exit2/index.js
@@ -1,13 +1,19 @@
-'use strict';
+"use strict";
-module.exports = function (compiler) {
+module.exports = function(compiler) {
let builder = compiler.createBuilder();
- let rootNode = builder.templateRoot([builder.htmlElement('ul', null, [builder.htmlElement('li', null, [builder.text('a')]), builder.htmlElement('REMOVEME', null, [builder.text('b')]), builder.htmlElement('li', null, [builder.text('c')])])]);
+ let rootNode = builder.templateRoot([
+ builder.htmlElement("ul", null, [
+ builder.htmlElement("li", null, [builder.text("a")]),
+ builder.htmlElement("REMOVEME", null, [builder.text("b")]),
+ builder.htmlElement("li", null, [builder.text("c")])
+ ])
+ ]);
let walker = compiler.createWalker({
exit(node) {
- if (node.type === 'HtmlElement' && node.tagName === 'REMOVEME') {
+ if (node.type === "HtmlElement" && node.tagName === "REMOVEME") {
walker.remove();
}
}
@@ -16,4 +22,4 @@ module.exports = function (compiler) {
walker.walk(rootNode);
return rootNode;
-};
\ No newline at end of file
+};
diff --git a/test/walker/fixtures/remove/index.js b/test/walker/fixtures/remove/index.js
index ab1c80426..5bb242cf4 100644
--- a/test/walker/fixtures/remove/index.js
+++ b/test/walker/fixtures/remove/index.js
@@ -1,13 +1,19 @@
-'use strict';
+"use strict";
-module.exports = function (compiler) {
+module.exports = function(compiler) {
let builder = compiler.createBuilder();
- let rootNode = builder.templateRoot([builder.htmlElement('ul', null, [builder.htmlElement('li', null, [builder.text('a')]), builder.htmlElement('REMOVEME', null, [builder.text('b')]), builder.htmlElement('li', null, [builder.text('c')])])]);
+ let rootNode = builder.templateRoot([
+ builder.htmlElement("ul", null, [
+ builder.htmlElement("li", null, [builder.text("a")]),
+ builder.htmlElement("REMOVEME", null, [builder.text("b")]),
+ builder.htmlElement("li", null, [builder.text("c")])
+ ])
+ ]);
let walker = compiler.createWalker({
enter(node) {
- if (node.type === 'HtmlElement' && node.tagName === 'REMOVEME') {
+ if (node.type === "HtmlElement" && node.tagName === "REMOVEME") {
return null;
}
}
@@ -16,4 +22,4 @@ module.exports = function (compiler) {
walker.walk(rootNode);
return rootNode;
-};
\ No newline at end of file
+};
diff --git a/test/walker/fixtures/remove2/index.js b/test/walker/fixtures/remove2/index.js
index 1fa48d5fa..f19a85b41 100644
--- a/test/walker/fixtures/remove2/index.js
+++ b/test/walker/fixtures/remove2/index.js
@@ -1,13 +1,19 @@
-'use strict';
+"use strict";
-module.exports = function (compiler) {
+module.exports = function(compiler) {
let builder = compiler.createBuilder();
- let rootNode = builder.templateRoot([builder.htmlElement('ul', null, [builder.htmlElement('li', null, [builder.text('a')]), builder.htmlElement('REMOVEME', null, [builder.text('b')]), builder.htmlElement('li', null, [builder.text('c')])])]);
+ let rootNode = builder.templateRoot([
+ builder.htmlElement("ul", null, [
+ builder.htmlElement("li", null, [builder.text("a")]),
+ builder.htmlElement("REMOVEME", null, [builder.text("b")]),
+ builder.htmlElement("li", null, [builder.text("c")])
+ ])
+ ]);
let walker = compiler.createWalker({
enter(node) {
- if (node.type === 'HtmlElement' && node.tagName === 'REMOVEME') {
+ if (node.type === "HtmlElement" && node.tagName === "REMOVEME") {
walker.remove();
}
}
@@ -16,4 +22,4 @@ module.exports = function (compiler) {
walker.walk(rootNode);
return rootNode;
-};
\ No newline at end of file
+};
diff --git a/test/walker/fixtures/replace/index.js b/test/walker/fixtures/replace/index.js
index 7996d6cd9..54214b89e 100644
--- a/test/walker/fixtures/replace/index.js
+++ b/test/walker/fixtures/replace/index.js
@@ -1,17 +1,33 @@
-'use strict';
+"use strict";
-module.exports = function (compiler) {
+module.exports = function(compiler) {
let builder = compiler.createBuilder();
- let rootNode = builder.templateRoot([builder.htmlElement('ul', {
- 'class': 'escapeXml(data.foo)'
- }, [builder.htmlElement('li', {
- 'class': builder.literal('color')
- }, [builder.text('color')])])]);
+ let rootNode = builder.templateRoot([
+ builder.htmlElement(
+ "ul",
+ {
+ class: "escapeXml(data.foo)"
+ },
+ [
+ builder.htmlElement(
+ "li",
+ {
+ class: builder.literal("color")
+ },
+ [builder.text("color")]
+ )
+ ]
+ )
+ ]);
let walker = compiler.createWalker({
enter(node) {
- if (node.type === 'FunctionCall' && node.callee.type === 'Identifier' && node.callee.name === 'escapeXml') {
+ if (
+ node.type === "FunctionCall" &&
+ node.callee.type === "Identifier" &&
+ node.callee.name === "escapeXml"
+ ) {
return node.args[0];
}
}
@@ -20,4 +36,4 @@ module.exports = function (compiler) {
walker.walk(rootNode);
return rootNode;
-};
\ No newline at end of file
+};
diff --git a/test/walker/index.test.js b/test/walker/index.test.js
index 07b20fdb1..7f9ccc9d5 100644
--- a/test/walker/index.test.js
+++ b/test/walker/index.test.js
@@ -1,20 +1,20 @@
-'use strict';
+"use strict";
-require('../__util__/test-init');
+require("../__util__/test-init");
-var chai = require('chai');
+var chai = require("chai");
chai.config.includeStack = true;
-var path = require('path');
-var compiler = require('../../compiler');
-var autotest = require('../autotest');
+var path = require("path");
+var compiler = require("../../compiler");
+var autotest = require("../autotest");
-describe('compiler/walker', function () {
- var autoTestDir = path.join(__dirname, './fixtures');
+describe("compiler/walker", function() {
+ var autoTestDir = path.join(__dirname, "./fixtures");
- autotest.scanDir(autoTestDir, function run(dir, helpers, done) {
- var getAST = require(path.join(dir, 'index.js'));
- helpers.compare(getAST(compiler), '.json');
- return done();
- });
-});
\ No newline at end of file
+ autotest.scanDir(autoTestDir, function run(dir, helpers, done) {
+ var getAST = require(path.join(dir, "index.js"));
+ helpers.compare(getAST(compiler), ".json");
+ return done();
+ });
+});