Skip to content

Commit

Permalink
Change project name
Browse files Browse the repository at this point in the history
  • Loading branch information
woubuc committed Jan 15, 2020
1 parent 808e136 commit 1e596d2
Show file tree
Hide file tree
Showing 32 changed files with 181 additions and 137 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ jobs:
- name: Build Win64
run: |
cargo rustc --release --target=x86_64-pc-windows-gnu -- -C linker=x86_64-w64-mingw32-gcc
mkdir builds/project-cleanup-win64
cp target/x86_64-pc-windows-gnu/release/project-cleanup.exe builds/project-cleanup-win64
tar -C builds -czvf dist/project-cleanup-win64.tar.gz project-cleanup-win64
mkdir builds/sweep-win64
cp target/x86_64-pc-windows-gnu/release/swp.exe builds/sweep-win64
tar -C builds -czvf dist/sweep-win64.tar.gz sweep-win64
- name: Build Win32
run: |
cargo rustc --release --target=i686-pc-windows-gnu -- -C linker=i686-w64-mingw32-gcc -C link-args=-mwindows -C panic=abort
mkdir builds/project-cleanup-win32
cp target/i686-pc-windows-gnu/release/project-cleanup.exe builds/project-cleanup-win32
tar -C builds -czvf dist/project-cleanup-win32.tar.gz project-cleanup-win32
mkdir builds/sweep-win32
cp target/i686-pc-windows-gnu/release/swp.exe builds/sweep-win32
tar -C builds -czvf dist/sweep-win32.tar.gz sweep-win32
- name: Build Linux
run: |
cargo rustc --release --target=x86_64-unknown-linux-gnu
mkdir builds/project-cleanup-linux
cp target/x86_64-unknown-linux-gnu/release/project-cleanup builds/project-cleanup-linux
tar -C builds -czvf dist/project-cleanup-linux.tar.gz project-cleanup-linux
mkdir builds/sweep-linux
cp target/x86_64-unknown-linux-gnu/release/swp builds/sweep-linux
tar -C builds -czvf dist/sweep-linux.tar.gz sweep-linux
Expand Down Expand Up @@ -75,20 +75,20 @@ jobs:
export CC=o64-clang
export CXX=o64-clang++
cargo build --release --target "x86_64-apple-darwin"
mkdir builds/project-cleanup-macos
cp target/x86_64-apple-darwin/release/project-cleanup builds/project-cleanup-macos
tar -C builds -czvf dist/project-cleanup-macos.tar.gz project-cleanup-macos
mkdir builds/sweep-macos
cp target/x86_64-apple-darwin/release/swp builds/sweep-macos
tar -C builds -czvf dist/sweep-macos.tar.gz sweep-macos
- name: Upload release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
files: |
dist/project-cleanup-win64.tar.gz
dist/project-cleanup-win32.tar.gz
dist/project-cleanup-linux.tar.gz
dist/project-cleanup-macos.tar.gz
dist/sweep-win64.tar.gz
dist/sweep-win32.tar.gz
dist/sweep-linux.tar.gz
dist/sweep-macos.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
10 changes: 5 additions & 5 deletions .cleanuprc → .swpfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This is an example .cleanuprc file. It lists the directories that should be
# This is an example .swpfile. It lists the directories that should be
# deleted. Each line should contain one path, relative to the directory that
# the .cleanuprc file is in, followed by a newline character (enter).
# the .swpfile is in, followed by a newline character (enter).

# Blank lines and lines starting with '#' are ignored. This makes the
# .cleanuprc file compatible with .gitignore files for syntax
# highlighting purposes. However, .cleanuprc does NOT support regex
# .swpfile compatible with .gitignore files for syntax
# highlighting purposes. However, .swpfile does NOT support regex
# or wildcard syntax, and only works with directories.


# If a .cleanuprc file is found, none of the default paths will match
# If a .swpfile is found, none of the default paths will match
# and only the contents of the .cleanuprc file will count.
node_modules

Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
## New features
📚 New documentation pages, powered by [VuePress](https://vuepress.vuejs.org)
## New Name
🌟 Project Cleanup has been renamed to Sweep. Instead of typing `project-cleanup`, you can now just type `swp`. Much shorter!

## Features
📚 Updated documentation pages, powered by [VuePress](https://vuepress.vuejs.org)
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
edition = "2018"
name = "project-cleanup"
name = "swp"
version = "0.7.5"

description = "CLI tool to clean up and remove old generated code in your Rust, Javascript and Java projects"
repository = "https://github.com/woubuc/project-cleanup"
repository = "https://github.com/woubuc/sweep"
authors = ["Wouter Buckens <[email protected]> (www.woubuc.be)"]

readme = "README.md"
license = "MIT"

keywords = ["cleanup", "project", "clean", "delete", "free"]
keywords = ["cleanup", "sweep", "swp", "project", "clean", "delete", "free", "cli"]
categories = ["command-line-utilities"]

include = ["src/**/*"]
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[![Project Cleanup](./readme_logo.png)](https://woubuc.github.io/project-cleanup/)
# Sweep

[![npm](https://img.shields.io/npm/v/project-cleanup)](https://www.npmjs.com/package/project-cleanup)
[![View on Crates.io](https://img.shields.io/crates/v/project-cleanup.svg)](https://crates.io/crates/project-cleanup)
[![Download](https://img.shields.io/badge/download-latest-informational.svg)](https://github.com/woubuc/project-cleanup/releases/latest)
[![License](https://img.shields.io/github/license/woubuc/project-cleanup.svg)](https://github.com/woubuc/project-cleanup/blob/master/LICENSE)
[![Test Status](https://github.com/woubuc/project-cleanup/workflows/tests/badge.svg)](https://github.com/woubuc/project-cleanup/actions)
[![npm](https://img.shields.io/npm/v/swp)](https://www.npmjs.com/package/swp)
[![View on Crates.io](https://img.shields.io/crates/v/swp.svg)](https://crates.io/crates/swp)
[![Download](https://img.shields.io/badge/download-latest-informational.svg)](https://github.com/woubuc/sweep/releases/latest)
[![License](https://img.shields.io/github/license/woubuc/sweep.svg)](https://github.com/woubuc/sweep/blob/master/LICENSE)
[![Test Status](https://github.com/woubuc/sweep/workflows/tests/badge.svg)](https://github.com/woubuc/sweep/actions)

Project Cleanup finds old projects that haven't been changed in more than a month. It will clean up and remove unnecessary directories containing libraries, dependencies, builds, etc. These files can easily be re-generated at any time by running install or build commands, and if you haven't worked on the project in a while you probably don't need them taking up space right now.
Sweep (`swp`) finds old projects that haven't been changed in more than a month. It will clean up and remove unnecessary directories containing libraries, dependencies, builds, etc. These files can easily be re-generated at any time by running install or build commands, and if you haven't worked on the project in a while you probably don't need them taking up space right now.

![Screenshot](readme_screenshot.png)

## How to use
Head on over to [the documentation](https://project-cleanup.woubuc.be).
Head on over to [the documentation](https://sweep.woubuc.be).

## Contributions welcome
This project welcomes contributions of any kind, whether you want to add new features, improve the documentation or just want to give some feedback.

## License
Project Cleanup is published under the MIT license. See
Sweep is published under the MIT license. See
the LICENSE file for more information.
2 changes: 1 addition & 1 deletion docs/.vuepress/components/GithubLatestVersion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script>
const GH_API_URL = 'https://api.github.com/repos/woubuc/project-cleanup/releases/latest';
const GH_API_URL = 'https://api.github.com/repos/woubuc/sweep/releases/latest';
export default {
name: 'GithubLatestVersion',
Expand Down
6 changes: 3 additions & 3 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports = {
title: 'Project Cleanup',
title: 'Sweep',
description: 'Reduce the disk usage of your projects by removing dependencies & builds',

themeConfig: {
repo: 'woubuc/project-cleanup',
repo: 'woubuc/sweep',
docsDir: 'docs',
editLinks: true,
editLinkText: 'Help improve this page',

sidebar: {
'/': [
['', 'Project Cleanup'],
['', 'Sweep'],
'installation',
'usage',
'configuration',
Expand Down
32 changes: 20 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,48 @@
![Project Cleanup logo](../readme_logo.png)
---
metaTitle: Sweep
---

Project Cleanup finds old projects that haven't been changed in more
# Sweep

Sweep (`swp`) finds old projects that haven't been changed in more
than a month. It will clean up and remove unnecessary directories
containing libraries, dependencies, builds, etc. These files can easily
be re-generated at any time by running install or build commands, and
if you haven't worked on the project in a while you probably don't need
them taking up space right now.

::: tip INFO
This project used to be named Project Cleanup, but got renamed because `swp` is a much easier command to run than `project-cleanup`.
:::

![Screenshot](../readme_screenshot.png)

## Getting started
Install Project Cleanup with npm
Install `swp` with npm

```
npm install --global project-cleanup
npm install --global swp
```

See [installation](/installation.md) for alternative ways to install.

## Basic usage
Simply run Project Cleanup and it will start searching the current directory and all subdirectories (recursively) for code projects it recognises.
Simply run `swp` and it will start searching the current directory and all subdirectories (recursively) for code projects it recognises.

```
project-cleanup
swp
```

You can also pass a specific path to search
You can also pass a path to search

```
project-cleanup ./dev
swp ./dev
```

See [usage](/usage.md) for more options

## Discovering projects
At this time, the list of built-in discovery rules is relatively short. It will recognise basic Node.js, Rust and Java projects, but nothing beyond that. If you have more sofisticated needs, you can use a [.cleanuprc file](./configuration.md).
At this time, the list of built-in discovery rules is relatively short. It will recognise basic Node.js, Rust and Java projects, but nothing beyond that. If you have more sofisticated needs, you can use a [.swpfile](./configuration.md).

### Built-in rules
- Node.js (will remove the `node_modules` and `.cache` directories)
Expand All @@ -45,9 +53,9 @@ These languages are based on my own experience and use patterns.

### Adding more rules
Contributions are welcome! Add the necessary checks in
[detect_cleanable_project.rs](https://github.com/woubuc/project-cleanup/blob/master/src/discover_projects/detect_cleanable_project.rs)
[detect_cleanable_project.rs](https://github.com/woubuc/sweep/blob/master/src/discover_projects/detect_cleanable_project.rs)
and submit a pull request. See [contributing](./contributing.md) for more details on how to contribute to the project.

## License
Project Cleanup is published under the MIT license. See
the [license file](https://github.com/woubuc/project-cleanup/blob/master/LICENSE) for details.
Sweep is published under the MIT license. See
the [license file](https://github.com/woubuc/sweep/blob/master/LICENSE) for details.
4 changes: 4 additions & 0 deletions docs/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://project-cleanup.woubuc.be/* https://sweep.woubuc.be/:splat 301!


/* /404.html 404
20 changes: 10 additions & 10 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# Configuration
Project Cleanup will find a lot of [standard directories](/#discovering-projects) in your projects, but there's a good chance you have different directories that also need to be cleaned.
Sweep will find a lot of [standard directories](/#discovering-projects) in your projects, but there's a good chance you have different directories that also need to be cleaned.

Create a file in the root directory of your project called `.cleanuprc` and list all cleanable directories in it. Project Cleanup will detect this file and use the listed directories instead of its defaults.
Create a file in the root directory of your project called `.swpfile` and list all cleanable directories in it. Sweep will detect this file and use the listed directories instead of its defaults.

## Syntax
The syntax of a `.cleanuprc` file is similar to that of a `.gitignore` file, so you can use existing syntax highlighting tools in your IDE of choice. However, the supported syntax is a lot more limited.
The syntax of a `.swpfile` is similar to that of a `.gitignore` file, so you can use existing syntax highlighting tools in your IDE of choice. However, the supported syntax is a lot more limited.

- `.cleanuprc` only supports directories, no individual files
- `.swpfile` only supports directories, no individual files
- You cannot use wildcard patterns (`*`), each path must point to a single directory
- All paths should be relative starting from the `.cleanuprc` file, and should not start with `/`
- All paths should be relative starting from the `.swpfile` file, and should not start with `/`

::: warning
Adding a starting `/` in your path will cause Project Cleanup to start from the root of your filesystem instead of relative from the working directory.
Adding a starting `/` in your path will cause Sweep to start from the root of your filesystem instead of relative from the working directory.
:::

### Example
See the [.cleanuprc file](https://github.com/woubuc/project-cleanup/blob/master/.cleanuprc) in the Project Cleanup repository.
See the [.swpfile](https://github.com/woubuc/sweep/blob/master/.swpfile) in the Sweep repository.

### Validation
To validate your `.cleanuprc` file, simply run `project-cleanup --all .` and verify that it lists the correct directories.
To validate your `.swpfile` file, simply run `swp --all .` and verify that it lists the correct directories.

## Version control
You should commit the `.cleanuprc` file along with your project. That way, everyone working on the project will cleanup the same files when running Project Cleanup. This is especially important when you override the default configuration to _prevent_ some default directories from being cleaned.
You should commit the `.swpfile` along with your project. That way, everyone working on the project will sweep the same files when running `swp`. This is especially important when you override the default configuration to _prevent_ some default directories from being cleaned.

::: tip NOTE
The default directories may change between versions. New directories may be added at any point, or existing defaults may be removed if it turns out they aren't universal enough.

It is recommended to add a `.cleanuprc` to all projects with more than 'standard' directories.
It is recommended to add a `.swpfile` to all projects with more than 'standard' directories.
:::
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ This project welcomes contributions of any kind, whether you want to add new fea


## Better defaults
The main thing still missing from Project Cleanup is more and better [default detection rules](/#discovering-projects). Pull requests to add more rules (or refine the existing ones) are always welcome.
The main thing still missing from Sweep is more and better [default detection rules](/#discovering-projects). Pull requests to add more rules (or refine the existing ones) are always welcome.

### How to add rules
1. Open the file [src/discover_projects/detect_cleanable_project.rs](https://github.com/woubuc/project-cleanup/blob/master/src/discover_projects/detect_cleanable_project.rs)
1. Open the file [src/discover_projects/detect_cleanable_project.rs](https://github.com/woubuc/sweep/blob/master/src/discover_projects/detect_cleanable_project.rs)
2. Add your checks to the main `detect_cleanable_project` function
3. Add the necessary tests to the test at the bottom of the file

Expand All @@ -17,7 +17,7 @@ You'll need some basic knowledge of [Rust](https://www.rust-lang.org/), but you
This is a relatively standard process for most open source projects. I'll repeat it here for clarity's sake, and to help new contributors get started. In case of questions, create an issue or [reach out on Twitter](https://twitter.com/woubuc).

### 1. Create an issue
It all starts by [creating an issue](https://github.com/woubuc/project-cleanup/issues) in the Project Cleanup repository. Use this to describe and discuss the changes you intend to make.
It all starts by [creating an issue](https://github.com/woubuc/sweep/issues) in the Sweep repository. Use this to describe and discuss the changes you intend to make.

You can also use issues for questions or general feedback, although this may be changed as we get more issues.

Expand Down
16 changes: 8 additions & 8 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ title: Installation
Install the package globally with npm or yarn.

```
npm install --global project-cleanup
npm install --global swp
```

This will download the Javascript installer from npm, which will download the relevant pre-compiled binary from the corresponding release on Github.

You can also install the npm package locally, if you want to keep Project Cleanup in your project's `devDependencies` and invoke it from a script.
You can also install the npm package locally, if you want to keep Sweep in your project's `devDependencies` and invoke it from a script.

[Project Cleanup on npm](https://www.npmjs.com/package/project-cleanup)
[`swp` on npm](https://www.npmjs.com/package/swp)

## Download manually
Download the binary for your platform from the [latest release<GithubLatestVersion />](https://github.com/woubuc/project-cleanup/releases/latest) on Github.
Download the binary for your platform from the [latest release<GithubLatestVersion />](https://github.com/woubuc/sweep/releases/latest) on Github.

## Install via cargo
The Rust Way&#8482;. Install Project Cleanup using Cargo.
The Rust Way&#8482;. Install using Cargo.

```
cargo install project-cleanup
cargo install swp
```

Building Project Cleanup does not require unstable Rust features.
Building Sweep does not require unstable Rust features and should work on all recent versions of Rust.

## Other package managers
If you have a favourite package manager and you think Project Cleanup should be published on it as well, please [create an issue](https://github.com/woubuc/project-cleanup/issues) and we can talk about how to get it published.
If you have a favourite package manager and you think Sweep should be published on it as well, please [create an issue](https://github.com/woubuc/sweep/issues) and we can talk about how to get it published.
Loading

0 comments on commit 1e596d2

Please sign in to comment.