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
Original file line number Diff line number Diff line change
Expand Up @@ -39,41 +39,46 @@ stages:
inputs:
targetType: 'inline'
script: |
# Define the root path where projects are located
rootPath="$(Build.SourcesDirectory)/projects"

# Get all first-level subdirectories in the specified root path
subdirectories=$(find "$rootPath" -mindepth 1 -maxdepth 1 -type d)

for subdirectory in $subdirectories; do
# Extract the directory name from the path
dirName=$(basename "$subdirectory")

# Give each sample a version in its package.json file - for traceability
cd "$subdirectory"
echo "Calling npm version command"
npm version $(Build.BuildNumber) --no-git-tag-version

# Check if the directory name is already camel-case
if [[ "$dirName" =~ ^[A-Z]+[a-z]+([A-Z][a-z]*)*$ ]]; then
# If already camel-case, print it as is
echo "$dirName"
else
# Convert to camel-case (capitalize first letters and remove hyphens)
dirName=$(echo "$dirName" | sed -E 's/(^|-)([a-z])/\U\2/g')

fi

echo "Processing directory: $dirName"

# Define the name for the zip file
zipName="$(Build.ArtifactStagingDirectory)/IgniteUI_Grid_Demos_React_${dirName}_Source.zip"
echo "Creating ZIP: $zipName"

# Compress the directory into a ZIP file
(cd "$subdirectory" && zip -r "$zipName" .)
done

create_zips() {
local rootPath="$1"
if [ -d "$rootPath" ]; then
# Get all first-level subdirectories in the specified root path
subdirectories=$(find "$rootPath" -mindepth 1 -maxdepth 1 -type d)
for subdirectory in $subdirectories; do
# Extract the directory name from the path
dirName=$(basename "$subdirectory")

# Give each sample a version in its package.json file - for traceability
cd "$subdirectory"
echo "Setting project version in package.json to $(Build.BuildNumber) for $dirName"
npm version $(Build.BuildNumber) --no-git-tag-version

# Check if the directory name is already camel-case
if [[ "$dirName" =~ ^[A-Z]+[a-z]+([A-Z][a-z]*)*$ ]]; then
# If already camel-case, print it as is
echo "$dirName"
else
# Convert to camel-case (capitalize first letters and remove hyphens)
dirName=$(echo "$dirName" | sed -E 's/(^|-)([a-z])/\U\2/g')
fi

echo "Processing directory: $dirName"
# Define the name for the zip file
zipName="$(Build.ArtifactStagingDirectory)/IgniteUI_Grid_Demos_React_${dirName}_Source.zip"
echo "Creating ZIP: $zipName"

# Compress the directory into a ZIP file
(cd "$subdirectory" && zip -r "$zipName" .)
done
fi
}

# Pass 1: All first-level directories in projects/
create_zips "$(Build.SourcesDirectory)/projects"

# Pass 2: All first-level directories in projects/charts/
create_zips "$(Build.SourcesDirectory)/projects/charts"

echo "All sample projects have been compressed and saved to the artifacts directory."

- task: PublishPipelineArtifact@1
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<title>grid landing pages</title>
<title>Demos Landing Pages</title>
<link rel="stylesheet" href="./styles.css">
<link href='https://fonts.googleapis.com/css?family=Titillium+Web:wght@300;400;600;700' rel='stylesheet'>
<link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'>
Expand Down
84 changes: 43 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"@igniteui/material-icons-extended": "^3.0.0",
"element-internals-polyfill": "^1.3.10",
"functions-have-names": "^1.2.3",
"igniteui-react": "19.0.3",
"igniteui-react-charts": "19.0.0",
"igniteui-react-core": "19.0.0",
"igniteui-react-grids": "19.0.3",
"igniteui-react-maps": "19.0.0",
"igniteui-react": "19.2.0",
"igniteui-react-charts": "19.0.1",
"igniteui-react-core": "19.0.1",
"igniteui-react-grids": "19.2.0",
"igniteui-react-maps": "19.0.1",
"lit": "^3.3.0",
"react": "^19.0.0",
"react-app-polyfill": "^0.2.0",
Expand Down
24 changes: 24 additions & 0 deletions projects/charts/bar-chart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
54 changes: 54 additions & 0 deletions projects/charts/bar-chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
28 changes: 28 additions & 0 deletions projects/charts/bar-chart/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
)
17 changes: 17 additions & 0 deletions projects/charts/bar-chart/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title> Bar Chart </title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
<link rel="stylesheet" href="./node_modules/igniteui-webcomponents-grids/grids/themes/light/material.css" />
<link rel="stylesheet" href="./styles.scss" />
</head>
<body class="ig-scrollbar ig-typography">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading