Skip to content

Commit 14a2b1c

Browse files
committed
Refactor build process
* migrate Grunt to Yarn tasks * remove generated CSS sources * use single build pipeline instead of Node matrix
1 parent 5050e8d commit 14a2b1c

15 files changed

Lines changed: 1088 additions & 1621 deletions

.github/workflows/nodejs.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,17 @@ jobs:
77

88
runs-on: ubuntu-latest
99

10-
strategy:
11-
matrix:
12-
node-version: [18, 20, 24]
13-
1410
steps:
15-
- uses: actions/checkout@v5
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v5
11+
- uses: actions/checkout@v6
12+
- uses: actions/setup-node@v6
1813
with:
19-
node-version: ${{ matrix.node-version }}
20-
- name: npm install, build, and test
21-
run: |
22-
yarn
23-
yarn run build --if-present
14+
node-version: 24
15+
- name: yarn install
16+
run: yarn install
17+
- name: build
18+
run: yarn build
2419
env:
2520
CI: true
26-
2721
- name: lint
2822
run: yarn lint
2923
env:

Gruntfile.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

package.json

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,26 @@
3434
"chartist": "^1.0.0"
3535
},
3636
"devDependencies": {
37+
"@eslint/js": "^10.0.1",
38+
"copyfiles": "^2.4.1",
39+
"del": "^8.0.1",
40+
"del-cli": "^7.0.0",
3741
"eslint": "^10.1.0",
3842
"eslint-config-prettier": "^10.1.8",
39-
"eslint-plugin-prettier": "^5.5.5",
40-
"grunt": "^1.6.1",
41-
"grunt-contrib-clean": "^2.0.1",
42-
"grunt-contrib-copy": "^1.0.0",
43-
"grunt-contrib-jshint": "^3.2.0",
44-
"grunt-contrib-uglify": "^5.2.2",
45-
"grunt-eslint": "^26.0.0",
46-
"grunt-sass": "^4.0.0",
47-
"grunt-umd": "^3.0.0",
48-
"jasmine-fixture": "^2.0.0",
49-
"jshint-stylish": "^2.2.1",
50-
"load-grunt-config": "^4.0.1",
43+
"globals": "^17.4.0",
44+
"minify": "^15.2.0",
5145
"prettier": "^3.8.1",
52-
"sass": "^1.79.4",
53-
"time-grunt": "^2.0.0"
46+
"sass": "^1.98.0",
47+
"terser": "^5.46.1"
5448
},
5549
"scripts": {
56-
"build": "grunt build",
50+
"clean": "del ./dist ./.tmp",
51+
"build": "yarn clean && yarn build:styles && yarn build:scripts",
52+
"build:scripts": "terser -o dist/chartist-plugin-tooltip.js src/scripts/chartist-plugin-tooltip.js",
53+
"build:styles": "sass --no-source-map --style compressed src/styles:dist",
5754
"format": "prettier --write 'src/**/*.js'",
58-
"lint": "grunt lint",
59-
"prepare": "grunt build",
60-
"version": "grunt build && git add -A ."
61-
},
62-
"config": {
63-
"banner": "/* chartist-plugin-tooltip <%= pkg.version %>\n * Copyright © <%= year %> Markus Padourek\n * Free to use under the WTFPL license.\n * http://www.wtfpl.net/\n */\n",
64-
"src": "src",
65-
"dist": "dist",
66-
"tmp": ".tmp",
67-
"src_name": "chartist-plugin-tooltip"
55+
"lint": "eslint 'src/scripts/**/*.js'",
56+
"prepare": "yarn build"
6857
},
6958
"license": "MIT"
7059
}

src/css/chartist-plugin-tooltip.css

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/css/chartist-plugin-tooltip.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

tasks/aliases.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

tasks/clean.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

tasks/copy.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

tasks/eslint.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)