Skip to content

feat: adding code and setup repo #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FONT_STYLE=regular
44 changes: 44 additions & 0 deletions .fantasticonrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const dotenv = require('dotenv')
const codepoints = require('./dist.web/icons.json')
dotenv.config()

const iconStyle = process.env.FONT_STYLE

module.exports = {
inputDir: `./icons/svgs/${iconStyle}`,
outputDir: './dist.web',
fontTypes: ['ttf', 'woff2', 'woff'],
assetTypes: ['css', 'json', 'ts'],
name: 'spark-icon',
codepoints: codepoints,
prefix: 'spark-icon',
selector: '.spark-icon',
tag: 'span',
formatOptions: {
json: {
indent: 4
},
ts: {
types: ['literalId'],
singleQuotes: true,
literalIdName: 'Icon'
},
svg: {
centerHorizontally: true,
centerVertically: true
}
},

templates: {
css: './src/css.hbs'
},

pathOptions: {
css: './dist.web/icons.css',
json: './dist.web/icons.json',
ts: './dist.web/index.d.ts',
ttf: `./dist.web/spark-icon-${iconStyle}.ttf`,
woff: `./dist.web/spark-icon-${iconStyle}.woff`,
woff2: `./dist.web/spark-icon-${iconStyle}.woff2`
}
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'daily'
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Semantic Release

on:
push:
branches: [feat/setup]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
release:
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
runs-on: 'ubuntu-latest'

permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install dependencies
run: |
npm install

- name: Run Semantic Release
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
RELEASE_PROCESS: 'true'
run: |
npm run release:zip
npx semantic-release
50 changes: 50 additions & 0 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Trivy Scan

on:
workflow_dispatch: {}
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: ['main']

jobs:
trivy-scan:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fecth-tags: true

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Generate Trivy Vulnerability Report
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
output: trivy-report.json
format: json
exit-code: 0

- name: Upload Vulnerability Scan Results
uses: actions/upload-artifact@v4
with:
name: trivy-report
path: trivy-report.json
retention-days: 30

- name: Check High/Criticial Vulnerabilities
id: checkVulnerabilities
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
format: table
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: 1
skip-setup-trivy: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
node_modules/**
gen/src/icons/**
dist.web.zip
10 changes: 10 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Skip hooks during release process
if [ "$RELEASE_PROCESS" = "true" ]; then
echo "Skipping commit-msg hook during release process"
exit 0
fi

npx --no-install commitlint --edit "$1"
11 changes: 11 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Skip hooks during release process
if [ "$RELEASE_PROCESS" = "true" ]; then
echo "Skipping pre-commit hook during release process"
exit 0
fi

npm run format
npx commitlint --edit $1
21 changes: 21 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
node_modules
node_modules/** */
gen
gen/** */
src
src/** */
.github
.github/** */
.vscode
.vscode/** */
.husky
.husky/** */
npm-debug.log
.stylelintrc.json
commitlint.config.js
.nvmrc
.releaserc
.env
.fantasticonrc.js
legacy.md
index.js
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.9.0
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
node_modules/**
*.hbs
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: false,
tabWidth: 4,
singleQuote: true,
trailingComma: 'none',
printWidth: 100
}
30 changes: 30 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"package.json",
"package-lock.json"
],
"message": "chore(release): bump version to ${nextRelease.version}"
}
],
[
"@semantic-release/github",
{
"assets": [
"dist.web.zip"
]
}
]
],
"branches": [
"feat/setup"
]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 1.0.0 (2025-06-13)


### Features

* adding code and setup repo ([281e14a](https://github.com/intel/intel-ui-icons/commit/281e14a0b4901488ea84f5e7ae03c66c9fbf8912))
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### License

<PROJECT NAME> is licensed under the terms in [LICENSE]<link to license file in repo>. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
Intel® UI Icons is licensed under the terms in [LICENSE](https://github.com/intel/intel-ui-icons/blob/main/LICENSE.md). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

### Sign your work

Expand Down
Loading