forked from ember-cli/ember-try
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incorporate strategies for working alongside preprocessors.
Closes ember-cli#34.
- Loading branch information
Showing
21 changed files
with
241 additions
and
18 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
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
8 changes: 8 additions & 0 deletions
8
tests/dummy-less-addon/addon/components/less-addon-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,8 @@ | ||
import Ember from 'ember'; | ||
import layout from '../templates/components/less-addon-component'; | ||
import styles from '../styles/components/less-addon-component'; | ||
|
||
export default Ember.Component.extend({ | ||
layout, | ||
styles | ||
}); |
13 changes: 13 additions & 0 deletions
13
tests/dummy-less-addon/addon/styles/components/less-addon-component.less
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,13 @@ | ||
@value --addon-family from '../constants'; | ||
|
||
/* | ||
TODO use mixin when postcss-modules-local-by-default#60 is available | ||
.local-less-mixin() { | ||
font-family: --addon-family; | ||
} | ||
*/ | ||
|
||
.component-class { | ||
font-family: --addon-family; | ||
// .local-less-mixin; | ||
} |
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 @@ | ||
@value --addon-family: 'less-addon-component'; |
1 change: 1 addition & 0 deletions
1
tests/dummy-less-addon/addon/templates/components/less-addon-component.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 @@ | ||
<div class="{{styles.component-class}}" data-test-element>less addon component</div> |
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 @@ | ||
export { default } from 'dummy-less-addon/components/less-addon-component'; |
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,27 @@ | ||
var generateScopedName = require('../../lib/generate-scoped-name'); | ||
|
||
/*jshint node:true*/ | ||
module.exports = { | ||
name: 'dummy-less-addon', | ||
|
||
options: { | ||
cssModules: { | ||
extension: 'less', | ||
intermediateOutputPath: 'addon.less', | ||
postcssOptions: { | ||
syntax: require('postcss-less') | ||
}, | ||
generateScopedName: function(className, modulePath) { | ||
return '_less_addon' + generateScopedName(className, modulePath); | ||
} | ||
} | ||
}, | ||
|
||
hintingEnabled: function() { | ||
return false; | ||
}, | ||
|
||
isDevelopingAddon: function() { | ||
return true; | ||
} | ||
}; |
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 @@ | ||
{ | ||
"name": "dummy-less-addon", | ||
"private": true, | ||
"keywords": [ | ||
"ember-addon" | ||
], | ||
"ember-addon": { | ||
"paths": [ | ||
"../..", | ||
"../../node_modules/ember-cli-babel", | ||
"../../node_modules/ember-cli-htmlbars" | ||
] | ||
}, | ||
"dependencies": { | ||
"ember-cli-less": "^1.5.3", | ||
"postcss-less": "^0.12.0" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/dummy-sass-addon/addon/components/sass-addon-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,8 @@ | ||
import Ember from 'ember'; | ||
import layout from '../templates/components/sass-addon-component'; | ||
import styles from '../styles/components/sass-addon-component'; | ||
|
||
export default Ember.Component.extend({ | ||
layout, | ||
styles | ||
}); |
9 changes: 9 additions & 0 deletions
9
tests/dummy-sass-addon/addon/styles/components/sass-addon-component.scss
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 @@ | ||
@value --addon-family from '../constants'; | ||
|
||
@mixin sass-addon-component { | ||
font-family: --addon-family; | ||
} | ||
|
||
.component-class { | ||
@include sass-addon-component; | ||
} |
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 @@ | ||
@value --addon-family: 'sass-addon-component'; |
1 change: 1 addition & 0 deletions
1
tests/dummy-sass-addon/addon/templates/components/sass-addon-component.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 @@ | ||
<div class="{{styles.component-class}}" data-test-element>sass addon component</div> |
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 @@ | ||
export { default } from 'dummy-sass-addon/components/sass-addon-component'; |
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,27 @@ | ||
var generateScopedName = require('../../lib/generate-scoped-name'); | ||
|
||
/*jshint node:true*/ | ||
module.exports = { | ||
name: 'dummy-sass-addon', | ||
|
||
options: { | ||
cssModules: { | ||
extension: 'scss', | ||
intermediateOutputPath: 'addon.scss', | ||
postcssOptions: { | ||
syntax: require('postcss-scss') | ||
}, | ||
generateScopedName: function(className, modulePath) { | ||
return '_sass_addon' + generateScopedName(className, modulePath); | ||
} | ||
} | ||
}, | ||
|
||
hintingEnabled: function() { | ||
return false; | ||
}, | ||
|
||
isDevelopingAddon: function() { | ||
return true; | ||
} | ||
}; |
Oops, something went wrong.