remove node dependency
This commit is contained in:
parent
24f4062f03
commit
3ad7eaf463
14
README.md
14
README.md
|
@ -61,9 +61,7 @@ show up until at least one user ID is verified.
|
|||
Building
|
||||
--------
|
||||
|
||||
Hagrid consists of a Rust and a NPM project. While the web server is
|
||||
implemented in Rust, templates and CSS is bundled using NPM and Webpack.
|
||||
Building the Rust part requires a working nightly Rust toolchain. The
|
||||
Building Hagrid requires a working nightly Rust toolchain. The
|
||||
easiest way to get the toolchain is to download [rustup](https://rustup.rs).
|
||||
After rustup is installed, get the nightly compiler and tools:
|
||||
|
||||
|
@ -85,15 +83,7 @@ After compilation a binary is placed in `target/release/` called
|
|||
cp target/release/hagrid /usr/local/bin
|
||||
```
|
||||
|
||||
Bundling the web assets requires npm 8 or later. After you have npm installed
|
||||
fetch all dependencies and build the assets:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
The web assets are placed in `dist/`. To deploy the key server copy all
|
||||
To deploy the key server copy all
|
||||
directories under `public/` to a writable location. Then start the server with
|
||||
the _absolute_ path to the directory as argument:
|
||||
|
||||
|
|
39
package.json
39
package.json
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"name": "hagrid",
|
||||
"version": "1.0.0",
|
||||
"description": "A Verifying OpenPGP Key Server",
|
||||
"main": "",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@gitlab.com/sequoia-pgp/hagrid.git"
|
||||
},
|
||||
"author": "kai@sequoia-pgp.org",
|
||||
"license": "GPL-3.0",
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/sequoia-pgp/hagrid/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.com/sequoia-pgp/hagrid",
|
||||
"dependencies": {
|
||||
"bootstrap": "^4.1.3",
|
||||
"jquery": "^3.3.1",
|
||||
"popper.js": "^1.14.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^9.2.1",
|
||||
"bootswatch": "^4.1.3",
|
||||
"copy-webpack-plugin": "^4.5.3",
|
||||
"css-loader": "^1.0.0",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"node-sass": "^4.9.4",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.21.0",
|
||||
"webpack-cli": "^3.1.2"
|
||||
}
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
const path = require('path');
|
||||
const html = require('html-webpack-plugin');
|
||||
const text = require('extract-text-webpack-plugin');
|
||||
const copy = require('copy-webpack-plugin')
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
entry: './templates/index.js',
|
||||
output: {
|
||||
filename: 'site.js',
|
||||
path: path.resolve(__dirname, 'dist', 'public', 'assets'),
|
||||
publicPath: '/assets'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test:/\.(s*)css$/,
|
||||
use: text.extract({
|
||||
fallback: 'style-loader',
|
||||
use: [
|
||||
'css-loader',
|
||||
'sass-loader',
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
plugins: function () { // post css plugins, can be exported to postcss.config.js
|
||||
return [
|
||||
require('autoprefixer')
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new html({
|
||||
filename: '../../templates/layout.html.hbs',
|
||||
template: 'templates/layout.html.hbs',
|
||||
}),
|
||||
new text({
|
||||
filename: 'site.css'
|
||||
}),
|
||||
new copy([
|
||||
{
|
||||
from: 'templates/*.hbs',
|
||||
to: path.resolve(__dirname, 'dist', "templates"),
|
||||
ignore: [ 'layout.html.hbs' ],
|
||||
flatten: true
|
||||
}
|
||||
])
|
||||
]
|
||||
};
|
Loading…
Reference in New Issue