Rename package
This commit is contained in:
parent
ce4af278ac
commit
7e9ea69a08
41 changed files with 58 additions and 209 deletions
|
|
@ -1,9 +1,9 @@
|
|||
use std::{env, fs, process};
|
||||
|
||||
use reconcile_merge::{BuiltinTokenizer, reconcile};
|
||||
use reconcile_text::{BuiltinTokenizer, reconcile};
|
||||
|
||||
/// Merges three versions of a file: mine, base, and theirs.
|
||||
/// Implement a trivial version git merge-file (https://git-scm.com/docs/git-merge-file)
|
||||
/// Implement a trivial version git merge-file (<https://git-scm.com/docs/git-merge-file>)
|
||||
///
|
||||
/// Run it with:
|
||||
/// `cargo run --example merge-file my.txt base.txt their.txt [output_file.txt]`
|
||||
|
|
@ -22,17 +22,17 @@ fn main() {
|
|||
|
||||
// Read files
|
||||
let mine_content = fs::read_to_string(mine_file).unwrap_or_else(|e| {
|
||||
eprintln!("Error reading {}: {}", mine_file, e);
|
||||
eprintln!("Error reading {mine_file}: {e}");
|
||||
process::exit(1);
|
||||
});
|
||||
|
||||
let base_content = fs::read_to_string(base_file).unwrap_or_else(|e| {
|
||||
eprintln!("Error reading {}: {}", base_file, e);
|
||||
eprintln!("Error reading {base_file}: {e}");
|
||||
process::exit(1);
|
||||
});
|
||||
|
||||
let theirs_content = fs::read_to_string(theirs_file).unwrap_or_else(|e| {
|
||||
eprintln!("Error reading {}: {}", theirs_file, e);
|
||||
eprintln!("Error reading {theirs_file}: {e}");
|
||||
process::exit(1);
|
||||
});
|
||||
|
||||
|
|
@ -49,10 +49,10 @@ fn main() {
|
|||
// Write the result
|
||||
if let Some(output_path) = output_file {
|
||||
if let Err(e) = fs::write(output_path, merged_content) {
|
||||
eprintln!("Error writing to {}: {}", output_path, e);
|
||||
eprintln!("Error writing to {output_path}: {e}");
|
||||
process::exit(1);
|
||||
}
|
||||
} else {
|
||||
print!("{}", merged_content);
|
||||
print!("{merged_content}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { reconcileWithHistory } from 'reconcile';
|
||||
import type { Tokenizer } from 'reconcile';
|
||||
import { reconcileWithHistory } from 'reconcile-text';
|
||||
import type { Tokenizer } from 'reconcile-text';
|
||||
import './style.scss';
|
||||
|
||||
const originalTextArea = document.getElementById('original') as HTMLTextAreaElement;
|
||||
|
|
|
|||
25
examples/website/package-lock.json
generated
25
examples/website/package-lock.json
generated
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "portfolio",
|
||||
"name": "reconcile-example-website",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "portfolio",
|
||||
"name": "reconcile-example-website",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"css-loader": "^7.1.2",
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
"inline-source-webpack-plugin": "^3.0.1",
|
||||
"mini-css-extract-plugin": "^2.9.2",
|
||||
"prettier": "^3.6.2",
|
||||
"reconcile": "file:../../reconcile-js",
|
||||
"reconcile-text": "file:../../reconcile-js",
|
||||
"resolve-url-loader": "^5.0.0",
|
||||
"sass": "^1.89.2",
|
||||
"sass-loader": "^16.0.5",
|
||||
|
|
@ -26,19 +26,22 @@
|
|||
}
|
||||
},
|
||||
"../../reconcile-js": {
|
||||
"name": "reconcile",
|
||||
"version": "0.4.0",
|
||||
"name": "reconcile-text",
|
||||
"version": "0.4.3",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
"jest": "^29.7.0",
|
||||
"reconcile": "file:../pkg",
|
||||
"ts-jest": "^29.3.4",
|
||||
"@types/jest": "^30.0.0",
|
||||
"jest": "^30.0.4",
|
||||
"prettier": "^3.6.2",
|
||||
"reconcile-text": "file:../pkg",
|
||||
"ts-jest": "^29.4.0",
|
||||
"ts-loader": "^9.5.2",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "5.8.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1"
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-merge": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@discoveryjs/json-ext": {
|
||||
|
|
@ -3960,7 +3963,7 @@
|
|||
"node": ">= 10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/reconcile": {
|
||||
"node_modules/reconcile-text": {
|
||||
"resolved": "../../reconcile-js",
|
||||
"link": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
],
|
||||
"homepage": "https://github.com/schmelczer/reconcile#readme",
|
||||
"devDependencies": {
|
||||
"reconcile": "file:../../reconcile-js",
|
||||
"reconcile-text": "file:../../reconcile-js",
|
||||
"css-loader": "^7.1.2",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"mini-css-extract-plugin": "^2.9.2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue