Transpiled Published Static Application Demo
This is a test of creating a github repo that contains source files for a static application, which must be run through a build step to generate the immediately usable static version of that app, and then publishing the built static app to npm.
Most npm packages are modules, because they are libraries that you load with require. However, there's no requirement that an npm package be a module! Some only contain an executable command-line interface, and don't provide a main field for use in Node programs.
What GitHub Sees
Only source files get committed to the repository, so on GitHub you'll see:
- main.js (ES6)
- work.js (ES6)
We .gitignore the dist/ output directory and node_modules directory, because we don't want to keep those in the repository.
What NPM and consumers see
We nearly do the opposite here: Only build output and a few extra files get published to NPM. Therefore, on an
npm install transpiled-published-static-application-demo you'll only get these in your
- main.js (ES5)
What developers see
If you are hacking on this module and using it, you would see both the src/ and dist/ directories after a clone and build. You could also use
npm link to point your consumer project at your local copy of this project.