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

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

3
.gitignore vendored

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

@ -0,0 +1 @@
LICENSE

4049
package-lock.json generated

File diff suppressed because it is too large Load Diff

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

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