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

@ou-imdt/create

v1.3.2

Published

Command line tool to create team boilerplate.

Downloads

259

Readme

Create

npm version

Introduction

Create is a command line interface tool that assists in the creation of new widgets intended for distribution to the VLE.

The intention of the tool is to automate the creation of boilerplate code required by the VLE and provide a streamlined, modern, consistent and efficient development experience.

For the detailed boilerplate features, check the boilerplate README file.

Features

  • Creates a new widget with the boilerplate code, with two optional templates (Vanilla JS or VUE).
  • Populates the README file, index.html and package.json with dynamic templating.
  • Checks Node.js version and notifies if Long Term Support (LTS) version is not used.
  • History to maintain the last input data like author email.

Compatibility Note: Requires Node.js LTS version.

Installation

npm install -g @ou-imdt/create 

Update to the latest version

npm update -g @ou-imdt/create

Usage

Run the create using:

create

Then answer the following questions to generate a boilerplate.

Template? (Vanilla Javascript/VUE.js)
Widget name?
Widget description?
Widget developer name? **
Widget developer email? **
Install deps? (yes/no)

** These will be fetched from git config, if they do not exist you will be prompted to enter them.

Commands

help  Prints help info

Options

-c, --clear    Clear the console Default: true
-v, --version  Print CLI version Default: false

Template Stores

Stores found in the two templates contain methods to help with common tasks whilst interfacing with the VLE.

Examples include:

  • Saving data to the VLE
  • Retrieving save data from the VLE
  • Parsing Query parameters from URLs
  • Loading SCXML attachments and folders
  • Logging utilities to prevent development messages getting to live

Save Global Data

store.globalData = {
    default: {
        valueOne: "Hi",
        valueTwo: "Example",
        valueThree: "Message"
    }
}

store.saveGlobalData()

Save User Data

store.userData = {
    default: {
        valueOne: "Hi",
        valueTwo: "Example",
        valueThree: "Message"
    }
}

store.saveUserData()

Get All Single Save Data

store.getUserData()
// Result stored in store.singleSaveData

Get All Global Save Data

store.getGlobalData()
// Result stored in store.globalSaveData

VLE Safe Log

store.log("Message")

VLE Safe Warn

store.warn("Message")

VLE Safe Error

store.error("Message")

Access VLE Parameters

store.defaultVLEParams["_u"]
store.defaultVLEParams["_i"]
store.defaultVLEParams["_a"]
store.defaultVLEParams["_c"]
store.defaultVLEParams["param1"]

Access VLE Attachments

store.fileAttachments["ref"]

Access VLE Folders

store.folderAttachments["ref"]

Check Online

store.isOnline

Offline support (SISE)

If you need support for SISE (Students in Secure Environments), there is a vite plugin you can use vite-plugin-singlefile. To use the plugin, it needs to be added to the devDependencies of the project and included in the plugins array in the vite.config.js config file.

npm i vite-plugin-singlefile --save-dev

Then update vite.config.js file by adding these in the config:

//import plugin
import { viteSingleFile } from "vite-plugin-singlefile"
//add plugin to plugins array
plugins: [ viteSingleFile()]

Changelog

Read the changelog here

Issue reporting

  • Use the issue tracker.
  • Provide a clear and descriptive title.
  • Describe the steps to reproduce the issue (for bugs).
  • Explain the expected and actual behavior (for bugs).
  • Describe why the feature is needed (for feature requests).

Licence

This project is licensed under the MIT License - see the LICENSE for details.

Contributing

See contributing for more details.

Contact

Edwin, Mustafa