Skip to content
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

Release 11.0.0 #248

Merged
merged 22 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ec952d9
Merge pull request #244 from silinternational/main
hobbitronics Jan 23, 2024
aee3f1b
build(deps): bump ip from 2.0.0 to 2.0.1
dependabot[bot] Feb 20, 2024
971da30
Merge pull request #245 from silinternational/dependabot/npm_and_yarn…
hobbitronics Feb 21, 2024
b078360
run the script and update svelte
hobbitronics Mar 4, 2024
597a0e2
got storybook building
hobbitronics Mar 4, 2024
2fc3b2a
remove addon-postcss
hobbitronics Mar 4, 2024
6d19288
remove commented code
hobbitronics Mar 4, 2024
93e96f2
use storybook/svelte-vite
hobbitronics Mar 4, 2024
b8a6625
remove css-loader
hobbitronics Mar 4, 2024
3c62f05
remove babel
hobbitronics Mar 4, 2024
077b838
fix href typo
hobbitronics Mar 4, 2024
538e51f
add autoddocs tag in Meta
hobbitronics Mar 4, 2024
b765b9d
Merge branch 'feature/update-svelte-and-storybook' into feature/use-s…
hobbitronics Mar 4, 2024
c58d599
feat(core): update to svelte 4, storybook 7, sass to 1.77.x
hobbitronics Mar 4, 2024
cf98fe0
Merge pull request #246 from silinternational/feature/use-storybook/s…
hobbitronics Mar 7, 2024
75cd129
build(gh-pages): update gh-actions versions to fix failed storybook d…
hobbitronics Mar 7, 2024
1084855
build(release): update actions in release.yml
hobbitronics Mar 7, 2024
499cb6f
Merge pull request #247 from silinternational/feature/update-gh-actions
hobbitronics Mar 7, 2024
a85c404
package-lock out of sync
hobbitronics Mar 7, 2024
94c6856
build(deepfactor): also update deepfactor
hobbitronics Mar 7, 2024
f8e7969
default docs to true
hobbitronics Mar 12, 2024
2e6e769
missed a few tags
hobbitronics Mar 12, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/deepfactor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
DF_RUN_TOKEN: ${{ secrets.DF_RUN_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Scan with Deepfactor
run: dfctl scan -s fs -a ${{ github.event.repository.name }} -c ${{ github.event.repository.name }} -V ${{ github.ref_name }} .
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
Expand Down
50 changes: 16 additions & 34 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,26 @@
const path = require('path')

module.exports = {
"stories": [
/** @type { import('@storybook/svelte-vite').StorybookConfig } */
const config = {
stories: [
"../**/*.stories.mdx",
"../**/*.stories.@(js|jsx|ts|tsx|svelte)"
],
"addons": [
addons: [
"@storybook/addon-links",
hobbitronics marked this conversation as resolved.
Show resolved Hide resolved
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-svelte-csf",
"@storybook/preset-scss",
"@storybook/addon-postcss"
"@storybook/addon-mdx-gfm",
],
"svelteOptions": {
"emitCss": true,
"preprocess": require("svelte-preprocess")()
},
"core": {
"builder": "webpack5"
},
babel: async (options) => {
options.presets[0][1].loose = true
return options
},
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.

// Make whatever fine-grained changes you need
config.resolve.fallback.crypto = false;
config.resolve.alias.svelte = path.resolve('node_modules', 'svelte')

// config.module.rules[0].use[0].options.presets[0][1].loose = true
// console.log('!!!!!!!!!!!!', JSON.stringify(config.module.rules[0].use[0].options, null, 4))
// = [
// '@babel/plugin-proposal-class-properties',
// { loose: true }
// ]

return config;
framework: {
name: '@storybook/svelte-vite',
options: {
emitCss: true,
},
},
docs: {
autodocs: true,
},
}
}
export default config
7 changes: 3 additions & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '!style-loader!css-loader!../components/global.css'
import '../components/global.css'

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand All @@ -16,8 +16,7 @@ loadIcons()
function loadIcons() {
const link = document.createElement('link')

link.href = 'https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet'
link.href = 'https://fonts.googleapis.com/css?family=Material+Icons&display=block'
link.rel = 'stylesheet'

document.head.appendChild(link)
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Reusable Svelte components for some internal applications

## installation

To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D @silintl/ui-components` and press enter. Sass (depending on your bundler and plugins) and material-components-web are required to develop additional material web components in your app, but it may depend on your version of npm if they are necessary even if you don't (I haven't figured out which versions require them). Enter the commands `npm i -D material-components-web@14` and `npm i -D sass@1` (versions will vary if you use an older release of this library). You should already have svelte@3 installed if you are using this library.
To install to your Svelte project, open your project's root directory in a terminal. Type or paste `npm i -D @silintl/ui-components` and press enter. Sass (depending on your bundler and plugins) and material-components-web are required to develop additional material web components in your app, but it may depend on your version of npm if they are necessary even if you don't (I haven't figured out which versions require them). Enter the commands `npm i -D material-components-web@14` and `npm i -D sass@1` (versions will vary if you use an older release of this library). You should already have svelte@4 installed if you are using this library.

If you are using typescript you will need to run `npm i -D tslib` to avoid a material-components-web type error. This will already be installed if you have set up SvelteKit with typescript using `npm create svelte@latest app-name`.

Expand Down Expand Up @@ -69,7 +69,7 @@ and then import it to your sass entry point like \_index.scss. You may prefer to

SvelteKit won't need a bundler as it uses Vite, but Svelte projects will need a bundler (rollup or webpack most likely) configuration. If you are using rollup your plugins in your "rollup.config.js" should look something like this taking special note of postcss and svelte:

```
```js
import postcss from 'rollup-plugin-postcss';
import autoPreprocess from 'svelte-preprocess';

Expand Down
Loading
Loading