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 🙏

© 2026 – Pkg Stats / Ryan Hefner

cineasta-cli

v1.1.2

Published

CLI for the CineastaJS framework

Downloads

39

Readme

cineastaJS


Full Documentation

Read de full documentation at cineasta.js.org

What?

cineastaJS uses create-react-app to generate a React app structure, and then, add some features to make your life esier:

  • plugued with react-router
  • automatic page (take) routing
  • require/import from relative paths (src)
  • possibility to group takes as scenes (with grouped scenes you can have a wrapper component for multiple routes)
  • cli commands for creating app and generating specific parts of the app

How?

cineastaJS is a framework on top of create-react-app, so you have to install it too.

$ yarn global add create-react-app cineasta-cli

and then simply

$ cineasta new my-app
$ cd my-app
$ yarn run start

Generating

To generate a new part for your app, you can just type (inside project's directory):

$ cineasta g <type> <name>

where type can be:

  • scene
  • take
  • component
  • container
  • provider
  • redux
  • reducer
  • routes

and name whatever you want to call it

Directory structure

This is very important because the routing is based on this structure. Besides the structure of create-react-app, you'll have the following:

my-app
  |-- src
  |   |-- config
  |   |     |-- routes.js
  |   |     |-- initializers.js
  |   |     |-- providers.js
  |   |-- scenes
  |   |--   |-- app.js
  |   |-- takes
  |   |     |-- index.js
  |   |-- index.js

src/index.js and src/config/routes.js is where we do our magic, and you don't need to worry about editing them

src/config

All kinds of app configurations, including the routes and initializers and providers

src/config/initializers.js

Import anything you want to expose globally to your app, like a CSS framework for example

src/config/providers.js

Define here the providers your app need, like redux provider for example:

import { Provider } from 'react-redux'
import configureStore from 'config/store'

export const reduxProvider = (next) => (
  <Provider store={ configureStore() }>
    { next }
  </Provider>
)

You can export as many provider as you need

src/scenes

The scene act like a wrapper, where it's possible to group takes under the same wrapper component:

// src/scene/app.js

export const onEnter = () => {
  /* here can go auth logic to allow/block all scenes that point to this take */
}

export const component = (props) => (
  <div>
    <div>Here goes some header/nav</div>
    { props.children }
  </div>
)

src/takes

The takes are like the pages of the app, each take is attached to a route. There are two ways to create a take:

Exporting a component by default (this way the route path will match file name):

// src/takes/b.js

import React from 'react'

export default () => (
  <div>Take B</div>
)

Exporting the route props (with this way, it's possible to create a custom route):

// src/takes/a.js

import React from 'react'

export const path = '/b'

export const component = () => (
  <div>Take B</div>
)

Redux

When you generate redux, cineasta prepare for you the necessary dependencies, connects the provider and creates the store where all reducer importing and combining will live. You don't need to worry with this file, cineasta will take care of everything.

You can add as many middlewares as you need inside the src/config/reduxMiddlewares.js file and they will be automatically applied to the redux store.

Reducer

Once you generated redux, you can start generating the reducers. When you generate a reducer, a single file will be created inside src/reducers directory where all your actions and the reducer will live. The file will be started with a sample action and you can play with it all you want.

To easy your life, cineasta uses the great redux-actions to create and handle anything inside your reducer.

The reducer structure is:

import { createAction, handleActions } from 'redux-actions'

export const name = 'myReducer'

const initialState = {
  loading: false,
  data: {},
}

export const request = createAction(
  'REQUEST'
)

export default handleActions({
  [request]: (state) => ({
    ...state,
    loading: true,
  }),
}, initialState)