Improve configuration & README. Add license.
This commit is contained in:
parent
031eaf8ea0
commit
2bde3313b8
10 changed files with 124 additions and 58 deletions
|
@ -1,24 +1,24 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
parser: "@typescript-eslint/parser",
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier",
|
||||
],
|
||||
plugins: ["svelte3", "@typescript-eslint"],
|
||||
ignorePatterns: ["*.cjs"],
|
||||
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
|
||||
settings: {
|
||||
"svelte3/typescript": () => require("typescript"),
|
||||
},
|
||||
parserOptions: {
|
||||
sourceType: "module",
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
es2017: true,
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier",
|
||||
],
|
||||
ignorePatterns: ["*.cjs"],
|
||||
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
|
||||
plugins: ["svelte3", "@typescript-eslint"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
sourceType: "module",
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
root: true,
|
||||
settings: {
|
||||
"svelte3/typescript": () => require("typescript"),
|
||||
},
|
||||
}
|
||||
|
|
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -1,8 +1,6 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
/build
|
||||
/node_modules
|
||||
/*.env
|
||||
!/example.env
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/build
|
||||
/package
|
||||
.DS_Store
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
node_modules
|
||||
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
pnpm-lock.yaml
|
||||
|
|
14
.vscode/extensions.json
vendored
Normal file
14
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||
|
||||
// List of extensions which should be recommended for users of this workspace.
|
||||
"recommendations": [
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"EditorConfig.EditorConfig",
|
||||
"esbenp.prettier-vscode",
|
||||
"svelte.svelte-vscode"
|
||||
],
|
||||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
||||
"unwantedRecommendations": []
|
||||
}
|
21
.vscode/settings.json
vendored
Normal file
21
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[svelte]": {
|
||||
"editor.defaultFormatter": "svelte.svelte-vscode"
|
||||
}
|
||||
}
|
22
LICENSE.md
Normal file
22
LICENSE.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Tricoteuses Legal Explorer
|
||||
|
||||
## _Web API & site to browse legal open data from French Direction de l'information légale et administrative (Dila)_
|
||||
|
||||
By: Emmanuel Raviart <mailto:emmanuel@raviart.com>
|
||||
|
||||
Copyright (C) 2022 Emmanuel Raviart
|
||||
|
||||
https://git.en-root.org/tricoteuses/tricoteuses-legal-explorer
|
||||
|
||||
> Tricoteuses Legal Explorer is free software; you can redistribute it and/or modify
|
||||
> it under the terms of the GNU Affero General Public License as
|
||||
> published by the Free Software Foundation, either version 3 of the
|
||||
> License, or (at your option) any later version.
|
||||
>
|
||||
> Tricoteuses Legal Explorer is distributed in the hope that it will be useful,
|
||||
> but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
> GNU Affero General Public License for more details.
|
||||
>
|
||||
> You should have received a copy of the GNU Affero General Public License
|
||||
> along with this program. If not, see <http://www.gnu.org/licenses/>.
|
44
README.md
44
README.md
|
@ -1,38 +1,40 @@
|
|||
# create-svelte
|
||||
# Tricoteuses Legal Explorer
|
||||
|
||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
||||
## _Web API & site to browse legal open data from French Direction de l'information légale et administrative (Dila)_
|
||||
|
||||
## Creating a project
|
||||
_Tricoteuses Legal Explorer_ is free and open source software.
|
||||
|
||||
If you're seeing this, you've probably already done this step. Congrats!
|
||||
- [software repository](https://git.en-root.org/tricoteuses/tricoteuses-legal-explorer)
|
||||
- [GNU Affero General Public License version 3 or greater](https://git.en-root.org/tricoteuses/tricoteuses-legal-explorer/blob/master/LICENSE.md)
|
||||
|
||||
## Installation
|
||||
|
||||
### Install dependencies
|
||||
|
||||
```bash
|
||||
# create a new project in the current directory
|
||||
npm create svelte@latest
|
||||
|
||||
# create a new project in my-app
|
||||
npm create svelte@latest my-app
|
||||
npm install
|
||||
```
|
||||
|
||||
## Developing
|
||||
## Server Configuration
|
||||
|
||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||
Create a `.env` file to set configuration variables (you can use `example.env` as a template). Then:
|
||||
|
||||
```bash
|
||||
npm run configure
|
||||
npm run package
|
||||
```
|
||||
|
||||
## Server Launch
|
||||
|
||||
In development mode:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
|
||||
# or start the server and open the app in a new browser tab
|
||||
npm run dev -- --open
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
To create a production version of your app:
|
||||
In production mode:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
npm run preview
|
||||
```
|
||||
|
||||
You can preview the production build with `npm run preview`.
|
||||
|
||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||
|
|
23
package.json
23
package.json
|
@ -1,16 +1,24 @@
|
|||
{
|
||||
"name": "tricoteuses-legal",
|
||||
"name": "@tricoteuses/legal-explorer",
|
||||
"description": "Web API & site to browse legal open data from French Direction de l'information légale et administrative (Dila)",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.en-root.org/tricoteuses/tricoteuses-legal-explorer.git"
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"author": "Emmanuel Raviart <emmanuel@raviart.com>",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"package": "svelte-kit package",
|
||||
"preview": "vite preview",
|
||||
"test": "playwright test",
|
||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"dev": "vite dev",
|
||||
"format": "prettier --write --plugin-search-dir=. .",
|
||||
"lint": "prettier --check --plugin-search-dir=. . && eslint .",
|
||||
"format": "prettier --write --plugin-search-dir=. ."
|
||||
"package": "svelte-kit package",
|
||||
"preview": "vite preview",
|
||||
"test": "playwright test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.22.2",
|
||||
|
@ -35,6 +43,5 @@
|
|||
"tailwindcss": "^3.1.5",
|
||||
"@tailwindcss/typography": "^0.5.3",
|
||||
"daisyui": "^2.18.1"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import adapter from "@sveltejs/adapter-auto"
|
||||
import adapter from "@sveltejs/adapter-node"
|
||||
import preprocess from "svelte-preprocess"
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
|
@ -12,7 +12,9 @@ const config = {
|
|||
],
|
||||
|
||||
kit: {
|
||||
adapter: adapter(),
|
||||
adapter: adapter({
|
||||
precompress: true,
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue