Skip to content

Commit

Permalink
Features
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Dec 12, 2022
1 parent a7c76e1 commit 0f45810
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions crates/swc_css_compat/src/compiler/mod.rs
@@ -1,15 +1,21 @@
use swc_css_visit::VisitMut;

use crate::feature::Features;

mod custom_media;

/// Compiles a modern CSS file to a legacy CSS file.
#[derive(Debug)]
pub struct Compiler {
#[allow(unused)]
c: Config,
}

#[derive(Debug, Default)]
pub struct Config {}
#[derive(Debug)]
pub struct Config {
/// The list of features to **process**.
pub process: Features,
}

impl Compiler {
pub fn new(config: Config) -> Self {
Expand Down
7 changes: 7 additions & 0 deletions crates/swc_css_compat/src/feature.rs
@@ -0,0 +1,7 @@
use bitflags::bitflags;

bitflags! {
pub struct Features: u64 {
const NESTING = 0b00000001;
}
}
2 changes: 1 addition & 1 deletion crates/swc_css_compat/src/lib.rs
Expand Up @@ -2,5 +2,5 @@
#![allow(clippy::vec_box)]

pub mod compiler;
pub mod feature;
pub mod nesting;
pub mod target;
1 change: 0 additions & 1 deletion crates/swc_css_compat/src/target.rs

This file was deleted.

0 comments on commit 0f45810

Please sign in to comment.