Skip to content

Commit f0adc1e

Browse files
committed
init
0 parents  commit f0adc1e

15 files changed

+4302
-0
lines changed

.dependabot/config.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 1
2+
3+
update_configs:
4+
- package_manager: 'javascript'
5+
directory: '/'
6+
update_schedule: 'live'
7+
allowed_updates:
8+
- match:
9+
dependency_type: 'development'
10+
update_type: 'all'
11+
automerged_updates:
12+
- match:
13+
dependency_type: 'development'
14+
update_type: 'all'
15+
target_branch: master

.github/workflows/ci.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-node@v1
12+
- run: yarn install
13+
- run: yarn run test
14+
env:
15+
CI: true

.gitignore

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# TypeScript v1 declaration files
45+
typings/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
78+
# Next.js build output
79+
.next
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
90+
# vuepress build output
91+
.vuepress/dist
92+
93+
# Serverless directories
94+
.serverless/
95+
96+
# FuseBox cache
97+
.fusebox/
98+
99+
# DynamoDB Local files
100+
.dynamodb/
101+
102+
# TernJS port file
103+
.tern-port

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Sveltik
2+
3+
Forms in Svelte, inspired by Formik.
4+
5+
```html
6+
<Form
7+
initialValues={{
8+
email: '',
9+
password: '',
10+
}}
11+
validate
12+
on:submit={handleSubmit}
13+
>
14+
<Field name="input" let:change let:blur let:fieldName let:value>
15+
<input name={fieldName} {value} on:input={change} on:blur={blur} type="number" />
16+
</Field>
17+
</Form>
18+
```

package.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "sveltik",
3+
"version": "0.1.0",
4+
"repository": "[email protected]:mapgrid/sveltik.git",
5+
"author": "mapgrid <[email protected]>",
6+
"svelte": "src/index.js",
7+
"module": "dist/index.mjs",
8+
"main": "dist/index.js",
9+
"license": "MIT",
10+
"devDependencies": {
11+
"@rollup/plugin-node-resolve": "^7.1.1",
12+
"jest": "^25.1.0",
13+
"prettier": "^1.19.1",
14+
"rollup": "^1.31.0",
15+
"rollup-plugin-svelte": "^5.1.1",
16+
"svelte": "^3.0.0"
17+
},
18+
"dependencies": {
19+
"lodash-es": "^4.0.0",
20+
"svelte": "^3.0.0"
21+
},
22+
"keywords": [
23+
"svelte"
24+
],
25+
"files": [
26+
"src",
27+
"dist"
28+
],
29+
"scripts": {
30+
"build": "rollup -c",
31+
"watch": "rollup -cw",
32+
"format": "prettier --write \"**/*.js\" \"**/*.json\"",
33+
"test": "jest"
34+
}
35+
}

prettier.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
printWidth: 80,
3+
trailingComma: 'all',
4+
tabWidth: 4,
5+
semi: false,
6+
singleQuote: true,
7+
}

rollup.config.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import svelte from 'rollup-plugin-svelte'
2+
import resolve from '@rollup/plugin-node-resolve'
3+
import pkg from './package.json'
4+
5+
const name = pkg.name
6+
.replace(/^(@\S+\/)?(svelte-)?(\S+)/, '$3')
7+
.replace(/^\w/, m => m.toUpperCase())
8+
.replace(/-\w/g, m => m[1].toUpperCase())
9+
10+
export default {
11+
input: 'src/index.js',
12+
output: [
13+
{ file: pkg.module, format: 'es' },
14+
{ file: pkg.main, format: 'umd', name },
15+
],
16+
plugins: [svelte(), resolve()],
17+
}

0 commit comments

Comments
 (0)