Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Feb 25, 2024
1 parent 2112346 commit b56d39c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,6 @@ function plugin(initialOptions) {
if (fontFaces) {
const asyncPath = path.resolve(process.cwd(), options.async)

console.log(asyncPath);

const asyncJs =
'(function(){' +
fs.readFileSync('loader.min.js', 'utf8') +
Expand Down
7 changes: 7 additions & 0 deletions test/_tape.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ postcssTape(plugin)({
hosted: ['./test/fonts']
}
},
'hosted-fonts:ttf': {
message: "supports hosted fonts with ttf",
options: {
hosted: ['./test/fonts'],
formats: ['woff', 'ttf']
}
},
'hosted-fonts:custom-font-path': {
message: "supports hosted fonts",
options: {
Expand Down
12 changes: 12 additions & 0 deletions test/hosted-fonts.ttf.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
src: url(fonts/pathFont.woff) format("woff"),url(fonts/pathFont.ttf) format("truetype")
}

a {
font-family: "Source Sans Pro"
}

b {}

0 comments on commit b56d39c

Please sign in to comment.