Refactor scss (#1397)

* refactor: 💡 upgrade sass and ember-cli-sass

* refactor: 💡 rose becomes dev dep of core

* refactor: 💡 migrate rose styles to rose/app/styles

* chore: 🤖 disable sass linting until stylelint can be installed
This commit is contained in:
Randall Morey authored and GitHub committed 2022-10-27 15:32:44 -07:00
1 parent 7d46215aa4
commit 0625d3b8a1
89 files changed
+37 -65

No files matched your search

+2 -2
View File
@@ -41,8 +41,7 @@
"ember-intl": "^5.7.0",
"ember-loading": "^2.0.0",
"ember-route-action-helper": "^2.0.8",
"ember-truth-helpers": "^3.0.0",
"rose": "*"
"ember-truth-helpers": "^3.0.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.18.2",
@@ -81,6 +80,7 @@
"prettier": "^2.7.1",
"qunit": "^2.17.1",
"qunit-dom": "^2.0.0",
"rose": "*",
"webpack": "5"
},
"engines": {
+1 -1
View File
@@ -1,5 +1,5 @@
files:
include: 'app/styles/**/*.s+(a|c)ss'
include: 'app/**/*.scss'
rules:
leading-zero: 0
mixins-before-declarations: 0
@@ -150,7 +150,6 @@ export const CardTemplate = (args) => ({
context: args,
});
<Preview>
<Story
name="Card"
-3
View File
@@ -7,9 +7,6 @@ module.exports = function (defaults) {
// Add options here
});
app.import('node_modules/codemirror/lib/codemirror.css');
app.import('node_modules/codemirror/theme/monokai.css');
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
+3 -27
View File
@@ -9,38 +9,14 @@ module.exports = {
included(app) {
this._super.included.apply(this, arguments);
this.includeStyles(app);
app.import('node_modules/codemirror/lib/codemirror.css');
app.import('node_modules/codemirror/theme/monokai.css');
this.includeFlightIcons(app);
this.includePublic(app);
this.setupSVGO(app);
},
/**
* Finds this addon's styles folder and includes it into the running
* application's `sassOptions.includePaths`, such that the application needs
* no further configuration to import the styles.
*/
includeStyles(app) {
// Resolve a path to this addon's style folder `addon/styles/addon-name`,
// where addon-name is resolved from package.json
const addonPath = require.resolve(this.name);
const stylePath = path.resolve(addonPath, `../addon/styles/${this.name}`);
const styleTree = mergeTrees([
new Funnel(stylePath, {
destDir: this.name,
include: ['**/*'],
}),
]);
// Setup default sassOptions on the running application
app.options.sassOptions = app.options.sassOptions || {};
app.options.sassOptions.includePaths =
app.options.sassOptions.includePaths || [];
// Include the addon styles
app.options.sassOptions.includePaths.push(styleTree);
},
/**
* Finds the structure-icons folder and includes it into the
* ember-inline-svg addon.
+5 -6
View File
@@ -16,12 +16,12 @@
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint .",
"lint:js:fix": "eslint . --fix",
"lint:sass": "sass-lint -v -q",
"lint:sass": "echo 'Rose SASS linting is disabled. Please install stylelint.'",
"format": "npm-run-all format:*",
"format:hbs": "prettier --write '{addon,tests}/**/*.hbs'",
"format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js",
"format:mdx": "prettier --write 'addon/**/*.mdx'",
"format:sass": "prettier --write addon/**/*.scss",
"format:sass": "prettier --write app/**/*.scss",
"start": "ember serve",
"test": "ember test",
"test:ember-compatibility": "ember try:each",
@@ -37,12 +37,14 @@
"ember-cli-babel": "^7.26.8",
"ember-cli-clipboard": "^0.16.0",
"ember-cli-htmlbars": "^6.1.0",
"ember-cli-sass": "^11.0.1",
"ember-composable-helpers": "^5.0.0",
"ember-focus-trap": "^0.7.0",
"ember-named-blocks-polyfill": "^0.2.5",
"ember-radio-button": "github:yapplabs/ember-radio-button.git#b2ab65f",
"ember-uuid": "^2.1.0",
"emberx-select": "github:adopted-ember-addons/emberx-select#bc5f774"
"emberx-select": "github:adopted-ember-addons/emberx-select#bc5f774",
"sass": "^1.55.0"
},
"devDependencies": {
"@babel/core": "^7.18.5",
@@ -72,7 +74,6 @@
"ember-cli": "^4.4.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-disable-prototype-extensions": "^1.1.3",
@@ -101,8 +102,6 @@
"react": "^16",
"react-dom": "^16",
"react-syntax-highlighter": "^15.5.0",
"sass": "^1.41.0",
"sass-lint": "^1.13.1",
"webpack": "^5.59.1"
},
"engines": {
-3
View File
@@ -37,9 +37,6 @@ module.exports = function (defaults) {
app.import('node_modules/clipboard/dist/clipboard.min.js');
}
app.import('node_modules/codemirror/lib/codemirror.css');
app.import('node_modules/codemirror/theme/monokai.css');
// Use `app.import` to add additional libraries to the generated
// output files.
//
+2 -2
View File
@@ -63,7 +63,7 @@
"ember-cli-flash": "^4.0.0",
"ember-cli-htmlbars": "^6.1.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-sass": "^11.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-exam": "^8.0.0",
@@ -91,7 +91,7 @@
"qunit": "^2.17.1",
"qunit-dom": "^2.0.0",
"rose": "*",
"sass": "^1.41.0",
"sass": "^1.55.0",
"sass-lint": "^1.13.1",
"sinon": "^14.0.0",
"webpack": "^5"
-3
View File
@@ -43,8 +43,5 @@ module.exports = function (defaults) {
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('node_modules/codemirror/lib/codemirror.css');
app.import('node_modules/codemirror/theme/monokai.css');
return app.toTree();
};
+2 -2
View File
@@ -81,7 +81,7 @@
"ember-cli-flash": "^4.0.0",
"ember-cli-htmlbars": "^6.1.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-sass": "^11.0.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-electron": "^3.1.1",
@@ -112,7 +112,7 @@
"qunit": "^2.17.1",
"qunit-dom": "^2.0.0",
"rose": "*",
"sass": "^1.41.0",
"sass": "^1.55.0",
"sinon": "^14.0.0",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^9.0.3",
+22 -15
View File
@@ -9892,9 +9892,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157, caniuse-lite@^1.0.30001400:
version "1.0.30001419"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz#3542722d57d567c8210d5e4d0f9f17336b776457"
integrity sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==
version "1.0.30001425"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001425.tgz#52917791a453eb3265143d2cd08d80629e82c735"
integrity sha512-/pzFv0OmNG6W0ym80P3NtapU0QEiDS3VuYAZMGoLLqiC7f6FJFe1MjpQDREGApeenD9wloeytmVDj+JLXPC6qw==
capture-exit@^2.0.0:
version "2.0.0"
@@ -12320,10 +12320,10 @@ ember-cli-preprocess-registry@^3.3.0:
debug "^3.0.1"
process-relative-require "^1.0.0"
ember-cli-sass@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/ember-cli-sass/-/ember-cli-sass-10.0.1.tgz#afa91eb7dfe3890be0390639d66976512e7d8edc"
integrity sha512-dWVoX03O2Mot1dEB1AN3ofC8DDZb6iU4Kfkbr3WYi9S9bGVHrpR/ngsR7tuVBuTugTyG53FPtLLqYdqx7XjXdA==
ember-cli-sass@^11.0.1:
version "11.0.1"
resolved "https://registry.yarnpkg.com/ember-cli-sass/-/ember-cli-sass-11.0.1.tgz#dc565764213a76973a83c0db9583cb79ba187dc5"
integrity sha512-RMlFPMK4kaB+67seF/IIoY3EC4rRd+L58q+lyElrxB3FcQTgph/qmGwtqf9Up7m3SDbPiA7cccCOSmgReMgCXA==
dependencies:
broccoli-funnel "^2.0.1"
broccoli-merge-trees "^3.0.1"
@@ -16323,9 +16323,14 @@ ignore@^5.2.0:
integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==
immer@8.0.1, immer@^9.0.6:
version "9.0.15"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.15.tgz#0b9169e5b1d22137aba7d43f8a81a495dd1b62dc"
integrity sha512-2eB/sswms9AEUSkOm4SbV5Y7Vmt/bKRwByd52jfLkW4OLYeaTP3EEiJ9agqU0O/tq6Dk62Zfj+TJSqfm1rLVGQ==
version "9.0.16"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.16.tgz#8e7caab80118c2b54b37ad43e05758cdefad0198"
integrity sha512-qenGE7CstVm1NrHQbMh8YaSzTZTFNP3zPqr3YU0S0UY441j4bJTg4A2Hh5KAhwgaiU6ZZ1Ar6y/2f4TblnMReQ==
immutable@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef"
integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==
import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1:
version "3.3.0"
@@ -23625,12 +23630,14 @@ sass-lint@^1.13.1:
path-is-absolute "^1.0.0"
util "^0.10.3"
sass@^1.41.0:
version "1.41.0"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.41.0.tgz#f7b41dc00336a4c03429c37b9680b86758af61d4"
integrity sha512-wb8nT60cjo9ZZMcHzG7TzdbFtCAmHEKWrH+zAdScPb4ZxL64WQBnGdbp5nwlenW5wJPcHva1JWmVa0h6iqA5eg==
sass@^1.55.0:
version "1.55.0"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.55.0.tgz#0c4d3c293cfe8f8a2e8d3b666e1cf1bff8065d1c"
integrity sha512-Pk+PMy7OGLs9WaxZGJMn7S96dvlyVBwwtToX895WmCpAOr5YiJYEUJfiJidMuKb613z2xNWcXCHEuOvjZbqC6A==
dependencies:
chokidar ">=3.0.0 <4.0.0"
immutable "^4.0.0"
source-map-js ">=0.6.2 <2.0.0"
sax@~1.2.4:
version "1.2.4"
@@ -24212,7 +24219,7 @@ source-list-map@^2.0.0:
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==
source-map-js@^1.0.1, source-map-js@^1.0.2:
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==