Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 51 additions & 45 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
name: Release and Publish

on:
push:
branches:
- master
- alpha
- beta
- next
push:
branches:
- master
- alpha
- beta
- next

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: npm install
run: |
npm install
- name: npm lint
run: |
npm run lint
- name: npm test
run: |
npm test

release:
name: Release
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: npm install
run: |
npm install
- name: npx semantic-release
run: |
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: npm install
run: npm install

- name: npm lint
run: npm run lint

- name: npm types
run: npm run types

- name: npm test
run: npm test

release:
name: Release
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: npm install
run: npm install

- name: npm types
run: npm run types

- name: npx semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
22 changes: 10 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@ jobs:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: npm install
run: |
npm install
env:
CI: true
run: npm install

- name: npm lint
run: |
npm run lint
env:
CI: true
run: npm run lint

- name: npm types
run: npm run types

- name: npm test
run: |
npm test
env:
CI: true
run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules/
*.log
.vscode
dist
types
16 changes: 15 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 4
"tabWidth": 4,
"overrides": [
{
"files": [
".prettierrc",
"*.json",
"*.yml",
".travis.yml",
".eslintrc"
],
"options": {
"tabWidth": 2
}
}
]
}
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

Common generic utility methods shared by @podium modules.

[![Dependencies](https://img.shields.io/david/podium-lib/utils.svg)](https://david-dm.org/podium-lib/utils)
![GitHub Actions status](https://github.com/podium-lib/utils/workflows/Run%20Lint%20and%20Tests/badge.svg)
[![Known Vulnerabilities](https://snyk.io/test/github/podium-lib/utils/badge.svg?targetFile=package.json&style=flat-square)](https://snyk.io/test/github/podium-lib/utils?targetFile=package.json)

## Installation

```bash
$ npm install @podium/utils
npm install @podium/utils
```

## API
Expand Down Expand Up @@ -251,7 +249,7 @@ The method takes the following arguments:
import { AssetCss, buildLinkElement } from '@podium/utils';

const css = new AssetCss({
value: 'https://cdn.foo.com/style.css'
value: 'https://cdn.foo.com/style.css',
});

const element = buildLinkElement(css);
Expand All @@ -272,7 +270,7 @@ The method takes the following arguments:
import { AssetJs, buildScriptElement } from '@podium/utils';

const js = new utils.AssetJs({
value: 'https://cdn.foo.com/script.js'
value: 'https://cdn.foo.com/script.js',
});

const element = utils.buildScriptElement(js);
Expand Down
120 changes: 0 additions & 120 deletions index.d.ts

This file was deleted.

Loading