mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-21 19:03:02 +00:00
Revert build changes
This commit is contained in:
parent
0a2f7443ad
commit
1ab640fda1
11 changed files with 984 additions and 566 deletions
|
@ -13,7 +13,7 @@
|
||||||
!/package-lock.json
|
!/package-lock.json
|
||||||
!/requirements.dev.txt
|
!/requirements.dev.txt
|
||||||
!/requirements.txt
|
!/requirements.txt
|
||||||
!/rollup.config.mjs
|
!/rollup.config.js
|
||||||
!/supervisord.conf
|
!/supervisord.conf
|
||||||
!/uwsgi.ini
|
!/uwsgi.ini
|
||||||
!/version.txt
|
!/version.txt
|
||||||
|
|
22
.github/workflows/main.yaml
vendored
22
.github/workflows/main.yaml
vendored
|
@ -7,18 +7,17 @@ jobs:
|
||||||
name: Unit Tests
|
name: Unit Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
cache: 'npm'
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
run: npm ci
|
run: npm install
|
||||||
- name: Setup Python environment
|
- name: Setup Python environment
|
||||||
run: pip install -r requirements.txt -r requirements.dev.txt
|
run: pip install -r requirements.txt -r requirements.dev.txt
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
@ -27,18 +26,17 @@ jobs:
|
||||||
name: E2E Tests
|
name: E2E Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
cache: 'npm'
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
run: npm ci
|
run: npm install
|
||||||
- name: Setup Python environment
|
- name: Setup Python environment
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt -r requirements.dev.txt
|
pip install -r requirements.txt -r requirements.dev.txt
|
||||||
|
|
|
@ -209,9 +209,9 @@
|
||||||
{/if}
|
{/if}
|
||||||
{#each suggestions.tags as suggestion}
|
{#each suggestions.tags as suggestion}
|
||||||
<li class="menu-item" class:selected={selectedIndex === suggestion.index}>
|
<li class="menu-item" class:selected={selectedIndex === suggestion.index}>
|
||||||
<button on:mousedown|preventDefault={() => completeSuggestion(suggestion)}>
|
<a href="#" on:mousedown|preventDefault={() => completeSuggestion(suggestion)}>
|
||||||
{suggestion.label}
|
{suggestion.label}
|
||||||
</button>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
@ -220,9 +220,9 @@
|
||||||
{/if}
|
{/if}
|
||||||
{#each suggestions.recentSearches as suggestion}
|
{#each suggestions.recentSearches as suggestion}
|
||||||
<li class="menu-item" class:selected={selectedIndex === suggestion.index}>
|
<li class="menu-item" class:selected={selectedIndex === suggestion.index}>
|
||||||
<button on:mousedown|preventDefault={() => completeSuggestion(suggestion)}>
|
<a href="#" on:mousedown|preventDefault={() => completeSuggestion(suggestion)}>
|
||||||
{suggestion.label}
|
{suggestion.label}
|
||||||
</button>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
@ -231,9 +231,9 @@
|
||||||
{/if}
|
{/if}
|
||||||
{#each suggestions.bookmarks as suggestion}
|
{#each suggestions.bookmarks as suggestion}
|
||||||
<li class="menu-item" class:selected={selectedIndex === suggestion.index}>
|
<li class="menu-item" class:selected={selectedIndex === suggestion.index}>
|
||||||
<button on:mousedown|preventDefault={() => completeSuggestion(suggestion)}>
|
<a href="#" on:mousedown|preventDefault={() => completeSuggestion(suggestion)}>
|
||||||
{suggestion.label}
|
{suggestion.label}
|
||||||
</button>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -131,9 +131,9 @@
|
||||||
<!-- menu list items -->
|
<!-- menu list items -->
|
||||||
{#each suggestions as tag,i}
|
{#each suggestions as tag,i}
|
||||||
<li class="menu-item" class:selected={selectedIndex === i}>
|
<li class="menu-item" class:selected={selectedIndex === i}>
|
||||||
<button on:mousedown|preventDefault={() => complete(tag)}>
|
<a href="#" on:mousedown|preventDefault={() => complete(tag)}>
|
||||||
{tag.name}
|
{tag.name}
|
||||||
</button>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
import './behaviors/bookmark-page';
|
import TagAutoComplete from "./components/TagAutocomplete.svelte";
|
||||||
import './behaviors/bulk-edit';
|
import SearchAutoComplete from "./components/SearchAutoComplete.svelte";
|
||||||
import './behaviors/confirm-button';
|
import { ApiClient } from "./api";
|
||||||
import './behaviors/dropdown';
|
import "./behaviors/bookmark-page";
|
||||||
import './behaviors/modal';
|
import "./behaviors/bulk-edit";
|
||||||
import './behaviors/global-shortcuts';
|
import "./behaviors/confirm-button";
|
||||||
import './behaviors/tag-autocomplete';
|
import "./behaviors/dropdown";
|
||||||
export { default as TagAutoComplete } from './components/TagAutocomplete.svelte';
|
import "./behaviors/modal";
|
||||||
export { default as SearchAutoComplete } from './components/SearchAutoComplete.svelte';
|
import "./behaviors/global-shortcuts";
|
||||||
export { ApiClient } from './api';
|
import "./behaviors/tag-autocomplete";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
ApiClient,
|
||||||
|
TagAutoComplete,
|
||||||
|
SearchAutoComplete,
|
||||||
|
};
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
FROM node:20-alpine AS node-build
|
FROM node:18.18.0-alpine AS node-build
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
COPY rollup.config.mjs package.json package-lock.json ./
|
COPY rollup.config.js package.json package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm install
|
||||||
# copy files needed for JS build
|
# copy files needed for JS build
|
||||||
COPY bookmarks/frontend ./bookmarks/frontend
|
COPY bookmarks/frontend ./bookmarks/frontend
|
||||||
# run build
|
# run build
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
FROM node:20-alpine AS node-build
|
FROM node:18.18.0-alpine AS node-build
|
||||||
WORKDIR /etc/linkding
|
WORKDIR /etc/linkding
|
||||||
# install build dependencies
|
# install build dependencies
|
||||||
COPY rollup.config.mjs package.json package-lock.json ./
|
COPY rollup.config.js package.json package-lock.json ./
|
||||||
RUN npm ci
|
RUN npm install
|
||||||
# copy files needed for JS build
|
# copy files needed for JS build
|
||||||
COPY bookmarks/frontend ./bookmarks/frontend
|
COPY bookmarks/frontend ./bookmarks/frontend
|
||||||
# run build
|
# run build
|
||||||
|
|
1382
package-lock.json
generated
1382
package-lock.json
generated
File diff suppressed because it is too large
Load diff
13
package.json
13
package.json
|
@ -13,18 +13,19 @@
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "ISC",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/sissbruecker/linkding/issues"
|
"url": "https://github.com/sissbruecker/linkding/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/sissbruecker/linkding#readme",
|
"homepage": "https://github.com/sissbruecker/linkding#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-commonjs": "^21.0.2",
|
||||||
"@rollup/plugin-terser": "^0.4.4",
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||||
"rollup": "^4.13.0",
|
"rollup": "^2.70.1",
|
||||||
"rollup-plugin-svelte": "^7.2.0",
|
"rollup-plugin-svelte": "^7.1.0",
|
||||||
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
"spectre.css": "^0.5.8",
|
"spectre.css": "^0.5.8",
|
||||||
"svelte": "^4.0.0"
|
"svelte": "^3.49.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "^3.0.2"
|
"prettier": "^3.0.2"
|
||||||
|
|
40
rollup.config.js
Normal file
40
rollup.config.js
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
import svelte from 'rollup-plugin-svelte';
|
||||||
|
import resolve from '@rollup/plugin-node-resolve';
|
||||||
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
|
import { terser } from 'rollup-plugin-terser';
|
||||||
|
|
||||||
|
const production = !process.env.ROLLUP_WATCH;
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'bookmarks/frontend/index.js',
|
||||||
|
output: {
|
||||||
|
sourcemap: true,
|
||||||
|
format: 'iife',
|
||||||
|
name: 'linkding',
|
||||||
|
// Generate bundle in static folder to that it is picked up by Django static files finder
|
||||||
|
file: 'bookmarks/static/bundle.js'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
svelte({
|
||||||
|
emitCss: false
|
||||||
|
}),
|
||||||
|
|
||||||
|
// If you have external dependencies installed from
|
||||||
|
// npm, you'll most likely need these plugins. In
|
||||||
|
// some cases you'll need additional configuration —
|
||||||
|
// consult the documentation for details:
|
||||||
|
// https://github.com/rollup/rollup-plugin-commonjs
|
||||||
|
resolve({
|
||||||
|
browser: true,
|
||||||
|
dedupe: importee => importee === 'svelte' || importee.startsWith('svelte/')
|
||||||
|
}),
|
||||||
|
commonjs(),
|
||||||
|
|
||||||
|
// If we're building for production (npm run build
|
||||||
|
// instead of npm run dev), minify
|
||||||
|
production && terser()
|
||||||
|
],
|
||||||
|
watch: {
|
||||||
|
clearScreen: false
|
||||||
|
}
|
||||||
|
};
|
|
@ -1,37 +0,0 @@
|
||||||
import svelte from 'rollup-plugin-svelte';
|
|
||||||
import resolve from '@rollup/plugin-node-resolve';
|
|
||||||
import terser from '@rollup/plugin-terser';
|
|
||||||
|
|
||||||
const production = !process.env.ROLLUP_WATCH;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: 'bookmarks/frontend/index.js',
|
|
||||||
output: {
|
|
||||||
sourcemap: true,
|
|
||||||
format: 'iife',
|
|
||||||
name: 'linkding',
|
|
||||||
// Generate bundle in static folder to that it is picked up by Django static files finder
|
|
||||||
file: 'bookmarks/static/bundle.js',
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
svelte({
|
|
||||||
emitCss: false,
|
|
||||||
}),
|
|
||||||
|
|
||||||
// If you have external dependencies installed from
|
|
||||||
// npm, you'll most likely need these plugins. In
|
|
||||||
// some cases you'll need additional configuration —
|
|
||||||
// consult the documentation for details:
|
|
||||||
// https://github.com/rollup/rollup-plugin-commonjs
|
|
||||||
resolve({
|
|
||||||
browser: true,
|
|
||||||
}),
|
|
||||||
|
|
||||||
// If we're building for production (npm run build
|
|
||||||
// instead of npm run dev), minify
|
|
||||||
production && terser(),
|
|
||||||
],
|
|
||||||
watch: {
|
|
||||||
clearScreen: false,
|
|
||||||
},
|
|
||||||
};
|
|
Loading…
Reference in a new issue