-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slashed components rendering and ignore issue fix
- Loading branch information
Showing
23 changed files
with
161 additions
and
6 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
9 changes: 9 additions & 0 deletions
9
tests/dummy/app/components/excluded-slashed-pod/inline-template/component.js
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,9 @@ | ||
import Component from '@ember/component'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
export default Component.extend({ | ||
layout: hbs` | ||
<p>Inline slashed pod component rendering test <span>{{myName}}</span><button>{{myName}}</button></p> | ||
`, | ||
myName: 'excluded-slashed-pod/inline-template' | ||
}); |
9 changes: 9 additions & 0 deletions
9
tests/dummy/app/components/excluded-slashed-pod/js-only/component.js
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,9 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
tagName: 'div', | ||
classNames: ['excluded-slashed-pod__js-only'], | ||
didRender() { | ||
this.element.innerHTML = '<button>excluded- JS-only component</button>'; | ||
} | ||
}); |
6 changes: 6 additions & 0 deletions
6
tests/dummy/app/components/excluded-slashed-pod/mixed-classic/component.js
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,6 @@ | ||
import Component from '@ember/component'; | ||
import layout from './template'; | ||
|
||
export default Component.extend({ | ||
layout | ||
}); |
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/components/excluded-slashed-pod/mixed-classic/template.hbs
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,2 @@ | ||
{{yield}} | ||
<button>This is excluded-slashed-pod/mixed-classic component</button> |
1 change: 1 addition & 0 deletions
1
tests/dummy/app/components/excluded-slashed-pod/template-only/template.hbs
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 @@ | ||
<button>This is excluded-slashed-pod/template-only component</button> |
9 changes: 9 additions & 0 deletions
9
tests/dummy/app/components/excluded-slashed/inline-template.js
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,9 @@ | ||
import Component from '@ember/component'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
export default Component.extend({ | ||
layout: hbs` | ||
<p>Inline slashed component rendering test <span>{{myName}}</span> <button>{{myName}}</button></p> | ||
`, | ||
myName: 'excluded-slashed/inline-template' | ||
}); |
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,8 @@ | ||
import Component from '@ember/component'; | ||
export default Component.extend({ | ||
tagName: 'div', | ||
classNames: ['excluded-slashed__js-only'], | ||
didRender() { | ||
this.element.innerHTML = '<button>JS-only component</button>'; | ||
} | ||
}); |
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,6 @@ | ||
import Component from '@ember/component'; | ||
import layout from '../../templates/components/slashed/mixed-classic'; | ||
|
||
export default Component.extend({ | ||
layout | ||
}); |
9 changes: 9 additions & 0 deletions
9
tests/dummy/app/components/slashed-pod/inline-template/component.js
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,9 @@ | ||
import Component from '@ember/component'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
export default Component.extend({ | ||
layout: hbs` | ||
<p>Inline slashed pod component rendering test <span>{{myName}}</span><button>{{myName}}</button></p> | ||
`, | ||
myName: 'slashed-pod/inline-template' | ||
}); |
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,9 @@ | ||
import Component from '@ember/component'; | ||
|
||
export default Component.extend({ | ||
tagName: 'div', | ||
classNames: ['slashed-pod__js-only'], | ||
didRender() { | ||
this.element.innerHTML = '<button>JS-only component</button>'; | ||
} | ||
}); |
6 changes: 6 additions & 0 deletions
6
tests/dummy/app/components/slashed-pod/mixed-classic/component.js
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,6 @@ | ||
import Component from '@ember/component'; | ||
import layout from './template'; | ||
|
||
export default Component.extend({ | ||
layout | ||
}); |
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/components/slashed-pod/mixed-classic/template.hbs
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,2 @@ | ||
{{yield}} | ||
<button>This is slashed-pod/mixed-classic component</button> |
1 change: 1 addition & 0 deletions
1
tests/dummy/app/components/slashed-pod/template-only/template.hbs
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 @@ | ||
<button>This is slashed-pod/template-only component</button> |
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,9 @@ | ||
import Component from '@ember/component'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
export default Component.extend({ | ||
layout: hbs` | ||
<p>Inline slashed component rendering test <span>{{myName}}</span> <button>{{myName}}</button></p> | ||
`, | ||
myName: 'slashed/inline-template' | ||
}); |
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,8 @@ | ||
import Component from '@ember/component'; | ||
export default Component.extend({ | ||
tagName: 'div', | ||
classNames: ['slashed-pod__js-only'], | ||
didRender() { | ||
this.element.innerHTML = '<button>JS-only component</button>'; | ||
} | ||
}); |
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,6 @@ | ||
import Component from '@ember/component'; | ||
import layout from '../../templates/components/slashed/mixed-classic'; | ||
|
||
export default Component.extend({ | ||
layout | ||
}); |
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 |
---|---|---|
@@ -1,4 +1,13 @@ | ||
import Resolver from 'ember-resolver'; | ||
import HotReloadMixin from 'ember-cli-hot-loader/mixins/hot-reload-resolver'; | ||
import Mixin from '@ember/object/mixin'; | ||
|
||
export default Resolver.extend(HotReloadMixin); | ||
const CustomHotReloadMixin = Mixin.create(HotReloadMixin, { | ||
shouldExcludeComponent({name}) { | ||
const excludedFromConfig = this._super(...arguments); | ||
const isSlashedComponent = name.startsWith('excluded-slashed'); | ||
return excludedFromConfig || isSlashedComponent; | ||
} | ||
}); | ||
|
||
export default Resolver.extend(CustomHotReloadMixin); |
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
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/templates/components/excluded-slashed/mixed-classic.hbs
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,2 @@ | ||
{{yield}} | ||
<button>This is excluded-slashed/mixed-classic component</button> |
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/templates/components/excluded-slashed/template-only.hbs
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,2 @@ | ||
{{yield}} | ||
<button>This is excluded-slashed/template-only component</button> |
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/templates/components/slashed/mixed-classic.hbs
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,2 @@ | ||
{{yield}} | ||
<button>This is slashed/mixed-classic component</button> |
2 changes: 2 additions & 0 deletions
2
tests/dummy/app/templates/components/slashed/template-only.hbs
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,2 @@ | ||
{{yield}} | ||
<button>This is slashed/template-only component</button> |