Files
-
Schematics / LEDDriver / LEDDriver.brd
-
Schematics / LEDDriver / LEDDriver.sch
-
Schematics / LEDDriver / LEDDriver_v_1.brd
-
Schematics / LEDDriver / LEDDriver_v_1.sch
-
Schematics / LEDDriver / LEDDriver_v_2.brd
-
Schematics / LEDDriver / LEDDriver_v_2.sch
-
Schematics / LEDDriver / LEDDriver_v_3.brd
-
Schematics / LEDDriver / LEDDriver_v_3.sch
-
Schematics / LEDDriver / LEDDriver_v_4.brd
-
Schematics / LEDDriver / LEDDriver_v_4.sch
-
Schematics / LEDDriver / LEDDriver_v_5.brd
-
Schematics / LEDDriver / LEDDriver_v_5.sch
-
Schematics / LEDDriver / LEDDriver_v_6.brd
-
Schematics / LEDDriver / LEDDriver_v_6.sch
-
Schematics / LEDDriver / LEDDriver_v_7.sch
-
Schematics / LEDMotherboard / LEDMotherboard.brd
-
Schematics / LEDMotherboard / LEDMotherboard.sch
-
Schematics / LEDMotherboard / LEDMotherboardv2.brd
-
Schematics / LEDMotherboard / LEDMotherboardv2.sch
-
Schematics / LM3404Driver / LM3404.brd
-
Schematics / LM3404Driver / LM3404.sch
-
Schematics / LM3404Driver / LM3404BraceDriver.brd
-
Schematics / LM3404Driver / LM3404BraceDriver.sch
-
Schematics / LM3404Driver / LM3404prototype.brd
-
Schematics / LM3404Driver / LM3404prototype.sch
-
Schematics / LM3404Driver / LM3404smallcapandbigcap.brd
-
Schematics / LM3404Driver / LM3404smallcapandbigcap.sch
-
Schematics / MarsAquaAdapter / signalConditioner.brd
-
Schematics / MarsAquaAdapter / signalConditioner.sch
-
Schematics / MarsAquaAdapter / throughHoleAdapter.brd
-
Schematics / MarsAquaAdapter / throughHoleAdapter.sch
-
Schematics / MarsAquaAdapter / throughHoleAdapterTransistor.brd
-
Schematics / MarsAquaAdapter / throughHoleAdapterTransistor.sch
-
Schematics / PiBreakout328PB / breakout.brd
-
Schematics / PiBreakout328PB / breakout.sch
-
Schematics / PiBreakout328PBwithPH / breakoutWithPH.brd
-
Schematics / PiBreakout328PBwithPH / breakoutWithPH.sch
-
Schematics / PiBreakoutForAquarium / breakout.brd
-
Schematics / PiBreakoutForAquarium / breakout.sch
-
Schematics / SignalExtender / breakout.brd
-
Schematics / SignalExtender / breakout.sch
FilesBlendinitasks | |
---|---|
.. | |
config | |
register | |
README.md | |
pipeline.js |
README.mdAbout the
tasks
folderThe
tasks
directory is a suite of Grunt tasks and their configurations, bundled for your convenience. The Grunt integration is mainly useful for bundling front-end assets, (like stylesheets, scripts, & markup templates) but it can also be used to run all kinds of development tasks, from browserify compilation to database migrations.If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, read on!
How does this work?
The asset pipeline bundled in Sails is a set of Grunt tasks configured with conventional defaults designed to make your project more consistent and productive.
The entire front-end asset workflow in Sails is completely customizable-- while it provides some suggestions out of the box, Sails makes no pretense that it can anticipate all of the needs you'll encounter building the browser-based/front-end portion of your application. Who's to say you're even building an app for a browser?
What tasks does Sails run automatically?
Sails runs some of these tasks (the ones in the
tasks/register
folder) automatically when you run certain commands.
sails lift
Runs the
default
task (tasks/register/default.js
).
sails lift --prod
Runs the
prod
task (tasks/register/prod.js
).
sails www
Runs the
build
task (tasks/register/build.js
).
sails www --prod
(production)Runs the
buildProd
task (tasks/register/buildProd.js
).Can I customize this for SASS, Angular, client-side Jade templates, etc?
You can modify, omit, or replace any of these Grunt tasks to fit your requirements. You can also add your own Grunt tasks- just add a
someTask.js
file in thegrunt/config
directory to configure the new task, then register it with the appropriate parent task(s) (see files ingrunt/register/*.js
).Do I have to use Grunt?
Nope! To disable Grunt integration in Sails, just delete your Gruntfile or disable the Grunt hook.
What if I'm not building a web frontend?
That's ok! A core tenant of Sails is client-agnosticism-- it's especially designed for building APIs used by all sorts of clients; native Android/iOS/Cordova, serverside SDKs, etc.
You can completely disable Grunt by following the instructions above.
If you still want to use Grunt for other purposes, but don't want any of the default web front-end stuff, just delete your project's
assets
folder and remove the front-end oriented tasks from thegrunt/register
andgrunt/config
folders. You can also runsails new myCoolApi --no-frontend
to omit theassets
folder and front-end-oriented Grunt tasks for future projects. You can also replace yoursails-generate-frontend
module with alternative community generators, or create your own. This allowssails new
to create the boilerplate for native iOS apps, Android apps, Cordova apps, SteroidsJS apps, etc.