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 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-x-app

v0.4.2

Published

Create a development environment for your `super-x` app.

Downloads

4

Readme

create-x-app

Create a development environment for your super-x app.

Usage

Just execute one of the following command to get a development environment where my-app should be replaced with the name of your app:

npm init x-app my-app
# or
npx create-x-app my-app

After all dependencies are installed, you will be able to start your development. (See the Workflow section.)

In addition, you can also pass some arguments to it:

create-x-app <name> [options]

    <name>             Your app name

    -h, --help         Show help info

    -d, --dir  <dir>   The directory to create
                       Default: the app name

    -v, --ver  <ver>   The version of `super-x` to use
                       Default: the latest

    -p, --port <port>  The local port to use
                       Default: 8080

Please note that if you omit the super-x version to use, the latest version will be fetched and adopted. If you want to change the version after initialization, please:

  1. Execute npm i -D super-x@<version> to update the development dependency where <version> should be replaced with the version you want.
  2. Open /dist/public/index.html and modify the lib version to load. (/test/index.html loads the lib from the development dependency, so don't worry about it.)

Workflow

This package initializes a typical development workflow for super-x which is explained below.

Folder Structure

my-app/
+-- node_modules/       Dependency folder
+-- dist/               Files for distribution
| +-- public/           Public files
| | +-- index.css       Page styles for both production and development
| | +-- index.html      The index page for production
| | `-- index.js        Bundled script file (generated by building script)
| `-- server.js         Production server
+-- src/                Source code (some initial code is provided)
| +-- common.js         Common utils
| `-- index.js          The entry point of your app
+-- test/               Test folder
| +-- index.html        The index page for development
| `-- server.js         Development server
+-- package.json        Package declaration file
+-- package-lock.json   Dependency lock file
`-- rollup.config.js    Rollup config file

Scripts

You can run any of the scripts by executing npm run <script> in the root of your app directory where <script> is the script name.

| script name | description | |:-----------:|:-------------------------------------| | start | Launch the production server. | | test | Launch the development server. | | build | Bundle the scripts for distribution. |

Development

Generally speaking, you just need to write your code in src folder and use the development scripts listed above to test and build your app.

When you are developing your app, it is recommended to execute npm test to start the development server and test your app in your browser. In the page for development, scripts are directly loaded from source files so that you can access your result immediately after your code changes.

When you want to get the production version of your app, execute npm run build to bundle the scripts into /dist/public/index.js, which is a bundled and optimized version, and your app for production will be ready in /dist/public. Then, execute npm start to start the production server which serves /dist/public so that you can see the production result of your app in your browser.

Please note that only script files should be placed in the src folder and all other resource files are supposed be put in /dist/public and referenced relative to that folder. For instance, the page style file, /dist/public/index.css, is referenced in index pages as ./index.css. Moreover, although the scripts are loaded as modules in the development server, you have to use the global variable X to access the APIs instead of importing them from the super-x module and you can refer to the initial code given to get an example.

Links