mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Include a license file in the node source package
This commit is contained in:
parent
2f2e76cfd5
commit
008455a106
2 changed files with 11 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "sixtyfps",
|
"name": "sixtyfps",
|
||||||
"version": "0.0.2",
|
"version": "0.0.2",
|
||||||
|
"homepage": "https://github.com/sixtyfpsui/sixtyfps",
|
||||||
|
"license": "SEE LICENSE IN LICENSE.md",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
Please contact info@sixtyfps.io for more information.
|
Please contact info@sixtyfps.io for more information.
|
||||||
LICENSE END */
|
LICENSE END */
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use xshell::{cmd, pushd, read_file, write_file};
|
use xshell::{cmd, cp, pushd, read_file, rm_rf, write_file};
|
||||||
|
|
||||||
pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
|
pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let root = super::root_dir().context("error determining root directory")?;
|
let root = super::root_dir().context("error determining root directory")?;
|
||||||
|
@ -39,6 +39,11 @@ pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
||||||
write_file(cargo_toml_path.clone(), edited_toml).context("Error writing Cargo.toml")?;
|
write_file(cargo_toml_path.clone(), edited_toml).context("Error writing Cargo.toml")?;
|
||||||
|
|
||||||
|
println!("Putting LICENSE.md in place for the source package");
|
||||||
|
|
||||||
|
cp(root.join("LICENSE.md"), node_dir.join("LICENSE.md"))
|
||||||
|
.context("Error copying LICENSE.md into the node dir for packaging")?;
|
||||||
|
|
||||||
println!("Running npm package to create the tarball");
|
println!("Running npm package to create the tarball");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -52,6 +57,8 @@ pub fn generate() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
||||||
write_file(cargo_toml_path, toml_source).context("Error writing Cargo.toml")?;
|
write_file(cargo_toml_path, toml_source).context("Error writing Cargo.toml")?;
|
||||||
|
|
||||||
|
rm_rf(node_dir.join("LICENSE.md")).context("Error deleting LICENSE.md copy")?;
|
||||||
|
|
||||||
let package_json_source =
|
let package_json_source =
|
||||||
read_file(node_dir.join("package.json")).context("Error reading package.json")?;
|
read_file(node_dir.join("package.json")).context("Error reading package.json")?;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue