Merge branch 'master' into 'master'
(webpack) adding webpack for dependencies bundling, .gitignore and .npmignore See merge request framasoft/peertube/peertube-plugin-quickstart!1
This commit is contained in:
commit
9061aabe2b
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
node_modules
|
||||||
|
.cache
|
||||||
|
dist
|
1
.npmignore
Normal file
1
.npmignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
LICENSE
|
4049
package-lock.json
generated
Normal file
4049
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@ -1,30 +1,37 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-quickstart",
|
"name": "peertube-plugin-quickstart",
|
||||||
"version": "0.0.2",
|
|
||||||
"description": "PeerTube plugin quickstart",
|
"description": "PeerTube plugin quickstart",
|
||||||
|
"version": "0.0.2",
|
||||||
|
"author": "Chocobozzz",
|
||||||
|
"bugs": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart/issues",
|
||||||
|
"clientScripts": [
|
||||||
|
{
|
||||||
|
"script": "dist/common-client-plugin.js",
|
||||||
|
"scopes": [
|
||||||
|
"common"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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"
|
||||||
},
|
},
|
||||||
|
"homepage": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"peertube",
|
"peertube",
|
||||||
"plugin"
|
"plugin"
|
||||||
],
|
],
|
||||||
"homepage": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart",
|
|
||||||
"author": "Chocobozzz",
|
|
||||||
"bugs": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart/issues",
|
|
||||||
"library": "./main.js",
|
"library": "./main.js",
|
||||||
"staticDirs": {
|
"staticDirs": {
|
||||||
"images": "public/images"
|
"images": "public/images"
|
||||||
},
|
},
|
||||||
"css": [
|
|
||||||
"assets/style.css"
|
|
||||||
],
|
|
||||||
"clientScripts": [
|
|
||||||
{
|
|
||||||
"script": "client/common-client-plugin.js",
|
|
||||||
"scopes": [ "common" ]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"translations": {
|
"translations": {
|
||||||
"fr-FR": "./languages/fr.json"
|
"fr-FR": "./languages/fr.json"
|
||||||
}
|
}
|
||||||
|
16
webpack.config.js
Normal file
16
webpack.config.js
Normal file
@ -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…
x
Reference in New Issue
Block a user