
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@immutablewebapps/unpkg-immutable-example
Advanced tools
unpkg-immutable-example Hosting an Immutable Web App with npm, UNPKG, and GitHub Pages<
Immutable Web Apps are composed of two concepts:
index.html
that is unique to the environment and not cached by
the
browser. It contains environment-specific configuration, references to the versioned immutable assets, and
meta
data.Using a combination of npm, UNPKG, and Github Pages covers nearly all of these requirements!
The git repository unpkg-immutable-example is split into two critical branches:
default
is where the Angular project is maintained. It was generated from Angular CLI and is maintained like
any other static web application.master
is
configured to serve the GitHub Pages site. It only contains a single file 404.html
.
This single file is served
for every request made to the GitHub Pages site.Developing this web application is the same as any other single-page app node project. Features are built
and tested locally, commits and
pull requests advance the state of the codebase. When a stable version of the app is ready to be deployed,
the
assets are rendered to the /dist
folder using npm run build
and new version of
the
project is published to npm using npm publish
. The assets become available on UNPKG.
With the new version of the assets available on UNPKG, an atomic deployment can be triggered by
switching to the master
branch and updating 404.html
with the references to the
new project
assets and any changes to environment variables. Once the commit is is pushed to the GitHub repository,
GitHub Pages
deployment is triggered and the new version of the web application is available.
With our Immutable Web App hosted by npm/UNPKG and without any environment-specific configuration,
deployments
are cheap and reliable! Let's deploy index.html
to wherever it is easiest to setup DNS and
HTTPS!
and let's change the version!
404.html
to point to a different versionand let's change some environment variables!
git clone
https://github.com/ImmutableWebApps/unpkg-immutable-deployment
cd unpkg-immutable-deployment
npm i -g netlify-cli
netlify login
netlify deploy
and configure it however you want! Try loading up some older versions!
FAQs
unpkg-immutable-example Hosting an Immutable Web App with npm, UNPKG, and GitHub Pages<
We found that @immutablewebapps/unpkg-immutable-example demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.