Adding type values to node extensions

These will be useful later
This commit is contained in:
Jeff Avallone 2014-12-02 20:10:56 -05:00
parent 1ffcd785f8
commit b9dd80a142
3 changed files with 5 additions and 0 deletions

View File

@ -2,4 +2,5 @@ import _ from 'lodash';
import Base from './base.js'; import Base from './base.js';
export default _.extend({}, Base, { export default _.extend({}, Base, {
type: 'match',
}); });

View File

@ -2,6 +2,8 @@ import _ from 'lodash';
import Base from './base.js'; import Base from './base.js';
export default _.extend({}, Base, { export default _.extend({}, Base, {
type: 'regexp',
render(container) { render(container) {
this.container = container; this.container = container;
this.contents = _.map(this.matches(), match => { this.contents = _.map(this.matches(), match => {

View File

@ -2,6 +2,8 @@ import _ from 'lodash';
import Base from './base.js'; import Base from './base.js';
export default _.extend({}, Base, { export default _.extend({}, Base, {
type: 'root',
render(container) { render(container) {
this.contents = container.group(); this.contents = container.group();