Compare commits

..

5 Commits

Author SHA1 Message Date
Chocobozzz 5a22d3f977
0.0.4 3 years ago
Chocobozzz 6b92524ab9
Move to esbuild 3 years ago
Chocobozzz 65bf82a2be
0.0.3 3 years ago
Chocobozzz 0595929613
Update to webpack 5 3 years ago
Chocobozzz d1d1293b3d
Improve webpack template 4 years ago
  1. 2
      client/common-client-plugin.js
  2. 4381
      package-lock.json
  3. 12
      package.json
  4. 20
      scripts/build.js
  5. 16
      webpack.config.js

@ -1,5 +1,5 @@
function register ({ registerHook, peertubeHelpers }) {
console.log('Hello world')
}
export {

4381
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
{
"name": "peertube-plugin-quickstart",
"description": "PeerTube plugin quickstart",
"version": "0.0.2",
"version": "0.0.4",
"author": "Chocobozzz",
"bugs": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart/issues",
"clientScripts": [
@ -15,11 +15,6 @@
"css": [
"assets/style.css"
],
"devDependencies": {
"@purtuga/esm-webpack-plugin": "^1.1.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10"
},
"engine": {
"peertube": ">=1.3.0"
},
@ -31,12 +26,15 @@
"library": "./main.js",
"scripts": {
"prepare": "npm run build",
"build": "webpack --mode=production"
"build": "node ./scripts/build.js"
},
"staticDirs": {
"images": "public/images"
},
"translations": {
"fr-FR": "./languages/fr.json"
},
"devDependencies": {
"esbuild": "^0.14.36"
}
}

@ -0,0 +1,20 @@
const path = require('path')
const esbuild = require('esbuild')
const clientFiles = [
'common-client-plugin.js'
]
const configs = clientFiles.map(f => ({
entryPoints: [ path.resolve(__dirname, '..', 'client', f) ],
bundle: true,
minify: true,
format: 'esm',
target: 'safari11',
outfile: path.resolve(__dirname, '..', 'dist', f),
}))
const promises = configs.map(c => esbuild.build(c))
Promise.all(promises)
.catch(() => process.exit(1))

@ -1,16 +0,0 @@
const path = require("path")
const EsmWebpackPlugin = require("@purtuga/esm-webpack-plugin")
let config = {
entry: "./client/common-client-plugin.js",
output: {
path: path.resolve(__dirname, "./dist"),
filename: "./common-client-plugin.js",
library: "script",
libraryTarget: "var"
},
plugins: [new EsmWebpackPlugin()]
}
module.exports = config
Loading…
Cancel
Save