feat: change name to libcachebust
This commit is contained in:
parent
01544bc36e
commit
e2c22d2750
10 changed files with 21 additions and 17 deletions
|
@ -1,3 +1,7 @@
|
|||
## 0.3.0
|
||||
|
||||
Change name to libcachebust
|
||||
|
||||
## 0.2.1
|
||||
|
||||
Updated dependencies
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -739,7 +739,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
|||
|
||||
[[package]]
|
||||
name = "libcachebust"
|
||||
version = "0.2.1"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"data-encoding",
|
||||
"derive_builder",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "libcachebust"
|
||||
version = "0.2.1"
|
||||
version = "0.3.0"
|
||||
authors = ["realaravinth <realaravinth@batsense.net>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Compiletime cache-busting web applications written in rust"
|
||||
|
@ -17,7 +17,7 @@ members = [
|
|||
]
|
||||
|
||||
[lib]
|
||||
name = "cache_buster"
|
||||
name = "libcachebust"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
width="250px"
|
||||
class="greetings"
|
||||
src="./examples/actix-web/static/cachable/img/Spock_vulcan-salute.png"
|
||||
alt="logo image"
|
||||
alt="A photo of Spock showing the Vulkan greeting"
|
||||
/>
|
||||
<h1>
|
||||
libcachebust
|
||||
|
|
2
examples/actix-web/.gitignore
vendored
2
examples/actix-web/.gitignore
vendored
|
@ -6,5 +6,5 @@
|
|||
/target
|
||||
prod
|
||||
dist
|
||||
src/cache_buster_data.json
|
||||
src/libcachebust_data.json
|
||||
tarpaulin-report.html
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use cache_buster::BusterBuilder;
|
||||
use libcachebust::BusterBuilder;
|
||||
|
||||
fn main() {
|
||||
let types = vec![
|
||||
|
|
|
@ -13,7 +13,7 @@ use log::info;
|
|||
use mime_guess::from_path;
|
||||
use rust_embed::RustEmbed;
|
||||
|
||||
use cache_buster::Files;
|
||||
use libcachebust::Files;
|
||||
|
||||
mod index;
|
||||
|
||||
|
@ -23,7 +23,7 @@ pub const CACHE_AGE: u32 = 60 * 60 * 24 * 365;
|
|||
lazy_static! {
|
||||
/// 2. create filemap
|
||||
pub static ref FILES: Files = {
|
||||
let map = include_str!("./cache_buster_data.json");
|
||||
let map = include_str!("./libcachebust_data.json");
|
||||
Files::new(map)
|
||||
};
|
||||
pub static ref INDEX: String = index::get_index();
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
//! Add the following tou your program to load the filemap during compiletime:
|
||||
//!
|
||||
//! ```no_run
|
||||
//! use cache_buster::Files;
|
||||
//! use cache_buster::CACHE_BUSTER_DATA_FILE;
|
||||
//! use libcachebust::Files;
|
||||
//! use libcachebust::CACHE_BUSTER_DATA_FILE;
|
||||
//!
|
||||
//! let files = Files::new(CACHE_BUSTER_DATA_FILE);
|
||||
//! ```
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
//!
|
||||
//! - `build.rs`
|
||||
//! ```no_run
|
||||
//! use cache_buster::BusterBuilder;
|
||||
//! use libcachebust::BusterBuilder;
|
||||
//!
|
||||
//! // note: add error checking yourself.
|
||||
//! // println!("cargo:rustc-env=GIT_process={}", git_process);
|
||||
|
@ -53,8 +53,8 @@
|
|||
//! Add the following tou your program to load the filemap during compiletime:
|
||||
//!
|
||||
//! ```no_run
|
||||
//! use cache_buster::Files;
|
||||
//! use cache_buster::CACHE_BUSTER_DATA_FILE;
|
||||
//! use libcachebust::Files;
|
||||
//! use libcachebust::CACHE_BUSTER_DATA_FILE;
|
||||
//!
|
||||
//! let files = Files::new(CACHE_BUSTER_DATA_FILE);
|
||||
//! // the path to the file before setting up for cache busting
|
||||
|
@ -69,4 +69,4 @@ pub use filemap::Files;
|
|||
|
||||
/// file to which filemap is written during compilation
|
||||
/// include this to `.gitignore`
|
||||
pub const CACHE_BUSTER_DATA_FILE: &str = "./src/cache_buster_data.json";
|
||||
pub const CACHE_BUSTER_DATA_FILE: &str = "./src/libcachebust_data.json";
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//! Run the following during build using `build.rs`:
|
||||
//!
|
||||
//! ```rust
|
||||
//! use cache_buster::BusterBuilder;
|
||||
//! use libcachebust::BusterBuilder;
|
||||
//!
|
||||
//! // note: add error checking yourself.
|
||||
//! // println!("cargo:rustc-env=GIT_process={}", git_process);
|
||||
|
@ -50,10 +50,10 @@ use crate::*;
|
|||
///
|
||||
/// This is useful when serving vendor static files which are interlinked, where chaing
|
||||
/// file names should mean changing how the vendor files pulls its dependencies --- which are
|
||||
/// beyond the abilities of `cache_buster`.
|
||||
/// beyond the abilities of `libcachebust`.
|
||||
///
|
||||
/// ```rust
|
||||
/// use cache_buster::NoHashCategory;
|
||||
/// use libcachebust::NoHashCategory;
|
||||
///
|
||||
/// let extensions = NoHashCategory::FileExtentions(vec!["wasm"]);
|
||||
/// let files = NoHashCategory::FileExtentions(vec!["swagger-ui-bundle.js", "favicon-16x16.png"]);
|
||||
|
|
Loading…
Reference in a new issue