build: deploy excalidraw package example (#4762)
* build: deploy excalidraw package example * deploy public * install deps script * new lines
This commit is contained in:
parent
92ffe8dda6
commit
ae8b1d8bf7
4
.gitignore
vendored
4
.gitignore
vendored
@ -23,3 +23,7 @@ static
|
|||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
src/packages/excalidraw/types
|
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": "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",
|
"build:umd:withAnalyzer": "cross-env NODE_ENV=production ANALYZER=true webpack --config webpack.prod.config.js",
|
||||||
"pack": "yarn build:umd && yarn pack",
|
"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": {
|
"dependencies": {
|
||||||
"dotenv": "10.0.0"
|
"dotenv": "10.0.0"
|
||||||
|
@ -14,7 +14,7 @@ const devServerConfig = {
|
|||||||
hot: true,
|
hot: true,
|
||||||
compress: true,
|
compress: true,
|
||||||
static: {
|
static: {
|
||||||
directory: path.join(__dirname, "example"),
|
directory: path.join(__dirname, "./example/public"),
|
||||||
},
|
},
|
||||||
client: {
|
client: {
|
||||||
progress: true,
|
progress: true,
|
||||||
|
@ -3,6 +3,7 @@ const webpack = require("webpack");
|
|||||||
const autoprefixer = require("autoprefixer");
|
const autoprefixer = require("autoprefixer");
|
||||||
const { parseEnvVariables } = require("./env");
|
const { parseEnvVariables } = require("./env");
|
||||||
|
|
||||||
|
const outputDir = process.env.EXAMPLE === "true" ? "example/public" : "dist";
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: "development",
|
mode: "development",
|
||||||
devtool: false,
|
devtool: false,
|
||||||
@ -10,7 +11,7 @@ module.exports = {
|
|||||||
"excalidraw.development": "./entry.js",
|
"excalidraw.development": "./entry.js",
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, outputDir),
|
||||||
library: "Excalidraw",
|
library: "Excalidraw",
|
||||||
libraryTarget: "umd",
|
libraryTarget: "umd",
|
||||||
filename: "[name].js",
|
filename: "[name].js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user