1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00

build: deploy excalidraw package example (#4762)

* build: deploy excalidraw package example

* deploy public

* install deps script

* new lines
This commit is contained in:
Aakansha Doshi 2022-02-09 17:45:16 +05:30 committed by GitHub
parent 92ffe8dda6
commit ae8b1d8bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 3 deletions

4
.gitignore vendored

@ -23,3 +23,7 @@ static
yarn-debug.log*
yarn-error.log*
src/packages/excalidraw/types
src/packages/excalidraw/example/public/bundle.js
src/packages/excalidraw/example/public/excalidraw-assets-dev
src/packages/excalidraw/example/public/excalidraw.development.js

@ -76,7 +76,9 @@
"build:umd": "rm -rf dist && cross-env NODE_ENV=production webpack --config webpack.prod.config.js && cross-env NODE_ENV=development webpack --config webpack.dev.config.js && yarn gen:types",
"build:umd:withAnalyzer": "cross-env NODE_ENV=production ANALYZER=true webpack --config webpack.prod.config.js",
"pack": "yarn build:umd && yarn pack",
"start": "webpack serve --config webpack.dev-server.config.js "
"start": "webpack serve --config webpack.dev-server.config.js",
"install:deps": "yarn install --frozen-lockfile && yarn --cwd ../../../",
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js"
},
"dependencies": {
"dotenv": "10.0.0"

@ -14,7 +14,7 @@ const devServerConfig = {
hot: true,
compress: true,
static: {
directory: path.join(__dirname, "example"),
directory: path.join(__dirname, "./example/public"),
},
client: {
progress: true,

@ -3,6 +3,7 @@ const webpack = require("webpack");
const autoprefixer = require("autoprefixer");
const { parseEnvVariables } = require("./env");
const outputDir = process.env.EXAMPLE === "true" ? "example/public" : "dist";
module.exports = {
mode: "development",
devtool: false,
@ -10,7 +11,7 @@ module.exports = {
"excalidraw.development": "./entry.js",
},
output: {
path: path.resolve(__dirname, "dist"),
path: path.resolve(__dirname, outputDir),
library: "Excalidraw",
libraryTarget: "umd",
filename: "[name].js",