0.0.2 • Published 3 years ago

@pota/vite-skeleton v0.0.2

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

vite-skeleton downloads

Setup 🚀

You can create a new project using the @pota/create package.

npx @pota/create vite my-vite-app

Standards 📒

This project follows the MediaMonks Frontend Coding Standards

Features 🔋

Pota Commands

build - builds the source using vite.

npm run build # or npx pota build
OptionTypeDefaultDescription
debug{Boolean}falseSets NODE_ENV to 'development'.
output{String}./distThe build output directory.
source-map{Boolean}falseEnable source-map generation.
public-path{String}/The location of static assets on your production server.
log-level{'info' | 'warn' | 'error' | 'silent'}infoAdjust console output verbosity. (https://vitejs.dev/config/#loglevel)
force{Boolean}falseIgnore pre-bundled dependencies (the node_modules/.vite cache).

dev - starts the vite development server.

npm run dev # or npx pota dev
OptionTypeDefaultDescription
force{Boolean}falseIgnore pre-bundled dependencies (the node_modules/.vite cache).
https{Boolean}falseRun the development server with HTTPS.
open{Boolean}trueAllows to configure dev server to open the browser after the server has been started.
port{Number}2001Allows configuring the port.
cors{Boolean}falseEnable CORS.
prod{Boolean}falseSets NODE_ENV to 'production'.
log-level{'info' | 'warn' | 'error' | 'silent'}infoAdjust console output verbosity. (https://vitejs.dev/config/#loglevel)
public-path{String}/The location of static assets on your production server.

preview - server the built /dist directory.

npm run preview # or npx pota preview
OptionTypeDefaultDescription
https{Boolean}falseRun the development server with HTTPS.
open{Boolean}trueAllows to configure dev server to open the browser after the server has been started.
port{Number}2001Allows configuring the port.
cors{Boolean}falseEnable CORS.
log-level{'info' | 'warn' | 'error' | 'silent'}infoAdjust console output verbosity. (https://vitejs.dev/config/#loglevel)
public-path{String}/The location of static assets on your production server.

hidden TODOs

Scripts

Non-Pota scripts defined in "scripts" of package.json and are runnable using npm run {script}

ScriptDescription
typecheckChecks for type errors and unused variables/types in the source directory.
fixExecutes all fix:* and `format commands in sequence.
fix:eslintExecutes eslint:lint and fixes fixable errors.
formatFormats the source files using prettier.
lintExecutes all lint:* commands in sequence.
lint:eslintLints the source files using eslint.
rsyncSynchronizes (uploads) dist/ files to a remote server.

JavaScript / TypeScript

hidden TODOs

CSS

hidden TODOs

Images

hidden TODOs

Misc. Assets

hidden TODOs

Linting & Formatting

hidden TODOs

Deployment

Remote Sync

For simple deployments, when you just want to upload your files to a remote server, you can use the rsync script.

Note: before using the rsync script, make sure to configure a host in in the "package.json"

npm pkg set config.host="github.com"

hidden TODOs

Git

hidden TODOs

Continuous Integration / Continuous Deployment

Bitbucket

webpack-skeleton comes with bitbucket-pipelines.yml, pre-configured to run check-types, lint and test scripts.

hidden TODOs