-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert build tools to use dart-sass (#1617)
* Installing dart-sass * Moving css compiling to separate file * Removing node version * Create polite-mayflies-refuse.md * Don't compile support files * Fix test to not check support * Create olive-ants-kick.md
- Loading branch information
Showing
13 changed files
with
491 additions
and
1,090 deletions.
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 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.