Skip to content

Latest commit

 

History

History

open

Workflow

  1. Development
  • command: npm install --legacy-peer-deps
  • command: SERVE_PORT=8080 npm run dev-open
  • serving files under src/open, so you can import js files via http://localhost:8080/build/index.js
  1. Verify
  1. Build
  • Once development and verify complete, can proceed to next steps
  • Increment version.js
  • build: npm run build-open
  • this command will generate src/open/npm-publish and other resources
  1. Publish
  • run: (cd src/open/npm-publish && npm publish)
  • reference via: https://cdn.jsdelivr.net/npm/[email protected]/index.js

Usage

Build

npx webpack --watch --config src/open/webpack.config.js --progress --mode=development
# this will 

Serve file:

npm install -g http-server
http-server -c-1 --port 8080 '--cors=*' ./

Open file:

open http://localhost:8080/demo.html

Why built size has 7MB?

All css and resource are bundled together.

Publish

./src/open/script/build-for-publish.sh

# update version in src/open/npm-publish/package.json
(
    cd src/open/npm-publish
    npm publish
)

Npm: https://www.npmjs.com/package/xgo-explorer