Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move styles to addon tree #103

Merged
merged 2 commits into from
Apr 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $FreestyleBreakpoints: (
};

// Default Ember Freestyle Palette
$FreestyleGuide-color--primary: #0d47a1 !default;
$FreestyleGuide-color--primary: #00bcd4 !default;
$FreestyleGuide-color--accent: #ffc107 !default;
$FreestyleGuide-color--secondary: #b6b6b6 !default;
$FreestyleGuide-color--foreground: #212121 !default;
Expand Down
1 change: 0 additions & 1 deletion app/styles/app.scss

This file was deleted.

2 changes: 1 addition & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function(defaults) {
cascade: false
},
freestyle: {
snippetSearchPaths: ['tests/dummy/app', 'app/styles']
snippetSearchPaths: ['tests/dummy/app', 'addon/styles']
}
});

Expand Down
21 changes: 14 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,29 @@ module.exports = {
return ['app'];
},

treeForStyles: function(tree) {
tree = this._super.treeForStyles.apply(this, [tree]);
treeForAddonStyles: function() {
var addonStyles = new Funnel('addon/styles');

var highlightJsTree = new Funnel(unwatchedTree(path.dirname(require.resolve('highlight.js/package.json'))), {
srcDir: '/styles',
destDir: '/app/styles/ember-freestyle/highlight.js'
destDir: '/ember-freestyle/highlight.js',
files: [
'tomorrow-night.css',
'zenburn.css',
'hybrid.css',
'atelier-cave-dark.css',
'solarized-light.css',
'docco.css',
'monokai-sublime.css'
]
});
highlightJsTree = stew.rename(highlightJsTree, '.css', '.scss');

return mergeTrees([highlightJsTree, tree], {
overwrite: true
});
return mergeTrees([highlightJsTree, addonStyles]);
},

included: function(app, parentAddon) {
this._super.included(app);
this._super.included(arguments);

var target = app || parentAddon;
if (target.import) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"broccoli-writer": "^0.1.1",
"ember-cli-babel": "^6.0.0",
"ember-cli-htmlbars": "^1.3.0",
"ember-cli-sass": "6.1.2",
"ember-remarkable": "chrislopresto/ember-remarkable#highlightjs-css-compatibility-3.2.0",
"ember-runtime-enumerable-includes-polyfill": "^1.0.4",
"ember-truth-helpers": "^1.3.0",
Expand All @@ -47,7 +48,6 @@
"ember-cli-page-object": "1.4.0",
"ember-cli-qunit": "^4.0.0-beta.1",
"ember-cli-release": "v1.0.0-beta.2",
"ember-cli-sass": "5.3.1",
"ember-cli-sass-lint": "1.0.2",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
Expand Down
4 changes: 0 additions & 4 deletions tests/dummy/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
@import 'mixins';
@import 'palette';

@import 'ember-freestyle';

@import 'site';
@import 'components/all';

@import 'todo';
4 changes: 4 additions & 0 deletions tests/dummy/app/styles/reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ html {
box-sizing: border-box;
}

body {
font-family: sans-serif;
}

*,
*:before,
*:after {
Expand Down
6 changes: 0 additions & 6 deletions tests/dummy/app/styles/todo.scss

This file was deleted.