-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from IATI/setup
Setup repository structure
- Loading branch information
Showing
13 changed files
with
11,638 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Build project | ||
run: npm run build | ||
- name: Build storybook | ||
run: npm run build:storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# OS | ||
.DS_Store | ||
|
||
# NPM | ||
node_modules | ||
|
||
# Storybook | ||
*storybook.log | ||
storybook-static | ||
|
||
# Build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { StorybookConfig } from "@storybook/web-components-vite"; | ||
import { NodePackageImporter } from "sass"; | ||
|
||
const config: StorybookConfig = { | ||
framework: "@storybook/web-components-vite", | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: ["@storybook/addon-essentials"], | ||
async viteFinal(config) { | ||
const { mergeConfig } = await import("vite"); | ||
return mergeConfig(config, { | ||
css: { | ||
preprocessorOptions: { | ||
scss: { | ||
pkgImporter: new NodePackageImporter(), | ||
}, | ||
}, | ||
}, | ||
}); | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { Preview } from "@storybook/web-components"; | ||
|
||
import "../src/scss/iati.scss"; | ||
|
||
const preview: Preview = {}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
# design-system | ||
# IATI Design System | ||
|
||
## Usage | ||
|
||
### NPM | ||
|
||
``` | ||
npm install iati-design-system | ||
``` | ||
|
||
### CDN | ||
|
||
``` | ||
https://cdn.jsdelivr.net/npm/iati-design-system@[X.Y.Z]/dist/css/iati.css | ||
``` | ||
|
||
## Development | ||
|
||
Start storybook: | ||
|
||
``` | ||
npm start | ||
``` | ||
|
||
## Project Structure | ||
|
||
Sass code roughly follows [The 7-1 Pattern](https://sass-guidelin.es/#the-7-1-pattern). | ||
|
||
Storybook stories should be placed alongside their respective component. | ||
|
||
## Production build | ||
|
||
Build CSS: | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
Build storybook: | ||
|
||
``` | ||
npm run build:storybook | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import js from "@eslint/js"; | ||
import gitignore from "eslint-config-flat-gitignore"; | ||
import eslintConfigPrettier from "eslint-config-prettier"; | ||
import globals from "globals"; | ||
import tsEslint from "typescript-eslint"; | ||
|
||
export default [ | ||
gitignore(), | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
js.configs.recommended, | ||
...tsEslint.configs.recommended, | ||
eslintConfigPrettier, | ||
]; |
Oops, something went wrong.