├── .gitignore ├── CHANGELOG.md ├── README.md ├── appveyor.yml ├── cypress.json ├── cypress ├── fixtures │ └── example.json ├── integration │ └── spec.js ├── plugins │ └── index.js └── support │ ├── commands.js │ └── index.js ├── nowignore.json ├── package-lock.json ├── package.json ├── src ├── client.js ├── components │ ├── Card.svelte │ ├── CategorySelection.svelte │ ├── Nav.svelte │ └── SupplierSelection.svelte ├── http.js ├── menu.js ├── routes │ ├── _error.svelte │ ├── _layout.svelte │ ├── about.svelte │ ├── categories.svelte │ ├── home.svelte │ ├── index.svelte │ └── products.svelte ├── server.js ├── service-worker.js └── template.html ├── static ├── favicon.png ├── global.css ├── great-success.png ├── logo-192.png ├── logo-512.png └── manifest.json └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | yarn-error.log 4 | /cypress/screenshots/ 5 | /__sapper__/ 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | #### 0.0.3 (2019-05-23) 2 | 3 | ##### New Features 4 | 5 | * Products crud page (106a0812) 6 | * A new Component: SupplierSelection (c4f72e99) 7 | * A new component: CategorySelection (c7b5814f) 8 | * List Products (9ebffa97) 9 | * New item: Products (43498114) 10 | 11 | ##### Bug Fixes 12 | 13 | * Supplier name on selection (1280ae6d) 14 | * Title of Home and About pages shows correctly (eabee78c) 15 | 16 | #### 0.0.2 (2019-05-21) 17 | 18 | ##### New Features 19 | 20 | * Delete category (ec56aaf4) 21 | 22 | ##### Bug Fixes 23 | 24 | * changelog v0.0.1 duplicated (6d434c42) 25 | 26 | #### 0.0.1 (2019-05-21) 27 | 28 | ##### Documentation Changes 29 | 30 | * demo url (2dcb255b) 31 | * README initial update (573b5ff7) 32 | 33 | ##### New Features 34 | 35 | * Adds changelog to project (f8255b95) 36 | * save category (f27db033) 37 | * Show category modal (df8b6c95) 38 | * categories with action buttons (d6d730d5) 39 | * now v2 implementation (331e5f59) 40 | * emojis :tada: (64ccf5de) 41 | * categories list table (070fd213) 42 | 43 | ##### Bug Fixes 44 | 45 | * changelog command (0dd2f675) 46 | * include externals bundle dependencies (f554a607) 47 | * change loader to webpack (89ba1502) 48 | * github href link (17cc808a) 49 | * github url (33435b36) 50 | * README (42949702) 51 | 52 | ##### Other Changes 53 | 54 | * Create a new category (45f366f4) 55 | * Displays a loding state on save category (ff0a788d) 56 | * card has a new parameter: title (ddbc4d33) 57 | 58 | ##### Refactors 59 | 60 | * app name (0020c563) 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Svelte+Sapper+Bulma Crud 2 | 3 | A basic CRUD (Create, Read, Update, Delete) using [Svelte](https://svelte.dev), [Sapper](https://sapper.svelte.dev) and [Bulma](https://bulma.io/). 4 | 5 | ## DEMO 6 | 7 | **WIP** https://svelte-sapper-bulma-crud.herokuapp.com/ **WIP** 8 | 9 | ## Instalation 10 | 11 | ``` 12 | $ git clone https://github.com/danielschmitz/svelte-sapper-bulma-crud.git 13 | $ cd svelte-sapper-bulma-crud 14 | $ npm install 15 | $ npm run dev 16 | ``` 17 | 18 | Go to http://localhost:3000 19 | 20 |  21 | 22 |  23 | 24 | ## Backend 25 | 26 | This CRUD uses northwind API: http://northwind.now.sh 27 | 28 | ## Stay updated about my books and cruds 29 | 30 |
Follow this accounts (low traffic, just book and crud updates)
31 | 32 | 37 | 38 | ## Roadmap 39 | 40 | See this [issue](https://github.com/danielschmitz/svelte-sapper-bulma-crud/issues/1) 41 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | shallow_clone: true 4 | 5 | init: 6 | - git config --global core.autocrlf false 7 | 8 | build: off 9 | 10 | environment: 11 | matrix: 12 | # node.js 13 | - nodejs_version: stable 14 | 15 | install: 16 | - ps: Install-Product node $env:nodejs_version 17 | - npm install cypress 18 | - npm install 19 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:3000", 3 | "video": false 4 | } -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /cypress/integration/spec.js: -------------------------------------------------------------------------------- 1 | describe('Sapper template app', () => { 2 | beforeEach(() => { 3 | cy.visit('/') 4 | }); 5 | 6 | it('has the correct8 | {title} 9 |
10 |{error.message}
37 | 38 | {#if dev && error.stack} 39 |{error.stack}40 | {/if} 41 | -------------------------------------------------------------------------------- /src/routes/_layout.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 |
Name | 95 |Description | 96 |Actions | 97 |
---|---|---|
{item.name} | 103 |{item.description} | 104 |105 | onItemClick(item)}> 106 | 107 | 108 | 109 | 110 | 111 | onDeleteClick(item)}> 112 | 113 | 114 | 115 | 116 | | 117 |
{error.message}
123 | {/await} 124 | 125 |{category.name}
134 | 135 |Name | 100 |Category | 101 |Supplier | 102 |Actions | 103 |
---|---|---|---|
{item.name} | 109 |{item.category.name} | 110 |{item.supplier.companyName} | 111 |112 | onItemClick(item)}> 113 | 114 | 115 | 116 | 117 | 118 | onDeleteClick(item)}> 119 | 120 | 121 | 122 | 123 | | 124 |
{error.message}
130 | {/await} 131 | 132 |{product.name}
147 | 148 |