Skip to content
This repository was archived by the owner on May 10, 2026. It is now read-only.

Commit 0c1c135

Browse files
committed
Migrate build system from Grunt to Node.js
Replace Grunt-based build process with a custom Node.js build script, simplifying project setup and build tasks. Key changes include: - Remove Grunt and related dependencies - Add npm scripts for build, package, and release tasks - Update README with new build system instructions - Bump minimum Node.js version to 12.0.0 - Add chokidar for file watching
1 parent 8829705 commit 0c1c135

5 files changed

Lines changed: 595 additions & 2870 deletions

File tree

BUILD.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Smart-RSS Build System
2+
3+
This document explains the build system for Smart-RSS.
4+
5+
## Overview
6+
7+
The build system has been simplified from a Grunt-based system to a plain Node.js script. The script provides the same functionality as the previous Grunt-based system but with a simpler implementation.
8+
9+
## Requirements
10+
11+
- Node.js (v12 or higher recommended)
12+
- npm
13+
14+
## Installation
15+
16+
```bash
17+
npm install
18+
```
19+
20+
## Usage
21+
22+
You can use the build system in two ways:
23+
24+
### 1. Using npm scripts
25+
26+
```bash
27+
# Copy files from src to dist and strip comments
28+
npm run prepare
29+
30+
# Prepare and create zip package
31+
npm run package
32+
33+
# Bump version, commit, prepare, and create zip package (patch version)
34+
npm run release
35+
36+
# Bump minor version, commit, prepare, and create zip package
37+
npm run release:minor
38+
39+
# Bump major version, commit, prepare, and create zip package
40+
npm run release:major
41+
42+
# Watch for changes in src directory
43+
npm run watch
44+
45+
# Bump version number (patch by default)
46+
npm run bump-version
47+
```
48+
49+
### 2. Using the build script directly
50+
51+
```bash
52+
# Copy files from src to dist and strip comments
53+
node build.js prepare
54+
55+
# Prepare and create zip package
56+
node build.js package
57+
58+
# Bump version, commit, prepare, and create zip package
59+
node build.js release [patch|minor|major]
60+
61+
# Watch for changes in src directory
62+
node build.js watch
63+
64+
# Bump version number
65+
node build.js bump-version [patch|minor|major]
66+
```
67+
68+
## Features
69+
70+
- **prepare**: Copies files from src to dist and strips comments from JS files
71+
- **package**: Prepares files and creates a zip package
72+
- **release**: Bumps version, commits changes, prepares files, and creates a zip package
73+
- **watch**: Watches for changes in the src directory and automatically runs prepare
74+
- **bump-version**: Bumps the version number in manifest.json
75+
76+
## Migrating from Grunt
77+
78+
The new build system provides the same functionality as the previous Grunt-based system. If you were using Grunt tasks, here's how they map to the new system:
79+
80+
| Grunt Task | New Command |
81+
| --------------------- | -------------------------------------------------------- |
82+
| `grunt prepare` | `npm run prepare` or `node build.js prepare` |
83+
| `grunt package` | `npm run package` or `node build.js package` |
84+
| `grunt release` | `npm run release` or `node build.js release` |
85+
| `grunt release:minor` | `npm run release:minor` or `node build.js release minor` |
86+
| `grunt release:major` | `npm run release:major` or `node build.js release major` |
87+
| `grunt watch` | `npm run watch` or `node build.js watch` |
88+
| `grunt bump-version` | `npm run bump-version` or `node build.js bump-version` |
89+
90+
## Why the Change?
91+
92+
The new build system:
93+
94+
1. Reduces dependencies (no Grunt and related plugins)
95+
2. Simplifies the build process
96+
3. Makes it easier to understand and modify
97+
4. Provides the same functionality in a more straightforward way

README.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Smart RSS extension
22

3-
## Now officially unmaintained, I *may* fix some critical issue if any is found within few following weeks, but then I'll archive this repo. Feel free to fork and continue development as you wish
3+
## Now officially unmaintained, I _may_ fix some critical issue if any is found within few following weeks, but then I'll archive this repo. Feel free to fork and continue development as you wish
44

55
Originally developed for Opera 15+ by BS-Harou (Martin Kadlec)
66

@@ -29,8 +29,7 @@ If you are interested in improving Smart RSS then there are few tips to get star
2929
First of all you will need several command line tools:
3030

3131
- Git
32-
- Node.JS & npm
33-
- Grunt-cli
32+
- Node.JS (v12 or higher recommended) & npm
3433

3534
To setup your Smart RSS project open your console, go to your projects folders and type:
3635

@@ -48,27 +47,41 @@ To check for jshint errors:
4847
jshint .
4948
```
5049

51-
There are multiple grunt tasks defined for this project but only few are meant to be run directly:
50+
### Build System
5251

53-
```
54-
grunt prepare
55-
```
52+
The build system has been simplified to a plain Node.js script. You can use npm scripts to run the build tasks:
5653

57-
copies relevant source files to browser specific directories within `dist` subdirectory and cleans up manifests from values not needed by the given browser.
54+
```bash
55+
# Copy files from src to dist and strip comments
56+
npm run prepare
5857

59-
```
60-
grunt watch
61-
```
58+
# Prepare and create zip package
59+
npm run package
6260

63-
watches for changes in `src` directory and performs `prepare` every time it detects one
61+
# Bump version, commit, prepare, and create zip package (patch version)
62+
npm run release
6463

65-
```
66-
grunt release:{level=patch}
64+
# Bump minor version, commit, prepare, and create zip package
65+
npm run release:minor
66+
67+
# Bump major version, commit, prepare, and create zip package
68+
npm run release:major
69+
70+
# Watch for changes in src directory
71+
npm run watch
72+
73+
# Bump version number (patch by default)
74+
npm run bump-version
6775
```
6876

69-
is all-in-one solution for releasing new versions of the extension
77+
Or you can use the build script directly:
78+
79+
```bash
80+
node build.js prepare
81+
node build.js package
82+
node build.js release [patch|minor|major]
83+
node build.js watch
84+
node build.js bump-version [patch|minor|major]
85+
```
7086

71-
- increases extension version in manifest by semver `level`
72-
- commits changes with relevant message
73-
- performs `prepare`
74-
- creates browser specific packages of the extension
87+
For more details about the build system, see [BUILD.md](BUILD.md).

0 commit comments

Comments
 (0)