bump version to 0.9.0
This commit is contained in:
parent
2ad1b70f61
commit
2cd81ccb0f
20
CHANGELOG.md
20
CHANGELOG.md
@ -1,3 +1,23 @@
|
|||||||
|
# 0.9.0
|
||||||
|
|
||||||
|
This release is focused on setting up the groundwork for implementing `@extend` as well
|
||||||
|
as being able to compile Bootstrap.
|
||||||
|
- Implement all builtin selector functions
|
||||||
|
- `selector-append`
|
||||||
|
- `selector-extend`
|
||||||
|
- `selector-nest`
|
||||||
|
- `selector-parse`
|
||||||
|
- `selector-replace`
|
||||||
|
- `selector-unify`
|
||||||
|
- `simple-selectors`
|
||||||
|
- `is-superselector`
|
||||||
|
- Implement builtin function `content-exists`
|
||||||
|
- Allow `@import`, `@warn`, and `@debug` in all contexts, such as inside `@mixin`
|
||||||
|
- Refactor control flow evaluation, resolving some issues blocking Bootstrap
|
||||||
|
|
||||||
|
#### Breaking Changes
|
||||||
|
- remove the `StyleSheet` struct in favor of freestanding functions, `from_string` and `from_path`
|
||||||
|
|
||||||
# 0.8.3
|
# 0.8.3
|
||||||
|
|
||||||
This release is largely focused on performance and robustness
|
This release is largely focused on performance and robustness
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "grass"
|
name = "grass"
|
||||||
version = "0.8.3"
|
version = "0.9.0"
|
||||||
description = "SASS compiler"
|
description = "SASS compiler"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
39
src/lib.rs
39
src/lib.rs
@ -7,7 +7,7 @@ Spec progress as of 2020-05-01:
|
|||||||
|
|
||||||
| Passing | Failing | Total |
|
| Passing | Failing | Total |
|
||||||
|---------|---------|-------|
|
|---------|---------|-------|
|
||||||
| 2193 | 2900 | 5093 |
|
| 2489 | 2604 | 5093 |
|
||||||
|
|
||||||
## Use as library
|
## Use as library
|
||||||
```
|
```
|
||||||
@ -88,6 +88,9 @@ grass input.scss
|
|||||||
#![cfg_attr(feature = "profiling", inline(never))]
|
#![cfg_attr(feature = "profiling", inline(never))]
|
||||||
use std::{fs, path::Path};
|
use std::{fs, path::Path};
|
||||||
|
|
||||||
|
#[cfg(feature = "wasm")]
|
||||||
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "64")]
|
#[cfg(target_pointer_width = "64")]
|
||||||
pub(crate) use beef::lean::Cow;
|
pub(crate) use beef::lean::Cow;
|
||||||
#[cfg(not(target_pointer_width = "64"))]
|
#[cfg(not(target_pointer_width = "64"))]
|
||||||
@ -179,9 +182,9 @@ pub fn from_path(p: &str) -> Result<String> {
|
|||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg_attr(feature = "wasm", wasm_bindgen)]
|
|
||||||
#[cfg_attr(feature = "profiling", inline(never))]
|
#[cfg_attr(feature = "profiling", inline(never))]
|
||||||
#[cfg_attr(not(feature = "profiling"), inline)]
|
#[cfg_attr(not(feature = "profiling"), inline)]
|
||||||
|
#[cfg(not(feature = "wasm"))]
|
||||||
pub fn from_string(p: String) -> Result<String> {
|
pub fn from_string(p: String) -> Result<String> {
|
||||||
let mut map = CodeMap::new();
|
let mut map = CodeMap::new();
|
||||||
let file = map.add_file("stdin".into(), p);
|
let file = map.add_file("stdin".into(), p);
|
||||||
@ -211,3 +214,35 @@ pub fn from_string(p: String) -> Result<String> {
|
|||||||
.pretty_print(&map)
|
.pretty_print(&map)
|
||||||
.map_err(|e| raw_to_parse_error(&map, e))
|
.map_err(|e| raw_to_parse_error(&map, e))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "wasm")]
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub fn from_string(p: String) -> std::result::Result<String, JsValue> {
|
||||||
|
let mut map = CodeMap::new();
|
||||||
|
let file = map.add_file("stdin".into(), p);
|
||||||
|
Ok(Css::from_stmts(
|
||||||
|
Parser {
|
||||||
|
toks: &mut Lexer::new(&file)
|
||||||
|
.collect::<Vec<Token>>()
|
||||||
|
.into_iter()
|
||||||
|
.peekmore(),
|
||||||
|
map: &mut map,
|
||||||
|
path: Path::new(""),
|
||||||
|
scopes: &mut NeverEmptyVec::new(Scope::new()),
|
||||||
|
global_scope: &mut Scope::new(),
|
||||||
|
super_selectors: &mut NeverEmptyVec::new(Selector::new()),
|
||||||
|
span_before: file.span.subspan(0, 0),
|
||||||
|
content: None,
|
||||||
|
in_mixin: false,
|
||||||
|
in_function: false,
|
||||||
|
in_control_flow: false,
|
||||||
|
at_root: true,
|
||||||
|
at_root_has_selector: false,
|
||||||
|
}
|
||||||
|
.parse()
|
||||||
|
.map_err(|e| raw_to_parse_error(&map, e).to_string())?,
|
||||||
|
)
|
||||||
|
.map_err(|e| raw_to_parse_error(&map, e).to_string())?
|
||||||
|
.pretty_print(&map)
|
||||||
|
.map_err(|e| raw_to_parse_error(&map, e).to_string())?)
|
||||||
|
}
|
||||||
|
@ -5,6 +5,7 @@ use std::{
|
|||||||
|
|
||||||
use clap::{arg_enum, App, Arg};
|
use clap::{arg_enum, App, Arg};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "wasm"))]
|
||||||
use grass::from_path;
|
use grass::from_path;
|
||||||
|
|
||||||
arg_enum! {
|
arg_enum! {
|
||||||
|
@ -31,9 +31,6 @@ use crate::{
|
|||||||
|
|
||||||
use common::{Branch, NeverEmptyVec, SelectorOrStyle};
|
use common::{Branch, NeverEmptyVec, SelectorOrStyle};
|
||||||
|
|
||||||
#[cfg(feature = "wasm")]
|
|
||||||
use wasm_bindgen::prelude::*;
|
|
||||||
|
|
||||||
mod args;
|
mod args;
|
||||||
pub mod common;
|
pub mod common;
|
||||||
mod ident;
|
mod ident;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
use codemap::Span;
|
use codemap::Span;
|
||||||
|
|
||||||
use crate::error::SassResult;
|
|
||||||
|
|
||||||
use super::{ComplexSelector, CssMediaQuery, SimpleSelector};
|
use super::{ComplexSelector, CssMediaQuery, SimpleSelector};
|
||||||
|
|
||||||
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user