(webpack) adding webpack for dependencies bundling, .gitignore and .npmignore
This commit is contained in:
parent
664761b26c
commit
e5fda80e7b
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",
|
||||
"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
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…
Reference in New Issue
Block a user