Package Exports
- firebase-bolt
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (firebase-bolt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Bolt Compiler
Bolt is an experimental security and rules compiler for Firebase Realtime Database (not for Firebase Cloud Storage). It is currently in beta. The language definition is converging, but not yet finalized. We welcome experimentation, but ask that you hand-verify the resulting JSON output before using with production applications.
Otherwise, we'd love to have feedback from early adopters. You can email questions to firebase-talk@googlegroups.com using "Bolt" in the subject line, or post bugs on our Issue Tracker.
Language Definition
- Guide to Using Firebase Bolt - Introduction to using Bolt.
- Firebase Security and Modeling Language - Language documentation and syntax.
Using the Bolt Compiler
You can easily install the bolt compiler using npm:
$ npm install --global firebase-boltExecute the Bolt compiler from the command line:
$ firebase-bolt rules.boltWill create a rules.json which you can then upload via the Firebase Web Console or the Firebase command line:
$ firebase deployThe firebase command line tool version 2 will also compile your Bolt file directly if you have firebase-bolt installed and you use the .bolt file extension in the rules property of your firebase.json configuration file.
Developing with this Repo
You should have node.js and npm installed to use this repository.
Setup command line environment and build and test.
$ source tools/use
$ configure-project
$ gulpUseful commands
Check JavaScript source files for required formatting conventions:
$ gulp lintBuild Bolt parser from PEG grammar:
$ gulp buildRun command line tests:
$ gulp testMore extensive tests which include running against a sandboxed Firebase app:
$ run-testsRun browser-based tests:
$ browser-tests