Stub project for initializing a Cinema6 Angular project. This will seed an Angular web-app organized to fit into the overall site architecture. It uses Grunt to run common development and build processes.
-
Make sure the following dependencies are installed: Node.js, git and java (required for E2E tunneling sessions.)
-
Install "create-ng-app"
```bash
$> sudo npm install -g git+ssh://git@bitbucket.org:cinema6/create-ng-app.git
```
- Run the create-ng-app tool.
```bash
$> create-ng-app desired/path/to/app
```
- Setup with Github
```bash
$> cd desired/path/to/app
$> git remote add origin git@github.com:cinema6/myawesomeapp.git
```
-
Add the files in the repo (make sure to include the .c6stubinit file)
-
Push to Github!
```bash
$> git push origin master -u
```
This file should be stored in a location where it can be accessed by many applications (usually your home directory.) It should have the following properties:
- accessKeyId
- secretAccessKey
- region
This file should be stored in a location where it can be accessed by many applications (usually your home directory.) It should have the following properties:
- user
- key
The name and keywords in this file are used to configure certain application settings and defaults. For example, when executing E2E tests on SauceLabs, the name of the job will be the "name" property in this file, and the job tags will be the "keywords" array in this file.
This file contains the application settings that are used accross grunt tasks and in automated testing. You can run
$> grunt init
to run a wizard that will walk you through configuring this file.
This property configures the url that the sandbox should iframe in to load your application.
The main Angular module name for your application.
The folder that houses your application.
The folder into which grunt should build the application.
The path (relative to your home directory) of your .aws.json file.
The path (relative to your home directory) of your .saucelabs.json file.
The path (relative to your home directory) of your .browserstack.json file.
The port on which to run the development server.
The directory where collateral assets will be stored. This folder will be created for you the first time an experience is created.
The location of experiences.json file that the sandbox will use to drive your application. This file will be created for you the first time you create an experience.
The URL prefix used to resolve 3rd-party libraries in unit tests.
The default E2E environment in which to run when no environment is passed to the grunt:test:e2e
task. Valid values are "saucelabs", "browserstack" or "local".
The S3 bucket used for testing.
The collateral asset upload location for testing.
The app upload location for testing.
The S3 bucket used for production.
The collateral asset upload location for production.
The app upload location for production.
This task guides you through configuring your new application. You should only need to run this once when setting up your app for the first time.
ex:
$> grunt init
This task guides you through creating an experience object. While some apps will only have one experience, if your app can run many experiences, this task will be helpful!
ex:
$> grunt createexp
This task will generate and log a Cinema6-formatted UUID with the supplied prefix.
ex:
$> grunt genid:e
Running "genid:e" (genid) task
e-6c7ed80e3d68ac
$> grunt genid:o
Running "genid:o" (genid) task
o-df80d6438ab29c
This task is configured with one target, app, which will update the index.html and main.js files with the most recent (or specified) lib/libs that are available on S3.
ex:
$> grunt updatelib #upgrade all libs to the most recent version
$> grunt updatelib:app:c6ui #upgrade c6ui to the most recent version
$> grunt updatelib:app:gsap:1.11.2 # upgrade GSAP to version 1.11.2
This task will start a development server that uses the c6-sandbox. Your application will appear inside the Cinema6 site chrome, and the Cinema6 site API will be available.
ex:
$> grunt server
This task will check your JS files for lint and execute the unit tests
ex:
$> grunt test:unit
This task will watch your JS files for changes. If a file is changed, the unit tests will be re-executed.
ex:
$> grunt test:unit:debug
This task will execute the E2E tests on the environment of your choice (or in the environment specified in settings.json if none is supplied) in the specified browser, or in all browsers if "all" is supplied.
ex:
$> grunt test:e2e:chrome #Run E2E tests in Chrome in default env
$> grunt test:e2e:ie:local #Run E2E tests in IE locally
$> grunt test:e2e:all:browserstack #Run E2E tests in all browsers on BrowserStack
This task will watch your app and test files and run the E2E tests locally in the specified browser when any of the files change.
ex:
$> grunt test:e2e:debug:iphone
This task will execute all unit and E2E tests. E2E tests will run in all browsers in the derfault environment.
ex:
$> grunt test
This task will build and upload the collateral assets to the specified environment on S3.
ex:
$> grunt publish:collateral:test #Upload collateral assets to test server
$> grunt publish:collateral:production #Upload collateral assets to production server
This task will build and upload the application to the specified environment on S3.
ex:
$> grunt publish:app:test #Upload app to test server
$> grunt publish:app:production #Upload app to production server
This task will build and upload the collateral assets and app to the specified environment on S3.
ex:
$> grunt publish:test #Upload collateral assets and app to test server
$> grunt publish:production #Upload collateral assets and app to production server