Browse Source

(webpack) adding webpack for dependencies bundling, .gitignore and .npmignore

main
Rigel Kent 2 years ago
committed by Chocobozzz
parent
commit
e5fda80e7b
  1. 3
      .gitignore
  2. 1
      .npmignore
  3. 4049
      package-lock.json
  4. 33
      package.json
  5. 16
      webpack.config.js

3
.gitignore

@ -0,0 +1,3 @@
node_modules
.cache
dist

1
.npmignore

@ -0,0 +1 @@
LICENSE

4049
package-lock.json
File diff suppressed because it is too large
View File

33
package.json

@ -1,30 +1,37 @@
{
"name": "peertube-plugin-quickstart",
"version": "0.0.2",
"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": {
"peertube": ">=1.3.0"
},
"homepage": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart",
"keywords": [
"peertube",
"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",
"staticDirs": {
"images": "public/images"
},
"css": [
"assets/style.css"
],
"clientScripts": [
{
"script": "client/common-client-plugin.js",
"scopes": [ "common" ]
}
],
"translations": {
"fr-FR": "./languages/fr.json"
}

16
webpack.config.js

@ -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