-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added parser for [bublé](https://buble.surge.sh) as
buble
.
- Loading branch information
amarcruz
committed
Aug 26, 2016
1 parent
0ce5dfb
commit 77050ad
Showing
8 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
bublé 0.13.x JS plugin. | ||
Part of the riot-compiler, license MIT | ||
History | ||
------- | ||
2016-08-26: Initital release | ||
*/ | ||
var | ||
mixobj = require('./_utils').mixobj, | ||
parser = require('buble') | ||
|
||
module.exports = function _buble (js, opts, url) { | ||
|
||
opts = mixobj({ source: url }, opts) | ||
|
||
return parser.transform(js, opts).code | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
riot.tag2('buble', '<h3>{test}</h3>', '', '', function(opts) { | ||
|
||
var this$1 = this; | ||
|
||
this.parser = 'Buble' | ||
|
||
var type = 'JavaScript' | ||
this.test = "This is " + type + " with " + (this.parser) | ||
|
||
this.on('mount', function () { | ||
this$1.parser = 'bublé' | ||
}) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
<buble> | ||
|
||
<h3>{ test }</h3> | ||
|
||
this.parser = 'Buble' | ||
|
||
const type = 'JavaScript' | ||
this.test = `This is ${ type } with ${ this.parser }` | ||
|
||
this.on('mount', () => { | ||
this.parser = 'bublé' | ||
}) | ||
|
||
</buble> |