Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

Commit b6b0bf4

Browse files
author
James Kolce
committed
[fix: #14] Add @import
1 parent 125602e commit b6b0bf4

8 files changed

Lines changed: 203 additions & 567 deletions

File tree

‎dist/index.js‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ const nested = require("postcss-nested");
77
const ifMedia = require("postcss-if-media");
88
const scssSyntax = require("postcss-scss");
99
const stripComments = require("postcss-strip-inline-comments");
10+
const imports = require("postcss-easy-import");
1011
const lh_1 = require("./lib/lh");
1112
const custom_media_1 = require("./lib/custom-media");
1213
const media_minmax_1 = require("./lib/media-minmax");
1314
exports.default = file => {
1415
const ccss = fs.readFileSync(file, 'utf8');
15-
return postcss([
16-
stripComments,
17-
ifMedia,
18-
nested,
19-
custom_media_1.default,
20-
media_minmax_1.default,
21-
lh_1.default,
22-
autoprefixer
23-
]).process(ccss, { parser: scssSyntax }).css;
16+
return postcss()
17+
.use(imports({ extensions: '.ccss', prefix: '_' }))
18+
.use(stripComments())
19+
.use(ifMedia())
20+
.use(nested())
21+
.use(custom_media_1.default())
22+
.use(media_minmax_1.default())
23+
.use(lh_1.default())
24+
.use(autoprefixer())
25+
.process(ccss, { parser: scssSyntax, from: file });
2426
};

0 commit comments

Comments
 (0)