Compare commits

..

No commits in common. '5a22d3f977c6cc59c9daa03df5a66e43878c884d' and '346b3c1534004c9e053db1290e7c51f88d1ab5a4' have entirely different histories.

  1. 2
      client/common-client-plugin.js
  2. 4367
      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 }) { function register ({ registerHook, peertubeHelpers }) {
console.log('Hello world')
} }
export { export {

4367
package-lock.json generated

File diff suppressed because it is too large Load Diff

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

@ -1,20 +0,0 @@
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))

@ -0,0 +1,16 @@
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