Skip to content
Open
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
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Deploy to GitHub Pages

on:
push:
branches: 'renewal'

jobs:
build_site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: |
npm install
cd docs
npm install

- name: build
env:
BASE_PATH: '/svelma'
run: |
cd docs
npm run build
touch build/.nojekyll

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
with:
# this should match the `pages` option in your adapter-static options
path: 'docs/build/'

deploy:
needs: build_site
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
.DS_Store
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist/*
public/build
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
60 changes: 60 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Dependencies
node_modules/

# Build outputs
dist/
dist-ssr/
*.local

# Development files
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Documentation
docs/
*.md
!README.md

# Config files
.gitignore
.npmignore
.gitattributes
.eslintrc*
.prettierrc*

# Test files
test/
*.test.*
*.spec.*

# Example files
examples/
example/

# CI/CD
.github/
.gitlab-ci.yml
.travis.yml
circle.yml
appveyor.yml

# Misc
.editorconfig
.cache/
coverage/
.nyc_output/
8 changes: 0 additions & 8 deletions .prettierrc.js

This file was deleted.

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"svelte.svelte-vscode",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
}
50 changes: 7 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,67 +21,31 @@
### 1. Import svelma and dependencies via npm to your project

```bash
$ npm install --save bulma svelma
$ npm install node-sass svelte-preprocess rollup-plugin-postcss --save-dev
$ npm install --save-dev svelma @fortawesome/fontawesome-free bulma
```

### 2. Add the postcss plugin to your rollup config

```js
// rollup.config.js
import postcss from 'rollup-plugin-postcss'
import preprocess from 'svelte-preprocess'

// ...

export default {
// ...
plugins: [
svelte({
// ...
preprocess: preprocess()
}),

postcss(),
]
}
```

### 3. Import Bulma's CSS and Svelma components

```html
<!-- App.svelte -->
<script>
import 'bulma/css/bulma.css'
import { Button } from 'svelma'
</script>

<Button type="is-primary">I'm a Button!</Button>
```

### 4. Include [Font Awesome](https://fontawesome.com/) icons
### 2. Import CSS dependencies

From CDN in your HTML page:

```html
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" />
```

Or as an npm package imported into your root component:

`$ npm install --save @fortawesome/fontawesome-free`

```html
<!-- App.svelte -->
<script>
import 'bulma/css/bulma.css'
import '@fortawesome/fontawesome-free/css/all.css'
import { Button } from 'svelma'
</script>

<Button type="is-primary">I'm a Button!</Button>
```

### SSR

If you are doing server-side rendering with Sapper (or [SvelteKit](https://kit.svelte.dev/)), you'll need to import the .svelte files directly so that your app can compile them, rather than importing from the compiled module.
If you are doing server-side rendering with [SvelteKit](https://kit.svelte.dev/)). You'll need to import the .svelte files directly so that your app can compile them, rather than importing from the compiled module.

i.e.:

Expand All @@ -98,4 +62,4 @@ import { Button } from 'svelma'

# Inspiration

Much thanks to the [Buefy](https://buefy.org) and [Svelma2](https://github.com/abbychau/svelma2) projects! It provided the inspiration and lots of code examples for this version of Svelma.
Much thanks to the [Buefy](https://buefy.org) and [Svelma2](https://github.com/abbychau/svelma2) projects! It provided the inspiration and lots of code examples for this version of Svelma.
22 changes: 0 additions & 22 deletions docs.sh

This file was deleted.

13 changes: 8 additions & 5 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.DS_Store
node_modules
yarn-error.log
/cypress/screenshots/
/__sapper__/

.vercel
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
2 changes: 2 additions & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest
Loading
Loading