suddenly v1.28.1
Suddenly
A bunch of tools to help with Suddenly apps.
To generate a new Suddenly app, check out: suddenly-cli
Usage
Builder
Sets up Webpack with some common settings.
clean (config)- Cleans the build directory.build (config, args)- Builds a project. Pass 'hot' as an arg to build with Webpack Dev Server.run (config, args)- Runs a Webpack Dev Server with the latest build (alongside a Hapi server).buildAndRun (config)- Compiles a hot reload build and then runsrun()
Database
Handles database migrations.
migration (config, args)- Generates a migration named fromargs[0].model (config, args)- Generates a model and model migration named fromargs[0]. Pass 'no-migration' to skip the migration. Pass 'no-model' to only generate the model.migrate (config)- Runs any pending migrationsrollback (config)- Rolls back the latest batch of migrationsversion (config)- Gets the schema versionschema (config, args)- Gets information about the current schema. Pass a table name atargs[0]to get just that table's schema.
Generate
Generates bootstrap files for the project.
routes (config, args)- Generates a routes file and tests named fromargs[0]. Pass 'no-tests' to skip creating tests.resource (config, args)- Generates a resources file named fromargs[0]notification (config, args)- Generates a notification email template and notification method named fromargs[0]actions (config, args)- Generates an actions file and tests named fromargs[0]. Pass 'no-tests' to skip creating tests.reducer (config, args)- Generates a reducer file and tests named fromargs[0]. Pass 'no-tests' to skip creating tests.redux (config, args)- Shortcut for generating an actions and a reducer at the same time.component (config, args)- Generates a React component and tests named fromargs[0]. Pass 'no-tests' to skip creating tests. Pass 'connected' to generate a Redux connected component. Passno-styleto skip generating a stylesheet. Passwith-providerto include a provider setup in the tests.style (config, args)- Generates a stylesheet.
Mailer
create (config)- Creates a Mailer proxy for sending emailsmailer.* (to, subject, locals, callback)- Callmailer.send()with the method name as the template.mailer.send (to, subject, template, locals, callback)- Sends an emailmailer.render (filename, locals)- Render an email template
Server
routes (server, config)- Attaches routes found in<APP_ROOT>/app/server/routesto theserverrun (config, args)- Runs the server.
Testing
Create a database called suddenly_test and then run npm test
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago