npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-elm-template-jumpstart

v1.0.2

Published

Cordova template to jumpstart development using Elm and Webpack

Downloads

5

Readme

Cordova Jumpstart for an Elm SPA (Single-Page Application) using Webpack

This is not just a template for Webpack -- it's a jumpstart, with a lot of pre-integrated functionality. Most fundamentally, this template will provide the wiring for Cordova to use Elm via Webpack. The result of the Webpack build is a single-page application that Cordova will execute.

Usage

Use this template to jumpstart your Cordova project. To do so, specify it at project creation time like this:

$ cordova create hello com.example.hello HelloWorld --template cordova-elm-template-jumpstart

Then go into your new project and read the README.md that is installed there.

Out-of-the-Box Functionality

Current

  • Auto-rebuilding when running the Cordova Browser implementation.
  • Assets processed by Webpack and available to the Elm application
  • Hammer.js for touch events
  • Google Analytics
  • Bootstrap 4
  • Scripts to Rule Them All
  • Webpack, including integrated Babel
  • Elm itself, of course
  • Elm-UI
  • Elm-Install
  • Main/Routes/Pages structure within Elm
  • Autoprefixer and Babel env preset pre-configured to support 90% of browsers in the US. (These browser support settings can be tuned in your project's package.json.)
  • UglifyJS "Harmony" (ES8) Compiler, console/debug scrubbing, Babel-Minify, and image optimizations applied only in non-dev environments
  • Automatic favicon, app icon, and splash screen image generation from provided templates
  • Cordova Splashscreen
  • Font-Awesome

Future

Generic Cordova Template Details

Structure of the template

template_package
├── package.json (for your template package to be published on npm)
├──	index.js
└── template_src (contains template files)
    ├── package.json
	├── config.xml
	└── (files and folders that make up the template)

Outside of template_src

All files outside of template_src are used to define parameters about the template. These files are not copied over at creation, so feel free to add a README or any other files outside of template_src.

index.js points to where the template exists. You'll see that index.js usually looks like:

var path = require('path');

module.exports = {
    dirname : path.join(__dirname, 'template_src')
};

package.json tells you about the template. It is necessary state that "main": "index.js" so that the reference to the template source in index.js is propagated. All templates should contain the keyword "cordova:template" so that the template is searchable on npm.

...
"main": "index.js",
...
"keywords": [
"cordova:template"
...

Inside of template_src

All files inside of template_src compose the template from which a user would desire in order to create their project. Everything in this folder is copied over to the created project.

(The package.json in template_src should be filled with information that describes the project that would be created from the template.)

License Note

This is forked from the Apache Cordova Template Reference, which was released under the Apache License 2.0 as of the time of the fork. Use of the upstream code or its derivatives may be subject to that license.

The image used for ./template_src/splash.png, ./template_src/icon.png, and ./template_src/src/assets/example.png is from Aiconica.net and is released under the CC0 to the best of my knowledge.