Skip to content

Commit

Permalink
fix: build script
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Jul 31, 2023
1 parent 439a868 commit 6b1d8e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 15.x, 16.x]
node-version: [18.x, 19.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
Expand All @@ -23,10 +23,10 @@ jobs:
- run: npm i
- run: npm test
- name: Generate Coverage
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '15.x' }}
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '19.x' }}
run: npm run cov
- name: Coveralls
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '15.x' }}
if: ${{ success() && github.event_name != 'pull_request' && matrix.node-version == '19.x' }}
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./coverage/lcov.info
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"require": "./cli.cjs"
},
"engines": {
"node": ">=10.0.0"
"node": ">=18.0.0"
},
"bin": {
"riot": "cli.js"
Expand Down
20 changes: 12 additions & 8 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import json from '@rollup/plugin-json'

export default {
input: 'index.js',
output: {
banner: '#!/usr/bin/env node',
file: 'cli.js',
format: ['es', 'cjs'],
},
plugins: [json()],
output: [
{
banner: '#!/usr/bin/env node',
file: 'cli.js',
format: 'es',
},
{
banner: '#!/usr/bin/env node',
file: 'cli.cjs',
format: 'cjs',
},
],
}
2 changes: 2 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { babel } from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import riot from 'rollup-plugin-riot'

export function getRollupPlugins(options) {
return [
json(options.json),
riot(options.riot),
nodeResolve(options.resolve),
commonjs(options.commonjs),
Expand Down

0 comments on commit 6b1d8e1

Please sign in to comment.