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

@composi/create-composi-app

v1.4.21

Published

A CLI to create new projects ready to use @composi/core for development.

Downloads

32

Readme

@composi/create-composi-app

Package to create projects ready to use @composi/core to create desktop and mobile websites, PWAs and hybrid apps.

Install

npm install --save-dev @composi/create-composi-app

If you're on Mac or Linux you may need to run the above command with sudo, depending on how you have NPM set up. Check the NPM docs for information about how to handle permissions to avoid having to use sudo.

Help

After installing create-composi-app, you can get help at any time:

create-composi-app -h
// or:
create-composi-app --help

Version

You can find out what version of create-composi-app you are using as follows:

create-composi-app -v
// or:
create-composi-app --version

Create New Project

To create a new project, you open your terminal and type in create-composi-app followed by the -n flag and the name for the project. This will create a project with that name on your desktop:

create-composi-app -n MyProj

When providing a name, create-composi-app will always use the name as provided. However, for the package.json file it has to use a valid name. This means it makes the name lowercase. It also converts spaces to hyphens.

If you want to use a multi-word name with spaces, you need to enclose it in quotes:

create-composi-app -n "My Project"

Although the project folder will be "My Project", the package name will be "my-project".

Provide Path for New Project

When you only provide a name for a project, create-composi-app creates it on the Desktop. However, you can provide an argument with the flag -p as the path for where you want the new project created. Of course this path needs to follow the naming conventions of your operating system:

# For Mac and Linux:
create-composi-app -n "My App" -p "~/Desktop/dev/personal"

# For Windows:
create-composi-app -n "My App" -p "~\Desktop\dev\personal"

Install Dependencies and launch project.

After creating a project, cd to it and run:

npm i

When the install finishes, you can build and launch the new project with:

npm start

This will also launch watchers for the projects source folder, which includes all the CSS, images and JavaScript for you project. When a change is detected, it will rebuild that part and reload the browser.

Create Deployment Version

When you are done developing your app, you can get a development version. To do so, from within the project, run:

npm run build:production

This will create a new copy of your project using the same name with "-production' appended. For example, if the project's name was "My App", the production version would be "My App-production".

The production version leaves behind everything that was needed for development. In the folder you will find the index.html file and the dist folder. The paths in the index.html are aboslute, so the dist folder can be placed wherever the production server needs it to be.

Other Tasks to Run

The new project comes configured to build and launch the project with

npm start

You can also run ESLint on the JavaScript in your project's src folder:

npm run lint

You can run Prettier on the JavaScript in your project's src folder:

npm run format

And, in the case your project's dist folder has gotten messy and your not sure what you need in there, you can clean it out with:

npm run clean

After cleaning out the dist folder, you can run npm run build:fresh to get just the files you need in the dist folder.

Less Typing

You can use an alias to create a shortcut so you don't have to type out create-composi-app. For macOS and Linux, open your .bashprofile and add the following line:

alias cca="create-composi-app"

Restart the terminal. Now you should be able to use create-composi-app by typeing cca.

For Windows, in the command prompt enter:

doskey cca=create-composi-app