Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

transpiled-published-static-application-demo

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transpiled-published-static-application-demo

An example of publishing source on GitHub but a built application on npm.

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

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.

In NPM parlance, this is an example of a "package" that is not a "module:"

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:

  • src/
    • index.html
    • js/
      • main.js (ES6)
      • work.js (ES6)
  • .gitignore
  • .npmignore
  • README.md
  • package.json
  • webpack.config.js

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 node_modules/transpiled-published-static-application-demo directory

  • dist/
    • index.html
    • js/
      • main.js (ES5)
  • package.json
  • README.md

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.

Keywords

transpiled

FAQs

Package last updated on 02 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts