Skip to content

Commit

Permalink
Merge pull request #1628 from mkszepp/fix-theme-export
Browse files Browse the repository at this point in the history
Fix theme export for SCSS/LESS & fix primary less file
  • Loading branch information
mkszepp authored Jan 4, 2024
2 parents 2327758 + 2ed7e90 commit ac361b5
Show file tree
Hide file tree
Showing 15 changed files with 955 additions and 36 deletions.
8 changes: 8 additions & 0 deletions docs/app/templates/public-pages/docs/installation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
<CodeBlock @language="scss" @code={{snippet.source}} />
{{/let}}

<p>
If you are using LESS there is also necessary to register the <code>paths</code> in <code>lessOptions</code>
</p>

{{#let (get-code-snippet "installation-2.js") as |snippet|}}
<CodeBlock @language="js" @code={{snippet.source}} />
{{/let}}

<p>
This explicit import is needed because using css preprocessors like SASS and LESS allows you to
customize the appearance of ember-power-select using variables. This is easier and generates less
Expand Down
6 changes: 6 additions & 0 deletions docs/app/templates/snippets/installation-2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// ember-cli-build.js
let app = new EmberApp({
lessOptions: {
paths: ['node_modules/ember-basic-dropdown/', 'node_modules/ember-power-select/'],
},
});
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.2",
"ember-auto-import": "^2.6.3",
"ember-basic-dropdown": "8.0.0-beta.3",
"ember-basic-dropdown": "8.0.0-beta.4",
"ember-cli": "~5.4.1",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0",
Expand Down
5 changes: 0 additions & 5 deletions ember-power-select/_index.less

This file was deleted.

4 changes: 2 additions & 2 deletions ember-power-select/_index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import './scss/variables';
@import './scss/variables.scss';

@import 'ember-basic-dropdown/_index.scss';

@import './scss/base';
@import './scss/base.scss';
5 changes: 5 additions & 0 deletions ember-power-select/ember-power-select.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import './less/variables.less';

@import 'ember-basic-dropdown.less';

@import './less/base.less';
8 changes: 3 additions & 5 deletions ember-power-select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
"./scss/base.scss": "./scss/base.scss",
"./less/variables.less": "./less/variables.less",
"./scss/variables.scss": "./scss/variables.scss",
"./themes/bootstrap.less": "./less/themes/bootstrap.less",
"./themes/bootstrap.scss": "./scss/themes/bootstrap.scss",
"./themes/material.less": "./less/themes/material.less",
"./themes/material.scss": "./scss/themes/material.scss",
"./themes/*": "./themes/*",
"./vendor/*": "./vendor/*"
},
"typesVersions": {
Expand All @@ -52,6 +49,7 @@
"dist",
"less",
"scss",
"themes",
"vendor"
],
"scripts": {
Expand Down Expand Up @@ -142,7 +140,7 @@
"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0 || >=5.0.0",
"@ember/test-helpers": "^2.9.4 || ^3.2.1",
"ember-basic-dropdown": "8.0.0-beta.3"
"ember-basic-dropdown": "8.0.0-beta.4"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion ember-power-select/scss/bootstrap-complete.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import './themes/bootstrap';
@import './themes/bootstrap.scss';
@import '../_index.scss';
2 changes: 1 addition & 1 deletion ember-power-select/scss/material-complete.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import './themes/material';
@import './themes/material.scss';
@import '../_index.scss';
1 change: 1 addition & 0 deletions ember-power-select/themes/bootstrap.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../less/themes/bootstrap.less';
1 change: 1 addition & 0 deletions ember-power-select/themes/bootstrap.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../scss/themes/bootstrap.scss';
1 change: 1 addition & 0 deletions ember-power-select/themes/material.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../less/themes/material.less';
1 change: 1 addition & 0 deletions ember-power-select/themes/material.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../scss/themes/material.scss';
Loading

0 comments on commit ac361b5

Please sign in to comment.