0.15.8 • Published 4 years ago

@devserver/package-exports v0.15.8

Weekly downloads
19
License
ISC
Repository
github
Last release
4 years ago

@devserver/cli

Minimalist development server with minimal disk impact and designed for modern development.

Dev support

  1. Support for JSX(pragma and jsx-runtime) and TS tanks to Sucrace.
  2. Livereload, HTTP2 with automatic SSL.
  3. Resolution from NPM only if the package has support for modules declared by package.json#exports orpackage.json#module.
  4. Alternative NPM package resolution via CDN.

Build support

  1. Support for JSX(pragma and jsx-runtime) and TS tanks to Sucrace.
  2. Assets hash.
  3. CSS and JS optimization.
  4. Resolution from NPM only if the package has support for modules declared by package.json#exports orpackage.json#module.
  5. Automatic detection of external dependencies.
  6. Alternative NPM package resolution via CDN.

Considerations

  1. All import requires the use of extension, example ./my.js.
  2. All relative resources require the use of the ./ or ../ pattern.

Dev mode

This mode is designed to serve content from an HTML file and process the content served on demand according to the type.

npx devserver dev <src>
## Directory example
src
  ├──index.js
  └──index.html
## Script
npx devserver dev src

Build mode flag

--port [port]: Modify the default port 80.

--spa [file]: The unresolved requests are redirected to the file to associate.

--jsxImportSource [jsxImportSource]: allows to associate the package to use for jsx-runtime.

--ssl: enables the use of HTTP2 with SSL.

--cdn: Resolve NPM packages from a CDN.

Build mode

This mode packages the site or application according to the export pattern, example:

npx devserver build <src> <dest>
## Example
npx devserver build src/*.html public

The previous example will export all the asset files that are related to the files captured by the expression.

Build mode flag

--jsxImportSource [jsxImportSource]: allows to associate the package to use for jsx-runtime.

--cdn: Resolve NPM packages from a CDN.

--minify: Minify JS and CSS code.

--href [href]: Associate a prefix for file resolution.

--external [external]: Associate external dependencies manually.

Build rule

  1. The path must always start from a static folder, example:
src/** ## `src` is the static path
src/site-1/** ## `src/site-1` is the static path
  1. All relative import requires the use of extension.
0.15.7

4 years ago

0.15.8

4 years ago

0.15.4

4 years ago

0.15.5

4 years ago

0.15.6

4 years ago

0.15.3

4 years ago

0.15.2

4 years ago

0.15.1

4 years ago

0.14.0

4 years ago

0.15.0

4 years ago

0.13.0

4 years ago

0.12.3

4 years ago

0.12.2

4 years ago

0.12.1

4 years ago

0.12.0

4 years ago

0.11.7

4 years ago

0.11.6

4 years ago

0.11.5

4 years ago

0.11.4

4 years ago

0.11.3

4 years ago

0.11.2

4 years ago

0.11.0

4 years ago

0.11.1

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.0.0

4 years ago