-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Convert build tools to use dart-sass #1617
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
570bb76
Installing dart-sass
jonrohan e8f0320
Merge branch 'main' into dart-sass
jonrohan f6ba168
Moving css compiling to separate file
jonrohan 2d9981d
Removing node version
jonrohan a4d67d8
Merge branch 'main' into dart-sass
jonrohan 103aa1e
Create polite-mayflies-refuse.md
jonrohan d8053a9
Don't compile support files
jonrohan 48eed27
Fix test to not check support
jonrohan 362b345
Create olive-ants-kick.md
jonrohan 91064fc
Merge branch 'main' into dart-sass
jonrohan 8d50080
Add note about removing `<kbd>` from markdown
simurai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/css": major | ||
--- | ||
|
||
Removing `<kbd>` import from markdown package. Going forward you'll need to include `@primer/css/base/kbd.scss` directly. |
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,5 @@ | ||
--- | ||
"@primer/css": minor | ||
--- | ||
|
||
Convert postcss build tool, from node-sass to dart-sass. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 @@ | ||
import autoprefixer from 'autoprefixer' | ||
import sass from '@koddsson/postcss-sass' | ||
import scss from 'postcss-scss' | ||
import scssImport from 'postcss-import' | ||
import {fileURLToPath} from 'url' | ||
import {join, dirname} from 'path' | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
|
||
const plugins = [ | ||
scssImport, | ||
sass({ | ||
includePaths: [join(__dirname, 'node_modules')], | ||
outputStyle: process.env.CSS_MINIFY === '0' ? 'expanded' : 'compressed' | ||
}), | ||
autoprefixer, | ||
]; | ||
|
||
export default { | ||
map: { | ||
sourcesContent: false, | ||
annotation: true | ||
}, | ||
syntax: scss, | ||
parser: scss, | ||
plugins: plugins | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import postcss from 'postcss' | ||
import postCssConfig from '../postcss.config.js' | ||
|
||
export default async function compiler(css, options) { | ||
const { plugins, ...config } = postCssConfig | ||
|
||
const result = await postcss(plugins).process(css, { | ||
...config, | ||
...options | ||
}) | ||
return result | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is importing a file like that not possible in dart-sass? If so, we might need to just duplicate those styles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello inspect the styles on me
yes, I meant to say. dart-sass didn't like this. but checking the
.markdown-body kbd
and the normalkbd
that's included in base both apply in dotcom. So I'm unsure if this more specific import is needed?If it is, we can try putting
.markdown-body kbd, kbd {}
in the base/kbd.scss file.