Function minifier::js::simple_minify [−][src]
pub fn simple_minify(source: &str) -> Tokens<'_>
Expand description
Simple function to get the untouched token list. Useful in case you want to perform some actions directly on it.
Example
extern crate minifier; use minifier::js::simple_minify; use std::fs; fn main() { let content = fs::read("some_file.js").expect("file not found"); let source = String::from_utf8_lossy(&content); let s = simple_minify(&source); println!("result: {:?}", s); // We now have the tokens list. }