Skip to content

Commit

Permalink
[NO JIRA]: Clean up and remove cycle dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Sannikov committed Nov 1, 2023
1 parent 66240a6 commit 943fa8b
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 926 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
npm-debug.log
*.css
.idea
3 changes: 0 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ const sass = require('node-sass');
const ora = require('ora');
const { argv } = require('yargs');

const functions = require('@skyscanner/backpack-web/bpk-mixins/sass-functions');

const importer = require('./importer');

const getSassFiles = () =>
Expand Down Expand Up @@ -124,7 +122,6 @@ const worker = () =>
{
file,
importer,
functions,
outputStyle: 'compressed',
},
(error, result) => {
Expand Down
931 changes: 31 additions & 900 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"prettier": "prettier --config .prettierrc --write \"**/*.{js,jsx}\""
},
"dependencies": {
"@skyscanner/backpack-web": "^29.6.0",
"chokidar": "^3.5.3",
"fast-glob": "^3.3.1",
"find-parent-dir": "^0.3.1",
Expand Down
2 changes: 0 additions & 2 deletions test/fail/test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* limitations under the License.
*/

@import '~@skyscanner/backpack-web/bpk-mixins/index';

.button {
@include bpk-unknown;
}
6 changes: 1 addition & 5 deletions test/pass/_test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
* limitations under the License.
*/

@import '~@skyscanner/backpack-web/bpk-mixins/index';
@import '~test';

.button {
@include bpk-button;
}

.icon {
@include bpk-icon(flight, $bpk-color-sky-blue);
}
9 changes: 3 additions & 6 deletions test/pass/node_modules/test.scss

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions test/pass/test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
* limitations under the License.
*/

@import '~@skyscanner/backpack-web/bpk-mixins/index';
@import '~test';

.button {
@include bpk-button;
}

.icon {
@include bpk-icon(flight, $bpk-color-sky-blue);
}
5 changes: 1 addition & 4 deletions watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ const sass = require('node-sass');
const ora = require('ora');
const { argv } = require('yargs');

const functions = require('@skyscanner/backpack-web/bpk-mixins/sass-functions');

const importer = require('./importer');

const getCssFileName = (name) => name.replace(/\.scss/, '.css');
Expand All @@ -43,15 +41,14 @@ const compileSass = async (file, spinner) => {
const result = await renderSass({
file,
importer,
functions,
outputStyle: 'compressed',
});

let prefixedContents;

if (argv.prefixComment) {
try {
const comment = `/*
const comment = `/*
${argv.prefixComment.replace(/^/gm, ' * ')}
*/`;
prefixedContents = [comment, result.css].join('\n');
Expand Down

0 comments on commit 943fa8b

Please sign in to comment.