@eribrary/tmplt-npm-package
v1.0.5
Published
A template used to create an npm package. Not meant to be used in production.
Downloads
13
Readme
TEMPLATE
IMPORTANT!
After compiling the code but BEFORE publishing, make sure to copy the package.json in src
to dist
.
TODO - create an automatic solution using xcopy.
HOW TO START
alt
+shift
+ctrl
+k
initiates the Shell Build
task (to change this keybinding or view all keybindings, go to keybindings.json
). By default, this deletes the dist
folder and all contents, then it refactors / copies the code from src
into dist
and sets up watches for TypeScript
, Sass
, plus any patterns set in src/dev/file-watchers.ts
.
CAVEATS
Module Compatibility in Browsers
Browsers cannot run fs
and similar nodejs-specific modules. So if we want to use it for dev purposes (e.g., fileWatchers) we cannot reference any modules that use it from our main code (app.js
and all referenced modules).
To get around this, we initiate it in package.json
through a separate script.