Skip to content

Commit d4c6de3

Browse files
committed
Add webpack bundling configuration for non-npm users
1 parent a920b6d commit d4c6de3

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
dist
12
node_modules/

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Code4Community's tools for programming games.",
55
"main": "src/index.js",
66
"scripts": {
7+
"build": "webpack --config webpack.config.js",
78
"grammar": "node_modules/.bin/lezer-generator src/lang.grammar -o src/lang.js"
89
},
910
"dependencies": {

webpack.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const path = require("path");
2+
3+
module.exports = {
4+
mode: "none",
5+
entry: "./src/index.js",
6+
output: {
7+
library: {
8+
name: "C4C",
9+
type: "var",
10+
export: "default",
11+
},
12+
filename: "bundle.js",
13+
path: path.resolve(__dirname, "dist"),
14+
},
15+
};

0 commit comments

Comments
 (0)