├── .codeclimate.yml ├── .editorconfig ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .jsbeautifyrc ├── .npmignore ├── .travis.yml ├── Avionic.json ├── CONTRIBUTING.md ├── Icon.png ├── LICENSE ├── Masthead.png ├── README.md ├── app ├── index.js ├── prompts.json ├── src │ ├── ascii.js │ ├── color.js │ ├── files.js │ ├── install.js │ ├── plugins.js │ ├── prompts.js │ └── write.js ├── templates │ ├── _CONTRIBUTING.md │ ├── _LICENSE │ ├── _README.md │ ├── _bower.json │ ├── _config.xml │ ├── _en.json │ ├── _gulpfile.js │ ├── _package.json │ ├── _plugins.json │ ├── _vendor.json │ ├── app │ │ ├── fonts │ │ │ ├── aleo-bold-webfont.eot │ │ │ ├── aleo-bold-webfont.svg │ │ │ ├── aleo-bold-webfont.ttf │ │ │ ├── aleo-bold-webfont.woff │ │ │ ├── aleo-bold-webfont.woff2 │ │ │ ├── aleo-light-webfont.eot │ │ │ ├── aleo-light-webfont.svg │ │ │ ├── aleo-light-webfont.ttf │ │ │ ├── aleo-light-webfont.woff │ │ │ ├── aleo-light-webfont.woff2 │ │ │ ├── aleo-regular-webfont.eot │ │ │ ├── aleo-regular-webfont.svg │ │ │ ├── aleo-regular-webfont.ttf │ │ │ ├── aleo-regular-webfont.woff │ │ │ └── aleo-regular-webfont.woff2 │ │ ├── images │ │ │ ├── background.jpg │ │ │ ├── icon.png │ │ │ └── icons │ │ │ │ ├── attendant.svg │ │ │ │ ├── avionic.svg │ │ │ │ ├── captain.svg │ │ │ │ ├── documents.svg │ │ │ │ ├── help.svg │ │ │ │ ├── login.svg │ │ │ │ ├── luggages.svg │ │ │ │ ├── register.svg │ │ │ │ ├── secure.svg │ │ │ │ └── settings.svg │ │ ├── styles │ │ │ ├── _avionic.scss │ │ │ ├── global │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _config.scss │ │ │ │ ├── _fonts.scss │ │ │ │ ├── _forms.scss │ │ │ │ └── _mixin.scss │ │ │ ├── ionic │ │ │ │ ├── _action-sheet.scss │ │ │ │ ├── _animations.scss │ │ │ │ ├── _backdrop.scss │ │ │ │ ├── _badge.scss │ │ │ │ ├── _bar.scss │ │ │ │ ├── _button-bar.scss │ │ │ │ ├── _button.scss │ │ │ │ ├── _checkbox.scss │ │ │ │ ├── _form.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _items.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _loaders.scss │ │ │ │ ├── _loading.scss │ │ │ │ ├── _menu.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _modal.scss │ │ │ │ ├── _platform.scss │ │ │ │ ├── _popover.scss │ │ │ │ ├── _popup.scss │ │ │ │ ├── _progress.scss │ │ │ │ ├── _radio.scss │ │ │ │ ├── _range.scss │ │ │ │ ├── _refresher.scss │ │ │ │ ├── _reset.scss │ │ │ │ ├── _scaffolding.scss │ │ │ │ ├── _select.scss │ │ │ │ ├── _slide-box.scss │ │ │ │ ├── _spinner.scss │ │ │ │ ├── _split-pane.scss │ │ │ │ ├── _tabs.scss │ │ │ │ ├── _toggle.scss │ │ │ │ ├── _transitions.scss │ │ │ │ ├── _type.scss │ │ │ │ ├── _util.scss │ │ │ │ ├── _variables.scss │ │ │ │ ├── ionic.scss │ │ │ │ └── ionicons │ │ │ │ │ ├── _ionicons-animation.scss │ │ │ │ │ ├── _ionicons-font.scss │ │ │ │ │ ├── _ionicons-icons.scss │ │ │ │ │ ├── _ionicons-variables.scss │ │ │ │ │ └── ionicons.scss │ │ │ ├── layout │ │ │ │ └── _layout.scss │ │ │ ├── main.scss │ │ │ ├── menu │ │ │ │ └── menu.scss │ │ │ └── views │ │ │ │ ├── _home.scss │ │ │ │ └── _intro.scss │ │ └── templates │ │ │ ├── main.html │ │ │ └── views │ │ │ ├── edit-product.html │ │ │ ├── home.html │ │ │ ├── intro.html │ │ │ ├── login.html │ │ │ ├── new-product.html │ │ │ ├── product.html │ │ │ ├── products.html │ │ │ ├── session.html │ │ │ ├── settings.html │ │ │ └── signup.html │ ├── bower.rc │ ├── editorconfig │ ├── favicon.ico │ ├── gitignore │ ├── gulp │ │ ├── clean.task.js │ │ ├── cli.task.js │ │ ├── default.task.js │ │ ├── favicon.task.js │ │ ├── fonts.task.js │ │ ├── help.task.js │ │ ├── iconfont.task.js │ │ ├── images.task.js │ │ ├── index.task.js │ │ ├── jshint.task.js │ │ ├── karma.task.js │ │ ├── languages.task.js │ │ ├── licenses.task.js │ │ ├── noop.task.js │ │ ├── plato.task.js │ │ ├── plugins.task.js │ │ ├── ripple.task.js │ │ ├── scripts.task.js │ │ ├── select.task.js │ │ ├── serve.task.js │ │ ├── styles.task.js │ │ ├── templates.task.js │ │ ├── vendor.task.js │ │ └── watchers.task.js │ ├── helpers │ │ └── emulateios │ ├── hooks │ │ ├── README.md │ │ └── after_prepare │ │ │ └── 010_add_platform_class.js │ ├── icon.png │ ├── index.html │ ├── jscsrc │ ├── jshintrc │ ├── karma.conf.js │ ├── robots.txt │ ├── scripts │ │ ├── app.js │ │ ├── config │ │ │ └── app.config.js │ │ ├── controllers │ │ │ ├── editProductController.js │ │ │ ├── homeController.js │ │ │ ├── introController.js │ │ │ ├── loginController.js │ │ │ ├── mainController.js │ │ │ ├── newProductController.js │ │ │ ├── productController.js │ │ │ ├── productsController.js │ │ │ ├── settingsController.js │ │ │ ├── signupController.js │ │ │ └── translateController.js │ │ ├── routes │ │ │ └── app.routes.js │ │ ├── services │ │ │ ├── api.service.js │ │ │ ├── auth.service.js │ │ │ ├── example.service.js │ │ │ ├── localstorage.service.js │ │ │ └── user.service.js │ │ ├── translate │ │ │ └── app.translate.js │ │ └── utils │ │ │ └── lodash.js │ ├── server │ │ ├── package.json │ │ ├── readme.md │ │ ├── routes │ │ │ └── workouts.js │ │ └── server.js │ ├── splash.png │ └── test │ │ ├── config │ │ └── app.config.spec.js │ │ ├── controllers │ │ ├── editProductController.spec.js │ │ ├── homeController.spec.js │ │ ├── introController.spec.js │ │ ├── loginController.spec.js │ │ ├── mainController.spec.js │ │ ├── newProductController.spec.js │ │ ├── productController.spec.js │ │ ├── settingsController.spec.js │ │ ├── signupController.spec.js │ │ └── translateController.spec.js │ │ ├── hello.spec.js │ │ ├── routes │ │ └── app.routes.spec.js │ │ ├── services │ │ ├── api.service.spec.js │ │ ├── auth.service.spec.js │ │ ├── example.service.spec.js │ │ ├── localstorage.service.spec.js │ │ └── user.service.spec.js │ │ ├── translate │ │ └── app.translate.spec.js │ │ └── utils │ │ └── lodash.spec.js └── utils │ ├── color.js │ ├── index.js │ └── plugins.js └── package.json /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | languages: 2 | JavaScript: true 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = tab 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | env: { 3 | browser: true 4 | }, 5 | globals: { 6 | ionic: true, 7 | IonicModule: true, 8 | angular: true, 9 | jqLite: true, 10 | forEach: true, 11 | isDefined: true, 12 | isNumber: true, 13 | isString: true, 14 | noop: true, 15 | extend: true, 16 | deprecated: true, 17 | cordova: true, 18 | DocumentTouch: true, 19 | describe: true, 20 | ddescribe: true, 21 | it: true, 22 | iit: true, 23 | inject: true, 24 | beforeEach: true, 25 | afterEach: true, 26 | expect: true 27 | }, 28 | rules: { 29 | quotes: false, 30 | no-underscore-dangle: false, 31 | no-unused-expressions: false, 32 | curly: [ 33 | 2, 34 | "multi-line" 35 | ], 36 | strict: false, 37 | no-use-before-define: false, 38 | eqeqeq: false, 39 | new-cap: [ 40 | 2, 41 | { 42 | capIsNew: false 43 | } 44 | ], 45 | dot-notation: [ 46 | 2, 47 | { 48 | allowKeywords: false 49 | } 50 | ], 51 | no-console: false, 52 | no-return-assign: false, 53 | no-shadow: false, 54 | comma-dangle: false, 55 | camelcase: [ 56 | 2, 57 | { 58 | properties: "never" 59 | } 60 | ] 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules/ 28 | temp/ 29 | *.DS_Store 30 | *.log 31 | *.swp 32 | *.settings 33 | -------------------------------------------------------------------------------- /.jsbeautifyrc: -------------------------------------------------------------------------------- 1 | { 2 | "html": { 3 | "allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"], 4 | "brace_style": "collapse", 5 | "indent_char": " ", 6 | "indent_handlebars": false, 7 | "indent_inner_html": false, 8 | "indent_scripts": "keep", 9 | "indent_size": 4, 10 | "max_preserve_newlines": 1, 11 | "preserve_newlines": true, 12 | "unformatted": ["a", "sub", "sup", "b", "i", "u", "pre"], 13 | "wrap_line_length": 0 14 | }, 15 | "css": { 16 | "allowed_file_extensions": ["css", "scss", "sass", "less"], 17 | "end_with_newline": false, 18 | "indent_char": " ", 19 | "indent_size": 4, 20 | "selector_separator": " ", 21 | "selector_separator_newline": false 22 | }, 23 | "js": { 24 | "allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"], 25 | "brace_style": "collapse", 26 | "break_chained_methods": false, 27 | "e4x": true, 28 | "eval_code": false, 29 | "indent_char": " ", 30 | "indent_level": 0, 31 | "indent_size": 4, 32 | "indent_with_tabs": false, 33 | "jslint_happy": false, 34 | "keep_array_indentation": false, 35 | "keep_function_indentation": false, 36 | "max_preserve_newlines": 2, 37 | "preserve_newlines": true, 38 | "space_before_conditional": true, 39 | "space_in_paren": false, 40 | "unescape_strings": false, 41 | "wrap_line_length": 0 42 | } 43 | } -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | .editorconfig 3 | .gitignore 4 | .npmignore 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | cache: 4 | directories: 5 | - node_modules 6 | notifications: 7 | email: false 8 | node_js: 9 | - v5 10 | - v4 11 | - iojs-v2 12 | - iojs-v1 13 | - '0.12' 14 | - '0.10' 15 | before_script: 16 | - npm prune 17 | after_success: 18 | - npm install -g codeclimate-test-reporter 19 | - CODECLIMATE_REPO_TOKEN=$CODECLIMATE_REPO_TOKEN codeclimate-test-reporter < ./coverage/mocha/lcov.info 20 | - npm run semantic-release 21 | -------------------------------------------------------------------------------- /Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/Icon.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Reedia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Masthead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/Masthead.png -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict' 29 | /* jslint nomen: true */ 30 | /* jslint vars: true */ 31 | /* global require,process,module */ 32 | var yeoman = require('yeoman-generator') 33 | var chalk = require('chalk') 34 | var AvionicGenerator = yeoman.generators.Base.extend({ 35 | constructor: function () { 36 | yeoman.generators.Base.apply(this, arguments) 37 | 38 | this.appYear = (new Date()).getFullYear() 39 | this.appVersion = require('../package.json').version 40 | }, 41 | 42 | info: function () { 43 | if (!this.options['skip-welcome-message']) { 44 | ascii.logo() 45 | ascii.captain() 46 | console.log(chalk.white.bold('\nThis is your Captain John Doe, welcoming you aboard to Avionic. \nAt this time, we request your full attention as your inflight \nteam will guide you through the safety features.\n')) 47 | ascii.crew() 48 | console.log(chalk.white.bold("\nLadies and gentlemen, this is Jane Smith and I’m your chief \nflight attendant. I'd like to direct your attention to the \nterminal in front of you. We will be showing our safety \ndemonstration and would like the next few minutes of your \ncomplete attention.\n")) 49 | } 50 | } 51 | }) 52 | var ascii = require('./src/ascii.js') 53 | require('./src/prompts')(AvionicGenerator) 54 | require('./src/color')(AvionicGenerator) 55 | require('./src/plugins')(AvionicGenerator) 56 | require('./src/write')(AvionicGenerator) 57 | require('./src/files')(AvionicGenerator) 58 | require('./src/install')(AvionicGenerator) 59 | module.exports = AvionicGenerator 60 | }()) 61 | -------------------------------------------------------------------------------- /app/prompts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "input", 4 | "name": "appName", 5 | "message": "Enter the name of your app:", 6 | "default":"Avionic" 7 | }, 8 | { 9 | "type": "input", 10 | "name": "appDescription", 11 | "message":"Enter a description:", 12 | "default":"A World-Class App Powered By Avionic" 13 | }, 14 | { 15 | "type": "input", 16 | "name": "appKeywords", 17 | "message":"Enter some keywords separated by commas:", 18 | "default": "avionic,ionic,yeoman,gulp,html,js,css,ios,android" 19 | }, 20 | { 21 | "type": "input", 22 | "name": "appUserName", 23 | "message":"Enter your name:", 24 | "default": "John Doe" 25 | }, 26 | { 27 | "type": "input", 28 | "name": "appUserEmail", 29 | "message":"Enter your email address:", 30 | "default": "john.doe@avionic.com" 31 | }, 32 | { 33 | "type": "input", 34 | "name": "appId", 35 | "message":"Enter the app id you'd like to use:", 36 | "default": "com.reedia.avionic" 37 | } 38 | ] 39 | -------------------------------------------------------------------------------- /app/src/color.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict' 29 | /* jslint nomen: true */ 30 | /* jslint vars: true */ 31 | /* global require,process,module */ 32 | var chalk = require('chalk') 33 | var color = require('../utils/color.js') 34 | 35 | module.exports = function (AvionicGenerator) { 36 | /** 37 | * Ask all questions from prompts.json 38 | * Complete responses with templated answers 39 | */ 40 | AvionicGenerator.prototype.askForColor = function askForColor () { 41 | var done = this.async() 42 | this.prompt(color.prompts, function (props) { 43 | this.appColor = props.color 44 | done() 45 | console.log(this.appColor) 46 | if (typeof this.appColor !== 'undefined' && this.appColor.length > 0) { 47 | this.appColor = props.color 48 | } else { 49 | this.appColor = '#000000' 50 | console.log(chalk.cyan('No color scheme selected. Defaulting to the Avionic theme')) 51 | } 52 | }.bind(this)) 53 | } 54 | } 55 | }()) 56 | -------------------------------------------------------------------------------- /app/src/install.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict' 29 | /* jslint nomen: true */ 30 | /* jslint vars: true */ 31 | /* global require,process,module */ 32 | var chalk = require('chalk') 33 | var cordova = require('cordova') 34 | // var options = require('../options.json') 35 | 36 | module.exports = function (AvionicGenerator) { 37 | /** 38 | * Declares options in the generator (only used for the help messages) 39 | */ 40 | AvionicGenerator.prototype.install = function install () { 41 | console.log(chalk.yellow('\nInstall plugins registered at plugins.cordova.io: ') + chalk.green('gulp plugin:add:org.apache.cordova.globalization')) 42 | console.log(chalk.yellow('Or install plugins direct from source: ') + chalk.green('gulp plugin:add:https://github.com/apache/cordova-plugin-console.git\n')) 43 | if (this.plugins.length > 0) { 44 | console.log(chalk.yellow('Installing selected Cordova plugins, please wait.')) 45 | // Turns out plugin() doesn't accept a callback so we try/catch instead 46 | try { 47 | // cordova.plugin('add', this.plugins) 48 | cordova.plugin('add', this.plugins, { save: true }) 49 | // var appPlugins = this.plugins.join(', ') 50 | this.log(chalk.green('Added plugins: ' + this.plugins)) 51 | } catch (e) { 52 | console.log(e) 53 | this.log.error(chalk.red('Please run `yo avionic` in an empty directory, or in that of an already existing cordova project.')) 54 | process.exit(1) 55 | } 56 | } 57 | 58 | this.installDependencies({ 59 | skipInstall: this.options['skip-install'] 60 | }) 61 | } 62 | } 63 | }()) 64 | -------------------------------------------------------------------------------- /app/src/plugins.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict' 29 | /* jslint nomen: true */ 30 | /* jslint vars: true */ 31 | /* global require,process,module */ 32 | 33 | var ionicUtils = require('../utils/') 34 | 35 | module.exports = function (AvionicGenerator) { 36 | /** 37 | * Ask all questions from prompts.json 38 | * Complete responses with templated answers 39 | */ 40 | AvionicGenerator.prototype.askForPlugins = function askForPlugins () { 41 | var done = this.async() 42 | this.prompt(ionicUtils.plugins.prompts, function (props) { 43 | this.plugins = props.plugins 44 | done() 45 | }.bind(this)) 46 | } 47 | } 48 | }()) 49 | -------------------------------------------------------------------------------- /app/src/prompts.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict' 29 | /* jslint nomen: true */ 30 | /* jslint vars: true */ 31 | /* global require,process,module */ 32 | 33 | var prompts = require('../prompts.json') 34 | 35 | module.exports = function (AvionicGenerator) { 36 | /** 37 | * Ask all questions from prompts.json 38 | * Complete responses with templated answers 39 | */ 40 | AvionicGenerator.prototype.askQuestions = function askQuestions () { 41 | var done = this.async() 42 | this.prompt(prompts, function (props) { 43 | // this.appName = this.appName || path.basename(process.cwd()) 44 | // this.appName = this._.titleize(this.appName) 45 | this.appName = props.appName 46 | this.appDescription = props.appDescription 47 | this.appKeywords = props.appKeywords 48 | this.appUserName = props.appUserName 49 | this.appUserEmail = props.appUserEmail 50 | this.appId = props.appId 51 | done() 52 | }.bind(this)) 53 | } 54 | } 55 | }()) 56 | -------------------------------------------------------------------------------- /app/templates/_CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to become a contributor and submit your own code 2 | 3 | <%= appName %> 4 | <%= appDescription %> <%= appVersion %> 5 | 6 | Copyright (c) <%= appYear %> <%= appUserName %> <<%= appUserEmail %>> 7 | 8 | ## <%= appName %> 9 | 10 | ### <%= appUserName %> (<%= appUserEmail %>) 11 | 12 | #### <%= appDescription %> 13 | 14 | #### <%= appKeywords %> 15 | 16 | ## Contributor License Agreements 17 | 18 | We'd love to accept your sample apps and patches! Before we can take them, we 19 | have to jump a couple of legal hurdles. 20 | 21 | Please fill out either the individual or corporate Contributor License Agreement 22 | (CLA). 23 | 24 | * If you are an individual writing original source code and you're sure you 25 | own the intellectual property, then you'll need to sign an [individual CLA] 26 | (https://developers.google.com/open-source/cla/individual). 27 | * If you work for a company that wants to allow you to contribute your work, 28 | then you'll need to sign a [corporate CLA] 29 | (https://developers.google.com/open-source/cla/corporate). 30 | 31 | Follow either of the two links above to access the appropriate CLA and 32 | instructions for how to sign and return it. Once we receive it, we'll be able to 33 | accept your pull requests. 34 | 35 | ## Contributing A Patch 36 | 37 | 1. Submit an issue describing your proposed change to the repo in question. 38 | 1. The repo owner will respond to your issue promptly. 39 | 1. If your proposed change is accepted, and you haven't already done so, sign a 40 | Contributor License Agreement (see details above). 41 | 1. Fork the desired repo, develop and test your code changes. 42 | 1. Ensure that your code adheres to the existing style in the sample to which 43 | you are contributing. Refer to the 44 | [Google Cloud Platform Samples Style Guide] 45 | (https://github.com/GoogleCloudPlatform/Template/wiki/style.html) for the 46 | recommended coding standards for this organization. 47 | 1. Ensure that your code has an appropriate set of unit tests which all pass. 48 | 1. Submit a pull request. 49 | -------------------------------------------------------------------------------- /app/templates/_LICENSE: -------------------------------------------------------------------------------- 1 | <%= appName %> 2 | <%= appDescription %> <%= appVersion %> 3 | 4 | Copyright (c) <%= appYear %> <%= appUserName %> <<%= appUserEmail %>> 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /app/templates/_bower.json: -------------------------------------------------------------------------------- 1 | {<% var ngVer = "1.4.0" %> 2 | "name": "<%= appName %>", 3 | "version": "<%= appVersion %>", 4 | "author": [ 5 | "<%= appUserName %> <<%= appUserEmail %>>" 6 | ], 7 | "description": "<%= appDescription %>", 8 | "license": "MIT", 9 | "private": "true", 10 | "devDependencies": {"ionic": "driftyco/ionic-bower#v1.1.0"}, 11 | "resolutions": {"angular": "^<%= ngVer %>"}, 12 | "dependencies": { 13 | "ngCordova": "latest", 14 | "lodash": "latest", 15 | "angular-animate": "latest", 16 | "angular-sanitize": "latest", 17 | "angular-ui-router": "latest", 18 | "angular-cookies":"^<%= ngVer %>", 19 | "angular-messages":"^<%= ngVer %>", 20 | "angular-resource": "^<%= ngVer %>", 21 | "angular-translate":"latest", 22 | "angular-translate-loader-static-files":"latest", 23 | "angular-translate-storage-cookie":"latest", 24 | "angular-translate-storage-local":"latest" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/templates/_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%= appName %> 4 | <%= appDescription %> 5 | <%= appKeywords %> 6 | <%= appUserName %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/templates/_en.json: -------------------------------------------------------------------------------- 1 | { 2 | "APP_NAME": "<%= appName %>", 3 | "APP_DESCRIPTION": "<%= appDescription %>", 4 | "APP_KEYWORDS": "<%= appKeywords %>", 5 | "APP_USER_NAME": "<%= appUserName %>", 6 | "APP_USER_EMAIL": "<%= appUserEmail %>", 7 | "APP_CATALOGUE": "Catalogue", 8 | "APP_CATALOGUE_NEW": "New", 9 | "APP_CATALOGUE_EDIT": "Edit", 10 | "APP_SETTINGS": "Settings", 11 | "APP_SESSION": "Session", 12 | "APP_REFRESH_TEXT": "Pull to refresh...", 13 | "APP_SIGNUP_HEADER": "Sign Up", 14 | "APP_SIGNUP_CTA": "Create Account", 15 | "APP_SIGNUP_CONTENT_SIGNIN": "Already have an account?", 16 | "APP_SIGNUP_CTA_SIGNIN": "Sign In", 17 | "APP_SIGNUP_FIRST_NAME": "First Name", 18 | "APP_SIGNUP_LAST_NAME": "Last Name", 19 | "APP_SIGNUP_EMAIL": "Email address", 20 | "APP_SIGNUP_PASSWORD": "Password", 21 | "APP_LOGIN_CTA_AVIONIC": "Log in with Avionic", 22 | "APP_LOGIN_CTA_FACEBOOK": "Log in with Facebook", 23 | "APP_LOGIN_CTA_GOOGLE": "Log in with Google+", 24 | "APP_LOGIN_CTA_TWITTER": "Log in with Twitter", 25 | "APP_PRODUCT_LIKE": "Like", 26 | "APP_PRODUCT_SHARE": "Share", 27 | "APP_PRODUCT_BUY": "Buy Now", 28 | "APP_INTRO_HEADER_SLIDE_1": "Welcome to <%= appName %>", 29 | "APP_INTRO_CONTENT_SLIDE_1": "A whole new way to build apps.", 30 | "APP_INTRO_CTA_BTN_SLIDE_1": "Get Started", 31 | "APP_INTRO_HEADER_SLIDE_2": "Powered by Avionic ✈", 32 | "APP_INTRO_CONTENT_SLIDE_2": "An incredibly simple mobile app creation tool for Android and iOS.", 33 | "APP_INTRO_CTA_BTN_SLIDE_2": "Find your style", 34 | "APP_INTRO_HEADER_SLIDE_3": "More ways to customise your application.", 35 | "APP_INTRO_CONTENT_SLIDE_3": "Themes let you apply a consistent tone to your app.", 36 | "APP_INTRO_CTA_BTN_SLIDE_3": "Explore new features", 37 | "APP_INTRO_HEADER_SLIDE_4": "Now everyone can build amazing apps.", 38 | "APP_INTRO_CONTENT_SLIDE_4": "We challenged ourselves to create tools that make it faster and easier to get the perfect app.", 39 | "APP_INTRO_CTA_BTN_SLIDE_4": "Got it!", 40 | "APP_INTRO_CTA_BTN_FB_SLIDE_4": "Sign Up with Facebook", 41 | "APP_INTRO_HEADER_SLIDE_5": "Avionic ✈", 42 | "APP_INTRO_CONTENT_SLIDE_5": "Experience First Class Mobile Application Development.", 43 | "APP_INTRO_CTA_TERMS_INTRO_SLIDE_5": "By signing up, you agree to Reedia's", 44 | "APP_INTRO_CTA_TERMSCONDITIONS_SLIDE_5": "terms & conditions", 45 | "APP_INTRO_CTA_AND_SLIDE_5": "and", 46 | "APP_INTRO_CTA_PRIVACY_SLIDE_5": "privacy policy", 47 | "APP_INTRO_CTA_BTN_SLIDE_5": "Sign Me Up" 48 | } 49 | -------------------------------------------------------------------------------- /app/templates/_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= appName %>", 3 | "version": "<%= appVersion %>", 4 | "description": "<%= appDescription %>", 5 | "keywords": "<%= appKeywords %>", 6 | "repository": "reedia/generator-avionic", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/reedia/generator-avionic.git" 10 | }, 11 | "homepage": "https://github.com/reedia/generator-avionic", 12 | "bugs": "https://github.com/reedia/generator-avionic/issues", 13 | "author": { 14 | "name": "<%= appUserName %>", 15 | "email": "<%= appUserEmail %>" 16 | }, 17 | "license": "MIT", 18 | "dependencies": {}, 19 | "devDependencies": { 20 | "beepbeep": "^1.2.0", 21 | "bower": "^1.3.3", 22 | "chalk": "^0.5.0", 23 | "connect-livereload": "^0.5.2", 24 | "del": "^1.1.1", 25 | "express": "^4.11.1", 26 | "glob": "^4.3.5", 27 | "gulp": "^3.8.10", 28 | "gulp-angular-templatecache": "^1.5.0", 29 | "gulp-autoprefixer": "^2.1.0", 30 | "gulp-changed": "^1.1.1", 31 | "gulp-concat": "^2.4.3", 32 | "gulp-consolidate": "^0.1.2", 33 | "gulp-complexity": "^0.3.0", 34 | "gulp-compressor": "^0.1.0", 35 | "gulp-filesize": "0.0.6", 36 | "karma": ">=0.10 <=0.13", 37 | "gulp-iconfont": "^1.0.0", 38 | "gulp-iconfont-css": "0.0.9", 39 | "gulp-imagemin": "2.2.1", 40 | "gulp-if": "^1.2.5", 41 | "gulp-inject": "^1.1.1", 42 | "gulp-jshint": "^1.9.0", 43 | "gulp-livereload": "^3.7.0", 44 | "gulp-load-plugins": "^0.8.0", 45 | "gulp-ng-annotate": "^0.5.0", 46 | "gulp-clean-css": "^2.0.10", 47 | "gulp-minify-html": "^1.0.2", 48 | "gulp-obfuscate": "^0.2.9", 49 | "gulp-plumber": "^1.0.1", 50 | "gulp-rename": "^1.2.0", 51 | "gulp-replace": "^0.5.3", 52 | "gulp-rev": "^3.0.0", 53 | "gulp-ruby-sass": "^1.0.5", 54 | "gulp-sass": "^2.0.1", 55 | "gulp-shell": "^0.2.11", 56 | "gulp-sourcemaps": "^1.5.2", 57 | "gulp-strip-css-comments": "^1.1.0", 58 | "gulp-strip-debug": "^1.0.2", 59 | "gulp-uglify": "^1.1.0", 60 | "gulp-util": "^2.2.14", 61 | "gulp-task-listing": "^1.0.0", 62 | "gulp-gzip": "^1.1.0", 63 | "imagemin-pngquant": "^4.1.0", 64 | "jshint-stylish": "^1.0.0", 65 | "karma-osx-reporter": "*", 66 | "karma-chrome-launcher": "^0.2.0", 67 | "karma-coverage": "^0.4.2", 68 | "karma-firefox-launcher": "^0.1.6", 69 | "karma-ie-launcher": "^0.2.0", 70 | "karma-jasmine": "^0.3.5", 71 | "jasmine-core": "^2.3.4", 72 | "phantom": "2.1.5", 73 | "phantomjs-prebuilt": "2.1.7", 74 | "lodash": "^4.13.1", 75 | "merge-stream": "^0.1.7", 76 | "open": "0.0.5", 77 | "plato": "^1.4.0", 78 | "require-dir": "^0.3.0", 79 | "ripple-emulator": "^0.9.28", 80 | "run-sequence": "^1.0.2", 81 | "shelljs": "^0.3.0", 82 | "streamqueue": "^0.1.1", 83 | "wiredep": "^2.2.2", 84 | "yargs": "^1.3.3" 85 | }, 86 | "peerDependencies": { 87 | "jasmine-core": "*" 88 | }, 89 | "scripts": { 90 | "gulp": "./node_modules/.bin/gulp" 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /app/templates/_plugins.json: -------------------------------------------------------------------------------- 1 | [ 2 | <%= appPlugins %> 3 | ] 4 | -------------------------------------------------------------------------------- /app/templates/_vendor.json: -------------------------------------------------------------------------------- 1 | [ 2 | "bower_components/angular/angular.js", 3 | "bower_components/angular-mocks/angular-mocks.js", 4 | "bower_components/angular-resource/angular-resource.js", 5 | "bower_components/angular-animate/angular-animate.js", 6 | "bower_components/angular-sanitize/angular-sanitize.js", 7 | "bower_components/angular-ui-router/release/angular-ui-router.js", 8 | "bower_components/angular-cookies/angular-cookies.js", 9 | "bower_components/angular-translate/angular-translate.js", 10 | "bower_components/angular-messages/angular-messages.js", 11 | "bower_components/angular-translate-loader-static-files/angular-translate-loader-static-files.js", 12 | "bower_components/angular-translate-storage-cookie/angular-translate-storage-cookie.js", 13 | "bower_components/angular-translate-storage-local/angular-translate-storage-local.js", 14 | "bower_components/ionic/js/ionic.js", 15 | "bower_components/ionic-material/ionic.material.min.js", 16 | "bower_components/ionic/js/ionic-angular.js", 17 | "bower_components/lodash/lodash.js", 18 | "bower_components/ngCordova/dist/ng-cordova.js" 19 | ] 20 | -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-bold-webfont.eot -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-bold-webfont.ttf -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-bold-webfont.woff -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-bold-webfont.woff2 -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-light-webfont.eot -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-light-webfont.ttf -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-light-webfont.woff -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-light-webfont.woff2 -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-regular-webfont.eot -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-regular-webfont.ttf -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-regular-webfont.woff -------------------------------------------------------------------------------- /app/templates/app/fonts/aleo-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/fonts/aleo-regular-webfont.woff2 -------------------------------------------------------------------------------- /app/templates/app/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/images/background.jpg -------------------------------------------------------------------------------- /app/templates/app/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/app/images/icon.png -------------------------------------------------------------------------------- /app/templates/app/styles/_avionic.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | /** 4 | * 5 | * AVIONIC 6 | * Propelling World-class Cross-platform Hybrid Applications ✈ 7 | * 8 | * Copyright 2015 Reedia Limited. All rights reserved. 9 | * 10 | * Permission is hereby granted, free of charge, to any person obtaining a copy 11 | * of this software and associated documentation files (the "Software"), to deal 12 | * in the Software without restriction, including without limitation the rights 13 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | * copies of the Software, and to permit persons to whom the Software is 15 | * furnished to do so, subject to the following conditions: 16 | * 17 | * The above copyright notice and this permission notice shall be included in 18 | * all copies or substantial portions of the Software. 19 | 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 26 | * THE SOFTWARE. 27 | * 28 | */ 29 | 30 | /* Icons */ 31 | @font-face { 32 | font-family: '<%= fontName %>'; 33 | src: url('../fonts/<%= fontName %>.eot?#iefix') format('embedded-opentype'), 34 | url('../fonts/<%= fontName %>.woff') format('woff'), 35 | url('../fonts/<%= fontName %>.woff2') format('woff2'), 36 | url('../fonts/<%= fontName %>.ttf') format('truetype'), 37 | url('../fonts/<%= fontName %>.svg#<%= fontName %>') format('svg'); 38 | } 39 | 40 | .icon:before { 41 | font-family: '<%= fontName %>'; 42 | font-style: normal; 43 | font-weight: normal; 44 | -webkit-font-smoothing: antialiased; 45 | -moz-osx-font-smoothing: grayscale; 46 | font-variant: normal; 47 | /* speak: none; only necessary if not using the private unicode range (firstGlyph option) */ 48 | text-decoration: none; 49 | text-transform: none; 50 | } 51 | <% _.each(glyphs, function(glyph) { %> 52 | .icon-<%= glyph.fileName %>:before { 53 | content: "\<%= glyph.codePoint %>"; 54 | } 55 | <% }); %> 56 | -------------------------------------------------------------------------------- /app/templates/app/styles/global/_fonts.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | @charset 'UTF-8'; 28 | 29 | $FontPath: "../fonts" !default; 30 | $FontName: "aleo" !default; 31 | $FontVersion: "1.2.2" !default; 32 | 33 | /* Regular */ 34 | @font-face { 35 | font-family: $FontName; 36 | @include font($FontPath, $FontVersion, "regular"); 37 | font-weight: 400; 38 | } 39 | 40 | /* Light */ 41 | @font-face { 42 | font-family: $FontName; 43 | @include font($FontPath, $FontVersion, "light"); 44 | font-weight: 200; 45 | } 46 | 47 | /* Bold */ 48 | @font-face { 49 | font-family: $FontName; 50 | @include font($FontPath, $FontVersion, "bold"); 51 | font-weight: 700; 52 | } 53 | -------------------------------------------------------------------------------- /app/templates/app/styles/global/_forms.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | @charset 'UTF-8'; 28 | 29 | input[type='email'], 30 | input[type='number'], 31 | input[type='search'], 32 | input[type='text'], 33 | input[type='tel'], 34 | input[type='url'], 35 | input[type='password'], 36 | textarea, 37 | select { 38 | position: relative; 39 | box-sizing: border-box; 40 | width: 100% !important; 41 | height: 38px; 42 | min-height: 60px !important; 43 | padding: 6px 10px; 44 | letter-spacing: .825px; 45 | border: 1px solid $color-50; 46 | background-color: #fff; 47 | box-shadow: none; 48 | @include border-radius(4px); 49 | } 50 | input[type='email'], 51 | input[type='number'], 52 | input[type='search'], 53 | input[type='text'], 54 | input[type='tel'], 55 | input[type='url'], 56 | input[type='password'], 57 | textarea { 58 | @include appearance(none); 59 | } 60 | textarea { 61 | min-height: 65px; 62 | padding-top: 6px; 63 | padding-bottom: 6px; 64 | } 65 | input[type='email']:focus, 66 | input[type='number']:focus, 67 | input[type='search']:focus, 68 | input[type='text']:focus, 69 | input[type='tel']:focus, 70 | input[type='url']:focus, 71 | input[type='password']:focus, 72 | textarea:focus, 73 | select:focus { 74 | border: 1px solid $color-900; 75 | outline: 0; 76 | } 77 | input, 78 | input[type='text'], 79 | input[type='password'], 80 | input[type='file'], 81 | input[type='email'], 82 | textarea { 83 | &:hover, &:focus, &:active { 84 | background: #f8f8f8; 85 | } 86 | } 87 | select { 88 | &:hover, &:focus, &:active { 89 | background: $color-50; 90 | } 91 | } 92 | label, 93 | legend { 94 | font-weight: 600; 95 | display: block; 96 | margin-bottom: .5rem; 97 | } 98 | fieldset { 99 | padding: 0; 100 | border-width: 0; 101 | } 102 | input[type='file'], 103 | select { 104 | cursor: pointer; 105 | cursor: hand; 106 | } 107 | input[type='checkbox'], 108 | input[type='radio'] { 109 | display: inline; 110 | } 111 | label > .label-body { 112 | font-weight: normal; 113 | display: inline-block; 114 | margin-left: .5rem; 115 | } 116 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_animations.scss: -------------------------------------------------------------------------------- 1 | 2 | // Slide up from the bottom, used for modals 3 | // ------------------------------- 4 | 5 | .slide-in-up { 6 | @include translate3d(0, 100%, 0); 7 | } 8 | .slide-in-up.ng-enter, 9 | .slide-in-up > .ng-enter { 10 | @include transition(all cubic-bezier(.1, .7, .1, 1) 400ms); 11 | } 12 | .slide-in-up.ng-enter-active, 13 | .slide-in-up > .ng-enter-active { 14 | @include translate3d(0, 0, 0); 15 | } 16 | 17 | .slide-in-up.ng-leave, 18 | .slide-in-up > .ng-leave { 19 | @include transition(all ease-in-out 250ms); 20 | } 21 | 22 | 23 | // Scale Out 24 | // Scale from hero (1 in this case) to zero 25 | // ------------------------------- 26 | 27 | @-webkit-keyframes scaleOut { 28 | from { -webkit-transform: scale(1); opacity: 1; } 29 | to { -webkit-transform: scale(0.8); opacity: 0; } 30 | } 31 | @keyframes scaleOut { 32 | from { transform: scale(1); opacity: 1; } 33 | to { transform: scale(0.8); opacity: 0; } 34 | } 35 | 36 | 37 | // Super Scale In 38 | // Scale from super (1.x) to duper (1 in this case) 39 | // ------------------------------- 40 | 41 | @-webkit-keyframes superScaleIn { 42 | from { -webkit-transform: scale(1.2); opacity: 0; } 43 | to { -webkit-transform: scale(1); opacity: 1 } 44 | } 45 | @keyframes superScaleIn { 46 | from { transform: scale(1.2); opacity: 0; } 47 | to { transform: scale(1); opacity: 1; } 48 | } 49 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_backdrop.scss: -------------------------------------------------------------------------------- 1 | 2 | .backdrop { 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | z-index: $z-index-backdrop; 7 | 8 | width: 100%; 9 | height: 100%; 10 | 11 | background-color: $loading-backdrop-bg-color; 12 | 13 | visibility: hidden; 14 | opacity: 0; 15 | 16 | &.visible { 17 | visibility: visible; 18 | } 19 | &.active { 20 | opacity: 1; 21 | } 22 | 23 | @include transition($loading-backdrop-fadein-duration opacity linear); 24 | } 25 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_badge.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Badges 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .badge { 8 | @include badge-style($badge-default-bg, $badge-default-text); 9 | z-index: $z-index-badge; 10 | display: inline-block; 11 | padding: 3px 8px; 12 | min-width: 10px; 13 | border-radius: $badge-border-radius; 14 | vertical-align: baseline; 15 | text-align: center; 16 | white-space: nowrap; 17 | font-weight: $badge-font-weight; 18 | font-size: $badge-font-size; 19 | line-height: $badge-line-height; 20 | 21 | &:empty { 22 | display: none; 23 | } 24 | } 25 | 26 | //Be sure to override specificity of rule that 'badge color matches tab color by default' 27 | .tabs .tab-item .badge, 28 | .badge { 29 | &.badge-light { 30 | @include badge-style($badge-light-bg, $badge-light-text); 31 | } 32 | &.badge-stable { 33 | @include badge-style($badge-stable-bg, $badge-stable-text); 34 | } 35 | &.badge-positive { 36 | @include badge-style($badge-positive-bg, $badge-positive-text); 37 | } 38 | &.badge-calm { 39 | @include badge-style($badge-calm-bg, $badge-calm-text); 40 | } 41 | &.badge-assertive { 42 | @include badge-style($badge-assertive-bg, $badge-assertive-text); 43 | } 44 | &.badge-balanced { 45 | @include badge-style($badge-balanced-bg, $badge-balanced-text); 46 | } 47 | &.badge-energized { 48 | @include badge-style($badge-energized-bg, $badge-energized-text); 49 | } 50 | &.badge-royal { 51 | @include badge-style($badge-royal-bg, $badge-royal-text); 52 | } 53 | &.badge-dark { 54 | @include badge-style($badge-dark-bg, $badge-dark-text); 55 | } 56 | } 57 | 58 | // Quick fix for labels/badges in buttons 59 | .button .badge { 60 | position: relative; 61 | top: -1px; 62 | } 63 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_button-bar.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Button Bar 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .button-bar { 8 | @include display-flex(); 9 | @include flex(1); 10 | width: 100%; 11 | 12 | &.button-bar-inline { 13 | display: block; 14 | width: auto; 15 | 16 | @include clearfix(); 17 | 18 | > .button { 19 | width: auto; 20 | display: inline-block; 21 | float: left; 22 | } 23 | } 24 | } 25 | 26 | .button-bar > .button { 27 | @include flex(1); 28 | display: block; 29 | 30 | overflow: hidden; 31 | 32 | padding: 0 16px; 33 | 34 | width: 0; 35 | 36 | border-width: 1px 0px 1px 1px; 37 | border-radius: 0; 38 | text-align: center; 39 | text-overflow: ellipsis; 40 | white-space: nowrap; 41 | 42 | &:before, 43 | .icon:before { 44 | line-height: 44px; 45 | } 46 | 47 | &:first-child { 48 | border-radius: $button-border-radius 0px 0px $button-border-radius; 49 | } 50 | &:last-child { 51 | border-right-width: 1px; 52 | border-radius: 0px $button-border-radius $button-border-radius 0px; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_list.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Lists 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .list { 8 | position: relative; 9 | padding-top: $item-border-width; 10 | padding-bottom: $item-border-width; 11 | padding-left: 0; // reset padding because ul and ol 12 | margin-bottom: 20px; 13 | } 14 | .list:last-child { 15 | margin-bottom: 0px; 16 | &.card{ 17 | margin-bottom:40px; 18 | } 19 | } 20 | 21 | 22 | /** 23 | * List Header 24 | * -------------------------------------------------- 25 | */ 26 | 27 | .list-header { 28 | margin-top: $list-header-margin-top; 29 | padding: $list-header-padding; 30 | background-color: $list-header-bg; 31 | color: $list-header-color; 32 | font-weight: bold; 33 | } 34 | 35 | // when its a card make sure it doesn't duplicate top and bottom borders 36 | .card.list .list-item { 37 | padding-right: 1px; 38 | padding-left: 1px; 39 | } 40 | 41 | 42 | /** 43 | * Cards and Inset Lists 44 | * -------------------------------------------------- 45 | * A card and list-inset are close to the same thing, except a card as a box shadow. 46 | */ 47 | 48 | .card, 49 | .list-inset { 50 | overflow: hidden; 51 | margin: ($content-padding * 2) $content-padding; 52 | border-radius: $card-border-radius; 53 | background-color: $card-body-bg; 54 | } 55 | 56 | .card { 57 | padding-top: $item-border-width; 58 | padding-bottom: $item-border-width; 59 | box-shadow: $card-box-shadow; 60 | 61 | .item { 62 | border-left: 0; 63 | border-right: 0; 64 | } 65 | .item:first-child { 66 | border-top: 0; 67 | } 68 | .item:last-child { 69 | border-bottom: 0; 70 | } 71 | } 72 | 73 | .padding { 74 | .card, .list-inset { 75 | margin-left: 0; 76 | margin-right: 0; 77 | } 78 | } 79 | 80 | .card .item, 81 | .list-inset .item, 82 | .padding > .list .item 83 | { 84 | &:first-child { 85 | border-top-left-radius: $card-border-radius; 86 | border-top-right-radius: $card-border-radius; 87 | 88 | .item-content { 89 | border-top-left-radius: $card-border-radius; 90 | border-top-right-radius: $card-border-radius; 91 | } 92 | } 93 | &:last-child { 94 | border-bottom-right-radius: $card-border-radius; 95 | border-bottom-left-radius: $card-border-radius; 96 | 97 | .item-content { 98 | border-bottom-right-radius: $card-border-radius; 99 | border-bottom-left-radius: $card-border-radius; 100 | } 101 | } 102 | } 103 | 104 | .card .item:last-child, 105 | .list-inset .item:last-child { 106 | margin-bottom: $item-border-width * -1; 107 | } 108 | 109 | .card .item, 110 | .list-inset .item, 111 | .padding > .list .item, 112 | .padding-horizontal > .list .item { 113 | margin-right: 0; 114 | margin-left: 0; 115 | 116 | &.item-input input { 117 | padding-right: 44px; 118 | } 119 | } 120 | .padding-left > .list .item { 121 | margin-left: 0; 122 | } 123 | .padding-right > .list .item { 124 | margin-right: 0; 125 | } 126 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_loaders.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Loaders (Spinners) 3 | * -------------------------------------------------- 4 | */ 5 | 6 | svg.loader { 7 | width: 28px; 8 | height: 28px; 9 | stroke: #333; 10 | fill: #333; 11 | } 12 | 13 | .loader-ios, 14 | .loader-ios-small { 15 | 16 | line { 17 | stroke: #69717d; 18 | } 19 | 20 | } 21 | 22 | .loader-android { 23 | 24 | circle { 25 | stroke: #4b8bf4; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_loading.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Loading 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .loading-container { 8 | position: absolute; 9 | left: 0; 10 | top: 0; 11 | right: 0; 12 | bottom: 0; 13 | 14 | z-index: $z-index-loading; 15 | 16 | @include display-flex(); 17 | @include justify-content(center); 18 | @include align-items(center); 19 | 20 | @include transition(0.2s opacity linear); 21 | visibility: hidden; 22 | opacity: 0; 23 | 24 | &:not(.visible) .icon { 25 | display: none; 26 | } 27 | &.visible { 28 | visibility: visible; 29 | } 30 | &.active { 31 | opacity: 1; 32 | } 33 | 34 | .loading { 35 | padding: $loading-padding; 36 | 37 | border-radius: $loading-border-radius; 38 | background-color: $loading-bg-color; 39 | 40 | color: $loading-text-color; 41 | 42 | text-align: center; 43 | text-overflow: ellipsis; 44 | font-size: $loading-font-size; 45 | 46 | h1, h2, h3, h4, h5, h6 { 47 | color: $loading-text-color; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_menu.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Menus 4 | * -------------------------------------------------- 5 | * Side panel structure 6 | */ 7 | 8 | .menu { 9 | position: absolute; 10 | top: 0; 11 | bottom: 0; 12 | z-index: $z-index-menu; 13 | overflow: hidden; 14 | 15 | min-height: 100%; 16 | max-height: 100%; 17 | width: $menu-width; 18 | 19 | background-color: $menu-bg; 20 | 21 | .scroll-content { 22 | z-index: $z-index-menu-scroll-content; 23 | } 24 | 25 | .bar-header { 26 | z-index: $z-index-menu-bar-header; 27 | } 28 | } 29 | 30 | .menu-content { 31 | @include transform(none); 32 | box-shadow: $menu-side-shadow; 33 | } 34 | 35 | .menu-open .menu-content .pane, 36 | .menu-open .menu-content .scroll-content { 37 | pointer-events: none; 38 | } 39 | 40 | .grade-b .menu-content, 41 | .grade-c .menu-content { 42 | @include box-sizing(content-box); 43 | right: -1px; 44 | left: -1px; 45 | border-right: 1px solid #ccc; 46 | border-left: 1px solid #ccc; 47 | box-shadow: none; 48 | } 49 | 50 | .menu-left { 51 | left: 0; 52 | } 53 | 54 | .menu-right { 55 | right: 0; 56 | } 57 | 58 | .aside-open.aside-resizing .menu-right { 59 | display: none; 60 | } 61 | 62 | .menu-animated { 63 | @include transition-transform($menu-animation-speed ease); 64 | } 65 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_modal.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Modals 4 | * -------------------------------------------------- 5 | * Modals are independent windows that slide in from off-screen. 6 | */ 7 | 8 | .modal-backdrop, 9 | .modal-backdrop-bg { 10 | position: fixed; 11 | top: 0; 12 | left: 0; 13 | z-index: $z-index-modal; 14 | width: 100%; 15 | height: 100%; 16 | } 17 | 18 | .modal-backdrop-bg { 19 | pointer-events: none; 20 | } 21 | 22 | .modal { 23 | display: block; 24 | position: absolute; 25 | top: 0; 26 | z-index: $z-index-modal; 27 | overflow: hidden; 28 | min-height: 100%; 29 | width: 100%; 30 | background-color: $modal-bg-color; 31 | } 32 | 33 | @media (min-width: $modal-inset-mode-break-point) { 34 | // inset mode is when the modal doesn't fill the entire 35 | // display but instead is centered within a large display 36 | .modal { 37 | top: $modal-inset-mode-top; 38 | right: $modal-inset-mode-right; 39 | bottom: $modal-inset-mode-bottom; 40 | left: $modal-inset-mode-left; 41 | min-height: $modal-inset-mode-min-height; 42 | width: (100% - $modal-inset-mode-left - $modal-inset-mode-right); 43 | } 44 | 45 | .modal.ng-leave-active { 46 | bottom: 0; 47 | } 48 | 49 | // remove ios header padding from inset header 50 | .platform-ios.platform-cordova .modal-wrapper .modal { 51 | .bar-header:not(.bar-subheader) { 52 | height: $bar-height; 53 | > * { 54 | margin-top: 0; 55 | } 56 | } 57 | .tabs-top > .tabs, 58 | .tabs.tabs-top { 59 | top: $bar-height; 60 | } 61 | .has-header, 62 | .bar-subheader { 63 | top: $bar-height; 64 | } 65 | .has-subheader { 66 | top: $bar-height + $bar-subheader-height; 67 | } 68 | .has-header.has-tabs-top { 69 | top: $bar-height + $tabs-height; 70 | } 71 | .has-header.has-subheader.has-tabs-top { 72 | top: $bar-height + $bar-subheader-height + $tabs-height; 73 | } 74 | } 75 | 76 | .modal-backdrop-bg { 77 | @include transition(opacity 300ms ease-in-out); 78 | background-color: $modal-backdrop-bg-active; 79 | opacity: 0; 80 | } 81 | 82 | .active .modal-backdrop-bg { 83 | opacity: 0.5; 84 | } 85 | } 86 | 87 | // disable clicks on all but the modal 88 | .modal-open { 89 | pointer-events: none; 90 | 91 | .modal, 92 | .modal-backdrop { 93 | pointer-events: auto; 94 | } 95 | // prevent clicks on modal when loading overlay is active though 96 | &.loading-active { 97 | .modal, 98 | .modal-backdrop { 99 | pointer-events: none; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_platform.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Platform 4 | * -------------------------------------------------- 5 | * Platform specific tweaks 6 | */ 7 | 8 | .platform-ios.platform-cordova { 9 | // iOS has a status bar which sits on top of the header. 10 | // Bump down everything to make room for it. However, if 11 | // if its in Cordova, and set to fullscreen, then disregard the bump. 12 | &:not(.fullscreen) { 13 | .bar-header:not(.bar-subheader) { 14 | height: $bar-height + $ios-statusbar-height; 15 | 16 | &.item-input-inset .item-input-wrapper { 17 | margin-top: 19px !important; 18 | } 19 | 20 | > * { 21 | margin-top: $ios-statusbar-height; 22 | } 23 | } 24 | .tabs-top > .tabs, 25 | .tabs.tabs-top { 26 | top: $bar-height + $ios-statusbar-height; 27 | } 28 | 29 | .has-header, 30 | .bar-subheader { 31 | top: $bar-height + $ios-statusbar-height; 32 | } 33 | .has-subheader { 34 | top: $bar-height + $bar-subheader-height + $ios-statusbar-height; 35 | } 36 | .has-header.has-tabs-top { 37 | top: $bar-height + $tabs-height + $ios-statusbar-height; 38 | } 39 | .has-header.has-subheader.has-tabs-top { 40 | top: $bar-height + $bar-subheader-height + $tabs-height + $ios-statusbar-height; 41 | } 42 | } 43 | &.status-bar-hide { 44 | // Cordova doesn't adjust the body height correctly, this makes up for it 45 | margin-bottom: 20px; 46 | } 47 | } 48 | 49 | @media (orientation:landscape) { 50 | .platform-ios.platform-browser.platform-ipad { 51 | position: fixed; // required for iPad 7 Safari 52 | } 53 | } 54 | 55 | .platform-c:not(.enable-transitions) * { 56 | // disable transitions on grade-c devices (Android 2) 57 | -webkit-transition: none !important; 58 | transition: none !important; 59 | } 60 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_popup.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Popups 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .popup-container { 8 | position: absolute; 9 | top: 0; 10 | left: 0; 11 | bottom: 0; 12 | right: 0; 13 | background: rgba(0,0,0,0); 14 | 15 | @include display-flex(); 16 | @include justify-content(center); 17 | @include align-items(center); 18 | 19 | z-index: $z-index-popup; 20 | 21 | // Start hidden 22 | visibility: hidden; 23 | &.popup-showing { 24 | visibility: visible; 25 | } 26 | 27 | &.popup-hidden .popup { 28 | @include animation-name(scaleOut); 29 | @include animation-duration($popup-leave-animation-duration); 30 | @include animation-timing-function(ease-in-out); 31 | @include animation-fill-mode(both); 32 | } 33 | 34 | &.active .popup { 35 | @include animation-name(superScaleIn); 36 | @include animation-duration($popup-enter-animation-duration); 37 | @include animation-timing-function(ease-in-out); 38 | @include animation-fill-mode(both); 39 | } 40 | 41 | .popup { 42 | width: $popup-width; 43 | max-width: 100%; 44 | max-height: 90%; 45 | 46 | border-radius: $popup-border-radius; 47 | background-color: $popup-background-color; 48 | 49 | @include display-flex(); 50 | @include flex-direction(column); 51 | } 52 | 53 | input, 54 | textarea { 55 | width: 100%; 56 | } 57 | } 58 | 59 | .popup-head { 60 | padding: 15px 10px; 61 | border-bottom: 1px solid #eee; 62 | text-align: center; 63 | } 64 | .popup-title { 65 | margin: 0; 66 | padding: 0; 67 | font-size: 15px; 68 | } 69 | .popup-sub-title { 70 | margin: 5px 0 0 0; 71 | padding: 0; 72 | font-weight: normal; 73 | font-size: 11px; 74 | } 75 | .popup-body { 76 | padding: 10px; 77 | overflow: auto; 78 | } 79 | 80 | .popup-buttons { 81 | @include display-flex(); 82 | @include flex-direction(row); 83 | padding: 10px; 84 | min-height: $popup-button-min-height + 20; 85 | 86 | .button { 87 | @include flex(1); 88 | display: block; 89 | min-height: $popup-button-min-height; 90 | border-radius: $popup-button-border-radius; 91 | line-height: $popup-button-line-height; 92 | 93 | margin-right: 5px; 94 | &:last-child { 95 | margin-right: 0px; 96 | } 97 | } 98 | } 99 | 100 | .popup-open { 101 | pointer-events: none; 102 | 103 | &.modal-open .modal { 104 | pointer-events: none; 105 | } 106 | 107 | .popup-backdrop, .popup { 108 | pointer-events: auto; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_progress.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Progress 4 | * -------------------------------------------------- 5 | */ 6 | 7 | progress { 8 | display: block; 9 | margin: $progress-margin; 10 | width: $progress-width; 11 | } 12 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_radio.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Radio Button Inputs 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-radio { 8 | padding: 0; 9 | 10 | &:hover { 11 | cursor: pointer; 12 | } 13 | } 14 | 15 | .item-radio .item-content { 16 | /* give some room to the right for the checkmark icon */ 17 | padding-right: $item-padding * 4; 18 | } 19 | 20 | .item-radio .radio-icon { 21 | /* checkmark icon will be hidden by default */ 22 | position: absolute; 23 | top: 0; 24 | right: 0; 25 | z-index: $z-index-item-radio; 26 | visibility: hidden; 27 | padding: $item-padding - 2; 28 | height: 100%; 29 | font-size: 24px; 30 | } 31 | 32 | .item-radio input { 33 | /* hide any radio button inputs elements (the ugly circles) */ 34 | position: absolute; 35 | left: -9999px; 36 | 37 | &:checked ~ .item-content { 38 | /* style the item content when its checked */ 39 | background: #f7f7f7; 40 | } 41 | 42 | &:checked ~ .radio-icon { 43 | /* show the checkmark icon when its checked */ 44 | visibility: visible; 45 | } 46 | } 47 | 48 | // Hack for Android to correctly display the checked item 49 | // http://timpietrusky.com/advanced-checkbox-hack 50 | .platform-android.grade-b .item-radio, 51 | .platform-android.grade-c .item-radio { 52 | -webkit-animation: androidCheckedbugfix infinite 1s; 53 | } 54 | @-webkit-keyframes androidCheckedbugfix { 55 | from { padding: 0; } 56 | to { padding: 0; } 57 | } 58 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_range.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Range 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .range input{ 8 | display: inline-block; 9 | overflow: hidden; 10 | margin-top: 5px; 11 | margin-bottom: 5px; 12 | padding-right: 2px; 13 | padding-left: 1px; 14 | width: auto; 15 | height: $range-slider-height + 15; 16 | outline: none; 17 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $range-default-track-bg), color-stop(100%, $range-default-track-bg)); 18 | background: linear-gradient(to right, $range-default-track-bg 0%, $range-default-track-bg 100%); 19 | background-position: center; 20 | background-size: 99% $range-track-height; 21 | background-repeat: no-repeat; 22 | -webkit-appearance: none; 23 | 24 | &::-webkit-slider-thumb { 25 | position: relative; 26 | width: $range-slider-width; 27 | height: $range-slider-height; 28 | border-radius: $range-slider-border-radius; 29 | background-color: $toggle-handle-off-bg-color; 30 | box-shadow: $range-slider-box-shadow; 31 | cursor: pointer; 32 | -webkit-appearance: none; 33 | border: 0; 34 | } 35 | 36 | &::-webkit-slider-thumb:before { 37 | /* what creates the colorful line on the left side of the slider */ 38 | position: absolute; 39 | top: ($range-slider-height / 2) - ($range-track-height / 2); 40 | left: -2001px; 41 | width: 2000px; 42 | height: $range-track-height; 43 | background: $dark; 44 | content: ' '; 45 | } 46 | 47 | &::-webkit-slider-thumb:after { 48 | /* create a larger (but hidden) hit area */ 49 | position: absolute; 50 | top: -15px; 51 | left: -15px; 52 | padding: 30px; 53 | content: ' '; 54 | //background: red; 55 | //opacity: .5; 56 | } 57 | 58 | } 59 | 60 | .range { 61 | @include display-flex(); 62 | @include align-items(center); 63 | padding: 2px 11px; 64 | 65 | &.range-light { 66 | input { @include range-style($range-light-track-bg); } 67 | } 68 | &.range-stable { 69 | input { @include range-style($range-stable-track-bg); } 70 | } 71 | &.range-positive { 72 | input { @include range-style($range-positive-track-bg); } 73 | } 74 | &.range-calm { 75 | input { @include range-style($range-calm-track-bg); } 76 | } 77 | &.range-balanced { 78 | input { @include range-style($range-balanced-track-bg); } 79 | } 80 | &.range-assertive { 81 | input { @include range-style($range-assertive-track-bg); } 82 | } 83 | &.range-energized { 84 | input { @include range-style($range-energized-track-bg); } 85 | } 86 | &.range-royal { 87 | input { @include range-style($range-royal-track-bg); } 88 | } 89 | &.range-dark { 90 | input { @include range-style($range-dark-track-bg); } 91 | } 92 | } 93 | 94 | .range .icon { 95 | @include flex(0); 96 | display: block; 97 | min-width: $range-icon-size; 98 | text-align: center; 99 | font-size: $range-icon-size; 100 | } 101 | 102 | .range input { 103 | @include flex(1); 104 | display: block; 105 | margin-right: 10px; 106 | margin-left: 10px; 107 | } 108 | 109 | .range-label { 110 | @include flex(0, 0, auto); 111 | display: block; 112 | white-space: nowrap; 113 | } 114 | 115 | .range-label:first-child { 116 | padding-left: 5px; 117 | } 118 | .range input + .range-label { 119 | padding-right: 5px; 120 | padding-left: 0; 121 | } 122 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_refresher.scss: -------------------------------------------------------------------------------- 1 | 2 | // Scroll refresher (for pull to refresh) 3 | .scroll-refresher { 4 | position: absolute; 5 | top: -60px; 6 | right: 0; 7 | left: 0; 8 | overflow: hidden; 9 | margin: auto; 10 | height: 60px; 11 | .ionic-refresher-content { 12 | position: absolute; 13 | bottom: 15px; 14 | left: 0; 15 | width: 100%; 16 | /* color: $scroll-refresh-icon-color; */ 17 | text-align: center; 18 | 19 | 20 | .text-refreshing, 21 | .text-pulling { 22 | } 23 | &.ionic-refresher-with-text { 24 | bottom: 10px; 25 | } 26 | } 27 | 28 | .icon-refreshing, 29 | .icon-pulling { 30 | width: 100%; 31 | -webkit-backface-visibility: hidden; 32 | backface-visibility: hidden; 33 | -webkit-transform-style: preserve-3d; 34 | transform-style: preserve-3d; 35 | } 36 | .icon-pulling { 37 | @include animation-name(refresh-spin-back); 38 | @include animation-duration(200ms); 39 | @include animation-timing-function(linear); 40 | @include animation-fill-mode(none); 41 | -webkit-transform: translate3d(0,0,0) rotate(0deg); 42 | transform: translate3d(0,0,0) rotate(0deg); 43 | } 44 | .icon-refreshing, 45 | .text-refreshing { 46 | display: none; 47 | } 48 | .icon-refreshing { 49 | @include animation-duration(1.5s); 50 | } 51 | 52 | &.active { 53 | .icon-pulling:not(.pulling-rotation-disabled) { 54 | @include animation-name(refresh-spin); 55 | -webkit-transform: translate3d(0,0,0) rotate(-180deg); 56 | transform: translate3d(0,0,0) rotate(-180deg); 57 | } 58 | &.refreshing { 59 | @include transition(-webkit-transform .2s); 60 | @include transition(transform .2s); 61 | -webkit-transform: scale(1,1); 62 | transform: scale(1,1); 63 | 64 | .icon-pulling, 65 | .text-pulling { 66 | display: none; 67 | } 68 | .icon-refreshing, 69 | .text-refreshing { 70 | display: block; 71 | } 72 | &.refreshing-tail { 73 | -webkit-transform: scale(0,0); 74 | transform: scale(0,0); 75 | } 76 | } 77 | } 78 | } 79 | .overflow-scroll > .scroll{ 80 | &.overscroll{ 81 | position:fixed; 82 | } 83 | -webkit-overflow-scrolling:touch; 84 | width:100%; 85 | } 86 | 87 | @-webkit-keyframes refresh-spin { 88 | 0% { -webkit-transform: translate3d(0,0,0) rotate(0); } 89 | 100% { -webkit-transform: translate3d(0,0,0) rotate(180deg); } 90 | } 91 | 92 | @keyframes refresh-spin { 93 | 0% { transform: translate3d(0,0,0) rotate(0); } 94 | 100% { transform: translate3d(0,0,0) rotate(180deg); } 95 | } 96 | 97 | @-webkit-keyframes refresh-spin-back { 98 | 0% { -webkit-transform: translate3d(0,0,0) rotate(180deg); } 99 | 100% { -webkit-transform: translate3d(0,0,0) rotate(0); } 100 | } 101 | 102 | @keyframes refresh-spin-back { 103 | 0% { transform: translate3d(0,0,0) rotate(180deg); } 104 | 100% { transform: translate3d(0,0,0) rotate(0); } 105 | } 106 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_select.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Select 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-select { 8 | position: relative; 9 | 10 | select { 11 | @include appearance(none); 12 | position: absolute; 13 | top: 0; 14 | bottom: 0; 15 | right: 0; 16 | padding: ($item-padding - 2) ($item-padding * 3) ($item-padding) $item-padding; 17 | max-width: 65%; 18 | 19 | border: none; 20 | background: $item-default-bg; 21 | color: #333; 22 | 23 | // hack to hide default dropdown arrow in FF 24 | text-indent: .01px; 25 | text-overflow: ''; 26 | 27 | white-space: nowrap; 28 | font-size: $font-size-base; 29 | 30 | cursor: pointer; 31 | direction: rtl; // right align the select text 32 | } 33 | 34 | select::-ms-expand { 35 | // hide default dropdown arrow in IE 36 | display: none; 37 | } 38 | 39 | option { 40 | direction: ltr; 41 | } 42 | 43 | &:after { 44 | position: absolute; 45 | top: 50%; 46 | right: $item-padding; 47 | margin-top: -3px; 48 | width: 0; 49 | height: 0; 50 | border-top: 5px solid; 51 | border-right: 5px solid rgba(0, 0, 0, 0); 52 | border-left: 5px solid rgba(0, 0, 0, 0); 53 | color: #999; 54 | content: ""; 55 | pointer-events: none; 56 | } 57 | &.item-light { 58 | select{ 59 | background:$item-light-bg; 60 | color:$item-light-text; 61 | } 62 | } 63 | &.item-stable { 64 | select{ 65 | background:$item-stable-bg; 66 | color:$item-stable-text; 67 | } 68 | &:after, .input-label{ 69 | color:darken($item-stable-border,30%); 70 | } 71 | } 72 | &.item-positive { 73 | select{ 74 | background:$item-positive-bg; 75 | color:$item-positive-text; 76 | } 77 | &:after, .input-label{ 78 | color:$item-positive-text; 79 | } 80 | } 81 | &.item-calm { 82 | select{ 83 | background:$item-calm-bg; 84 | color:$item-calm-text; 85 | } 86 | &:after, .input-label{ 87 | color:$item-calm-text; 88 | } 89 | } 90 | &.item-assertive { 91 | select{ 92 | background:$item-assertive-bg; 93 | color:$item-assertive-text; 94 | } 95 | &:after, .input-label{ 96 | color:$item-assertive-text; 97 | } 98 | } 99 | &.item-balanced { 100 | select{ 101 | background:$item-balanced-bg; 102 | color:$item-balanced-text; 103 | } 104 | &:after, .input-label{ 105 | color:$item-balanced-text; 106 | } 107 | } 108 | &.item-energized { 109 | select{ 110 | background:$item-energized-bg; 111 | color:$item-energized-text; 112 | } 113 | &:after, .input-label{ 114 | color:$item-energized-text; 115 | } 116 | } 117 | &.item-royal { 118 | select{ 119 | background:$item-royal-bg; 120 | color:$item-royal-text; 121 | } 122 | &:after, .input-label{ 123 | color:$item-royal-text; 124 | } 125 | } 126 | &.item-dark { 127 | select{ 128 | background:$item-dark-bg; 129 | color:$item-dark-text; 130 | } 131 | &:after, .input-label{ 132 | color:$item-dark-text; 133 | } 134 | } 135 | } 136 | 137 | select { 138 | &[multiple], 139 | &[size] { 140 | height: auto; 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_slide-box.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Slide Box 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .slider { 8 | position: relative; 9 | visibility: hidden; 10 | // Make sure items don't scroll over ever 11 | overflow: hidden; 12 | } 13 | 14 | .slider-slides { 15 | position: relative; 16 | height: 100%; 17 | } 18 | 19 | .slider-slide { 20 | position: relative; 21 | display: block; 22 | float: left; 23 | width: 100%; 24 | height: 100%; 25 | vertical-align: top; 26 | } 27 | 28 | .slider-slide-image { 29 | > img { 30 | width: 100%; 31 | } 32 | } 33 | 34 | .slider-pager { 35 | position: absolute; 36 | bottom: 20px; 37 | z-index: $z-index-slider-pager; 38 | width: 100%; 39 | height: 15px; 40 | text-align: center; 41 | 42 | .slider-pager-page { 43 | display: inline-block; 44 | margin: 0px 3px; 45 | width: 15px; 46 | color: #000; 47 | text-decoration: none; 48 | 49 | opacity: 0.3; 50 | 51 | &.active { 52 | @include transition(opacity 0.4s ease-in); 53 | opacity: 1; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_spinner.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Spinners 3 | * -------------------------------------------------- 4 | */ 5 | 6 | .spinner { 7 | svg { 8 | width: $spinner-width; 9 | height: $spinner-height; 10 | } 11 | 12 | stroke: $spinner-default-stroke; 13 | fill: $spinner-default-fill; 14 | 15 | &.spinner-light { 16 | stroke: $spinner-light-stroke; 17 | fill: $spinner-light-fill; 18 | } 19 | &.spinner-stable { 20 | stroke: $spinner-stable-stroke; 21 | fill: $spinner-stable-fill; 22 | } 23 | &.spinner-positive { 24 | stroke: $spinner-positive-stroke; 25 | fill: $spinner-positive-fill; 26 | } 27 | &.spinner-calm { 28 | stroke: $spinner-calm-stroke; 29 | fill: $spinner-calm-fill; 30 | } 31 | &.spinner-balanced { 32 | stroke: $spinner-balanced-stroke; 33 | fill: $spinner-balanced-fill; 34 | } 35 | &.spinner-assertive { 36 | stroke: $spinner-assertive-stroke; 37 | fill: $spinner-assertive-fill; 38 | } 39 | &.spinner-energized { 40 | stroke: $spinner-energized-stroke; 41 | fill: $spinner-energized-fill; 42 | } 43 | &.spinner-royal { 44 | stroke: $spinner-royal-stroke; 45 | fill: $spinner-royal-fill; 46 | } 47 | &.spinner-dark { 48 | stroke: $spinner-dark-stroke; 49 | fill: $spinner-dark-fill; 50 | } 51 | } 52 | 53 | .spinner-android { 54 | stroke: #4b8bf4; 55 | } 56 | 57 | .spinner-ios, 58 | .spinner-ios-small { 59 | stroke: #69717d; 60 | } 61 | 62 | .spinner-spiral { 63 | .stop1 { 64 | stop-color: $spinner-light-fill; 65 | stop-opacity: 0; 66 | } 67 | 68 | &.spinner-light { 69 | .stop1 { 70 | stop-color: $spinner-default-fill; 71 | } 72 | .stop2 { 73 | stop-color: $spinner-light-fill; 74 | } 75 | } 76 | &.spinner-stable .stop2 { 77 | stop-color: $spinner-stable-fill; 78 | } 79 | &.spinner-positive .stop2 { 80 | stop-color: $spinner-positive-fill; 81 | } 82 | &.spinner-calm .stop2 { 83 | stop-color: $spinner-calm-fill; 84 | } 85 | &.spinner-balanced .stop2 { 86 | stop-color: $spinner-balanced-fill; 87 | } 88 | &.spinner-assertive .stop2 { 89 | stop-color: $spinner-assertive-fill; 90 | } 91 | &.spinner-energized .stop2 { 92 | stop-color: $spinner-energized-fill; 93 | } 94 | &.spinner-royal .stop2 { 95 | stop-color: $spinner-royal-fill; 96 | } 97 | &.spinner-dark .stop2 { 98 | stop-color: $spinner-dark-fill; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_split-pane.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Split Pane 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .split-pane { 8 | @include display-flex(); 9 | @include align-items(stretch); 10 | width: 100%; 11 | height: 100%; 12 | } 13 | 14 | .split-pane-menu { 15 | @include flex(0, 0, $split-pane-menu-width); 16 | 17 | overflow-y: auto; 18 | width: $split-pane-menu-width; 19 | height: 100%; 20 | border-right: 1px solid $split-pane-menu-border-color; 21 | 22 | @media all and (max-width: 568px) { 23 | border-right: none; 24 | } 25 | } 26 | 27 | .split-pane-content { 28 | @include flex(1, 0, auto); 29 | } 30 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/_type.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Typography 4 | * -------------------------------------------------- 5 | */ 6 | 7 | 8 | // Body text 9 | // ------------------------- 10 | 11 | p { 12 | margin: 0 0 ($line-height-computed / 2); 13 | } 14 | 15 | 16 | // Emphasis & misc 17 | // ------------------------- 18 | 19 | small { font-size: 85%; } 20 | cite { font-style: normal; } 21 | 22 | 23 | // Alignment 24 | // ------------------------- 25 | 26 | .text-left { text-align: left; } 27 | .text-right { text-align: right; } 28 | .text-center { text-align: center; } 29 | 30 | 31 | // Headings 32 | // ------------------------- 33 | 34 | 35 | 36 | // Description Lists 37 | // ------------------------- 38 | 39 | dl { 40 | margin-bottom: $line-height-computed; 41 | } 42 | dt, 43 | dd { 44 | line-height: $line-height-base; 45 | } 46 | dt { 47 | font-weight: bold; 48 | } 49 | 50 | 51 | // Blockquotes 52 | // ------------------------- 53 | 54 | blockquote { 55 | margin: 0 0 $line-height-computed; 56 | padding: ($line-height-computed / 2) $line-height-computed; 57 | border-left: 5px solid gray; 58 | 59 | p { 60 | font-weight: 300; 61 | font-size: ($font-size-base * 1.25); 62 | line-height: 1.25; 63 | } 64 | 65 | p:last-child { 66 | margin-bottom: 0; 67 | } 68 | 69 | small { 70 | display: block; 71 | line-height: $line-height-base; 72 | &:before { 73 | content: '\2014 \00A0';// EM DASH, NBSP; 74 | } 75 | } 76 | } 77 | 78 | 79 | // Quotes 80 | // ------------------------- 81 | 82 | q:before, 83 | q:after, 84 | blockquote:before, 85 | blockquote:after { 86 | content: ""; 87 | } 88 | 89 | 90 | // Addresses 91 | // ------------------------- 92 | 93 | address { 94 | display: block; 95 | margin-bottom: $line-height-computed; 96 | font-style: normal; 97 | line-height: $line-height-base; 98 | } 99 | 100 | 101 | // Links 102 | // ------------------------- 103 | 104 | a.subdued { 105 | padding-right: 10px; 106 | color: #888; 107 | text-decoration: none; 108 | 109 | &:hover { 110 | text-decoration: none; 111 | } 112 | &:last-child { 113 | padding-right: 0; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/ionic.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @import 4 | // Ionicons 5 | "ionicons/ionicons.scss", 6 | 7 | // Variables 8 | "mixins", 9 | "variables", 10 | 11 | // Base 12 | "reset", 13 | "scaffolding", 14 | "type", 15 | 16 | // Components 17 | "action-sheet", 18 | "backdrop", 19 | "bar", 20 | "tabs", 21 | "menu", 22 | "modal", 23 | "popover", 24 | "popup", 25 | "loading", 26 | "items", 27 | "list", 28 | "badge", 29 | "slide-box", 30 | "refresher", 31 | "spinner", 32 | 33 | // Forms 34 | "form", 35 | "checkbox", 36 | "toggle", 37 | "radio", 38 | "range", 39 | "select", 40 | "progress", 41 | 42 | // Buttons 43 | "button", 44 | "button-bar", 45 | 46 | // Util 47 | "grid", 48 | "util", 49 | "platform", 50 | 51 | // Animations 52 | "animations", 53 | "transitions"; 54 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/ionicons/_ionicons-animation.scss: -------------------------------------------------------------------------------- 1 | // Animation Icons 2 | // -------------------------- 3 | 4 | .#{$ionicons-prefix}spin { 5 | -webkit-animation: spin 1s infinite linear; 6 | -moz-animation: spin 1s infinite linear; 7 | -o-animation: spin 1s infinite linear; 8 | animation: spin 1s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @-ms-keyframes spin { 24 | 0% { -ms-transform: rotate(0deg); } 25 | 100% { -ms-transform: rotate(359deg); } 26 | } 27 | @keyframes spin { 28 | 0% { transform: rotate(0deg); } 29 | 100% { transform: rotate(359deg); } 30 | } 31 | 32 | 33 | .#{$ionicons-prefix}loading-a, 34 | .#{$ionicons-prefix}loading-b, 35 | .#{$ionicons-prefix}loading-c, 36 | .#{$ionicons-prefix}loading-d, 37 | .#{$ionicons-prefix}looping, 38 | .#{$ionicons-prefix}refreshing, 39 | .#{$ionicons-prefix}ios7-reloading { 40 | @extend .ion; 41 | // must spin entire element for android 4.3 and below 42 | @extend .#{$ionicons-prefix}spin; 43 | } 44 | 45 | .#{$ionicons-prefix}loading-a { 46 | -webkit-animation-timing-function: steps(8, start); 47 | -moz-animation-timing-function: steps(8, start); 48 | animation-timing-function: steps(8, start); 49 | } 50 | 51 | .#{$ionicons-prefix}loading-a:before { 52 | @extend .#{$ionicons-prefix}load-a:before; 53 | } 54 | 55 | .#{$ionicons-prefix}loading-b:before { 56 | @extend .#{$ionicons-prefix}load-b:before; 57 | } 58 | 59 | .#{$ionicons-prefix}loading-c:before { 60 | @extend .#{$ionicons-prefix}load-c:before; 61 | } 62 | 63 | .#{$ionicons-prefix}loading-d:before { 64 | @extend .#{$ionicons-prefix}load-d:before; 65 | } 66 | 67 | .#{$ionicons-prefix}looping:before { 68 | @extend .#{$ionicons-prefix}loop:before; 69 | } 70 | 71 | .#{$ionicons-prefix}refreshing:before { 72 | @extend .#{$ionicons-prefix}refresh:before; 73 | } 74 | 75 | .#{$ionicons-prefix}ios7-reloading:before { 76 | @extend .#{$ionicons-prefix}ios7-reload:before; 77 | } 78 | -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/ionicons/_ionicons-font.scss: -------------------------------------------------------------------------------- 1 | // Ionicons Font Path 2 | // -------------------------- 3 | 4 | @font-face { 5 | font-family: $ionicons-font-family; 6 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}"); 7 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix") format("embedded-opentype"), 8 | url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"), 9 | url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"), 10 | url("#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons") format("svg"); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | 15 | .ion { 16 | display: inline-block; 17 | font-family: $ionicons-font-family; 18 | speak: none; 19 | font-style: normal; 20 | font-weight: normal; 21 | font-variant: normal; 22 | text-transform: none; 23 | text-rendering: auto; 24 | line-height: 1; 25 | -webkit-font-smoothing: antialiased; 26 | -moz-osx-font-smoothing: grayscale; 27 | } -------------------------------------------------------------------------------- /app/templates/app/styles/ionic/ionicons/ionicons.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | @import "ionicons-variables"; 3 | /*! 4 | Ionicons, v2.0.1 5 | Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ 6 | https://twitter.com/benjsperry https://twitter.com/ionicframework 7 | MIT License: https://github.com/driftyco/ionicons 8 | 9 | Android-style icons originally built by Google’s 10 | Material Design Icons: https://github.com/google/material-design-icons 11 | used under CC BY http://creativecommons.org/licenses/by/4.0/ 12 | Modified icons to fit ionicon’s grid from original. 13 | */ 14 | 15 | @import "ionicons-font"; 16 | @import "ionicons-icons"; 17 | -------------------------------------------------------------------------------- /app/templates/app/styles/menu/menu.scss: -------------------------------------------------------------------------------- 1 | // Menu 2 | -------------------------------------------------------------------------------- /app/templates/app/styles/views/_home.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | /*noinspection CssInvalidCharsetRule*/ 28 | @charset 'UTF-8'; 29 | // Home 30 | -------------------------------------------------------------------------------- /app/templates/app/templates/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

Side Menu

24 | 25 |
26 | 27 | 28 | 50 | 51 |
52 | 53 |
54 | -------------------------------------------------------------------------------- /app/templates/app/templates/views/edit-product.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
  • 6 | 7 |
  • 8 | 9 | Update 10 | 11 |
    12 |
    13 |
    14 |
    15 | -------------------------------------------------------------------------------- /app/templates/app/templates/views/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /app/templates/app/templates/views/products.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 |

    {{item.title}}

    13 |

    Product ID is {{item.objectId}}

    14 |

    {{item.content}}

    15 | 17 | Edit 18 | 19 | 20 |
    21 |
    22 |
    23 |
    24 | -------------------------------------------------------------------------------- /app/templates/app/templates/views/session.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 5 | 6 |
    7 |
    8 |
    9 | -------------------------------------------------------------------------------- /app/templates/app/templates/views/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /app/templates/app/templates/views/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 |
    5 | 8 |
    9 |
    Your email address will be your username.
    10 |
    Your email address is too short...
    11 |
    Your email address is too long...
    12 |
    You did not enter your email address correctly...
    13 |
    14 | 15 | 18 |
    19 |
    Please enter your password.
    20 |
    Your password is too short...
    21 |
    Your password is too long...
    22 |
    You did not enter your password correctly...
    23 |
    24 | 25 | 28 |
    29 |
    Please enter your first name.
    30 |
    31 | 32 | 35 |
    36 |
    Please enter your last name.
    37 |
    38 |
    39 |
    40 | 41 |
    42 |
    43 |

    {{ 'APP_SIGNUP_CONTENT_SIGNIN' | translate }} {{ 'APP_SIGNUP_CTA_SIGNIN' | translate }}

    44 |
    45 |
    46 |
    47 |
    48 | -------------------------------------------------------------------------------- /app/templates/bower.rc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "www/lib" 3 | } 4 | -------------------------------------------------------------------------------- /app/templates/editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /app/templates/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/favicon.ico -------------------------------------------------------------------------------- /app/templates/gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | node_modules/ 5 | platforms/ 6 | plugins/ 7 | bower_components/ 8 | 9 | .tmp/ 10 | www/ 11 | .sass-cache 12 | *.DS_Store 13 | *.log 14 | -------------------------------------------------------------------------------- /app/templates/gulp/clean.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var path = require('path'); 32 | var del = require('del'); 33 | /** 34 | * Parse arguments 35 | */ 36 | var args = require('yargs') 37 | .alias('e', 'emulate') 38 | .alias('b', 'build') 39 | .alias('r', 'run') 40 | // remove all debug messages (console.logs, alerts etc) from release build 41 | .alias('release', 'strip-debug') 42 | .default('build', false) 43 | .default('port', 9000) 44 | .default('strip-debug', false) 45 | .argv; 46 | var build = !!(args.build || args.emulate || args.run); 47 | var emulate = args.emulate; 48 | var run = args.run; 49 | var port = args.port; 50 | var stripDebug = !!args.stripDebug; 51 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 52 | 53 | 54 | /** 55 | * clean target dir 56 | */ 57 | gulp.task('clean', function (done) { 58 | del([targetDir], done); 59 | }); 60 | 61 | }()); 62 | -------------------------------------------------------------------------------- /app/templates/gulp/default.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var beep = require('beepbeep'); 34 | var gutil = require('gulp-util'); 35 | var ascii = require('../ascii.js'); 36 | var runSequence = require('run-sequence'); 37 | /** 38 | * Parse arguments 39 | */ 40 | var args = require('yargs') 41 | .alias('e', 'emulate') 42 | .alias('b', 'build') 43 | .alias('r', 'run') 44 | // remove all debug messages (console.logs, alerts etc) from release build 45 | .alias('release', 'strip-debug') 46 | .default('build', false) 47 | .default('port', 9000) 48 | .default('strip-debug', false) 49 | .argv; 50 | var build = !!(args.build || args.emulate || args.run); 51 | var emulate = args.emulate; 52 | var run = args.run; 53 | var port = args.port; 54 | var stripDebug = !!args.stripDebug; 55 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 56 | 57 | 58 | // our main sequence, with some conditional jobs depending on params 59 | gulp.task('default', function(done) { 60 | ascii.captain(); 61 | gutil.log(gutil.colors.white('\nCabin crew, doors on automatic, cross-check & report. Thank you.\n')); 62 | ascii.crew(); 63 | gutil.log(gutil.colors.white('\nIn a few moments, we will be passing around the cabin to\noffer you hot or cold drinks. Please, sit back, relax, and\nenjoy the flight.\n')); 64 | ascii.captain(); 65 | gutil.log(gutil.colors.white('\nStarting initializing the Gulp sequence, local time is:\n')); 66 | 67 | runSequence( 68 | 'clean', 69 | 'iconfont', 70 | [ 71 | 'licenses', 72 | 'fonts', 73 | 'templates', 74 | 'styles', 75 | 'favicon', 76 | 'images', 77 | 'vendor', 78 | 'languages' 79 | ], 80 | 'index', 81 | build ? 'noop' : 'watchers', 82 | build ? 'noop' : 'serve', 83 | emulate ? ['ionic:emulate', 'watchers'] : 'noop', 84 | run ? 'ionic:run' : 'noop', 85 | done); 86 | }); 87 | ascii.plane(); 88 | gutil.log(gutil.colors.white('Flight \"<%= appName %>\" is ready for takeoff.')); 89 | 90 | }()); 91 | -------------------------------------------------------------------------------- /app/templates/gulp/favicon.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var path = require('path'); 32 | /** 33 | * Parse arguments 34 | */ 35 | var args = require('yargs') 36 | .alias('e', 'emulate') 37 | .alias('b', 'build') 38 | .alias('r', 'run') 39 | // remove all debug messages (console.logs, alerts etc) from release build 40 | .alias('release', 'strip-debug') 41 | .default('build', false) 42 | .default('port', 9000) 43 | .default('strip-debug', false) 44 | .argv; 45 | var build = !!(args.build || args.emulate || args.run); 46 | var emulate = args.emulate; 47 | var run = args.run; 48 | var port = args.port; 49 | var stripDebug = !!args.stripDebug; 50 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 51 | 52 | // global error handler 53 | var errorHandler = function (error) { 54 | if (build) { 55 | throw error; 56 | } else { 57 | beep(2, 170); 58 | plugins.util.log(error); 59 | } 60 | }; 61 | 62 | // copy favicon 63 | gulp.task('favicon', function () { 64 | return gulp.src('app/favicon.ico') 65 | .pipe(gulp.dest(path.join(targetDir))) 66 | .on('error', errorHandler); 67 | }); 68 | 69 | }()); 70 | -------------------------------------------------------------------------------- /app/templates/gulp/fonts.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var path = require('path'); 32 | /** 33 | * Parse arguments 34 | */ 35 | var args = require('yargs') 36 | .alias('e', 'emulate') 37 | .alias('b', 'build') 38 | .alias('r', 'run') 39 | // remove all debug messages (console.logs, alerts etc) from release build 40 | .alias('release', 'strip-debug') 41 | .default('build', false) 42 | .default('port', 9000) 43 | .default('strip-debug', false) 44 | .argv; 45 | var build = !!(args.build || args.emulate || args.run); 46 | var emulate = args.emulate; 47 | var run = args.run; 48 | var port = args.port; 49 | var stripDebug = !!args.stripDebug; 50 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 51 | 52 | // global error handler 53 | var errorHandler = function (error) { 54 | if (build) { 55 | throw error; 56 | } else { 57 | beep(2, 170); 58 | plugins.util.log(error); 59 | } 60 | }; 61 | 62 | // copy fonts 63 | gulp.task('fonts', function () { 64 | return gulp 65 | .src(['app/fonts/**/*.*', 'bower_components/ionic/fonts/*.*']) 66 | .pipe(gulp.dest(path.join(targetDir, 'fonts'))) 67 | .on('error', errorHandler); 68 | }); 69 | 70 | 71 | }()); 72 | -------------------------------------------------------------------------------- /app/templates/gulp/help.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | 33 | /** 34 | * List the available gulp tasks 35 | */ 36 | gulp.task('help', plugins.taskListing); 37 | // gulp.task('default', ['help']); 38 | 39 | }()); 40 | -------------------------------------------------------------------------------- /app/templates/gulp/iconfont.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var iconfont = require('gulp-iconfont'); 32 | var consolidate = require('gulp-consolidate'); 33 | var plugins = require('gulp-load-plugins')({lazy: true}); 34 | var path = require('path'); 35 | var rename = require('gulp-rename'); 36 | /** 37 | * Parse arguments 38 | */ 39 | var args = require('yargs') 40 | .alias('e', 'emulate') 41 | .alias('b', 'build') 42 | .alias('r', 'run') 43 | // remove all debug messages (console.logs, alerts etc) from release build 44 | .alias('release', 'strip-debug') 45 | .default('build', false) 46 | .default('port', 9000) 47 | .default('strip-debug', false) 48 | .argv; 49 | var build = !!(args.build || args.emulate || args.run); 50 | var emulate = args.emulate; 51 | var run = args.run; 52 | var port = args.port; 53 | var stripDebug = !!args.stripDebug; 54 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 55 | 56 | // global error handler 57 | var errorHandler = function (error) { 58 | if (build) { 59 | throw error; 60 | } else { 61 | beep(2, 170); 62 | plugins.util.log(error); 63 | } 64 | }; 65 | 66 | var fontName = 'avionic-iconfont'; // Name of the symbol font 67 | var fontPath = '../fonts/'; 68 | 69 | // generate iconfont 70 | gulp.task('iconfont', function () { 71 | return gulp.src('app/images/icons/*.svg', { 72 | buffer: false 73 | }) 74 | .pipe(plugins.iconfontCss({ 75 | fontName: fontName, 76 | path: 'app/styles/_avionic.scss', 77 | targetPath: '../styles/_avionic.scss', 78 | fontPath: '../fonts/' 79 | })) 80 | .pipe(plugins.iconfont({ 81 | fontName: fontName, 82 | appendUnicode: true, 83 | centerHorizontally: true, 84 | normalize: true 85 | })) 86 | .pipe(gulp.dest(path.join(targetDir, 'fonts'))) 87 | .on('error', errorHandler); 88 | }); 89 | 90 | }()); 91 | -------------------------------------------------------------------------------- /app/templates/gulp/images.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var path = require('path'); 32 | var imagemin = require('gulp-imagemin'); 33 | var pngquant = require('imagemin-pngquant'); 34 | /** 35 | * Parse arguments 36 | */ 37 | var args = require('yargs') 38 | .alias('e', 'emulate') 39 | .alias('b', 'build') 40 | .alias('r', 'run') 41 | // remove all debug messages (console.logs, alerts etc) from release build 42 | .alias('release', 'strip-debug') 43 | .default('build', false) 44 | .default('port', 9000) 45 | .default('strip-debug', false) 46 | .argv; 47 | var build = !!(args.build || args.emulate || args.run); 48 | var emulate = args.emulate; 49 | var run = args.run; 50 | var port = args.port; 51 | var stripDebug = !!args.stripDebug; 52 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 53 | 54 | // global error handler 55 | var errorHandler = function (error) { 56 | if (build) { 57 | throw error; 58 | } else { 59 | beep(2, 170); 60 | plugins.util.log(error); 61 | } 62 | }; 63 | 64 | // copy images 65 | gulp.task('images', function () { 66 | return gulp.src('app/images/**/*.*') 67 | .pipe(imagemin({ 68 | optimizationLevel: 4, 69 | progressive: true, 70 | multipass: true, 71 | svgoPlugins: [{ removeViewBox: false, removeUselessStrokeAndFill: false, removeEmptyAttrs: false }], 72 | use: [pngquant()] 73 | })) 74 | .pipe(gulp.dest(path.join(targetDir, 'images'))) 75 | .on('error', errorHandler); 76 | }); 77 | 78 | }()); 79 | -------------------------------------------------------------------------------- /app/templates/gulp/jshint.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var beep = require('beepbeep'); 34 | var stylish = require('jshint-stylish'); 35 | 36 | /** 37 | * Parse arguments 38 | */ 39 | var args = require('yargs') 40 | .alias('e', 'emulate') 41 | .alias('b', 'build') 42 | .alias('r', 'run') 43 | // remove all debug messages (console.logs, alerts etc) from release build 44 | .alias('release', 'strip-debug') 45 | .default('build', false) 46 | .default('port', 9000) 47 | .default('strip-debug', false) 48 | .argv; 49 | var build = !!(args.build || args.emulate || args.run); 50 | var emulate = args.emulate; 51 | var run = args.run; 52 | var port = args.port; 53 | var stripDebug = !!args.stripDebug; 54 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 55 | 56 | // global error handler 57 | var errorHandler = function (error) { 58 | if (build) { 59 | throw error; 60 | } else { 61 | beep(2, 170); 62 | plugins.util.log(error); 63 | } 64 | }; 65 | 66 | // lint js sources based on .jshintrc ruleset 67 | gulp.task('jshint', function () { 68 | return gulp 69 | .src('app/scripts/**/*.js') 70 | .pipe(plugins.jshint()) 71 | .pipe(plugins.jshint.reporter(stylish)) 72 | .on('error', errorHandler); 73 | }); 74 | 75 | 76 | }()); 77 | -------------------------------------------------------------------------------- /app/templates/gulp/karma.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var karma = require('karma').server; 34 | /** 35 | * Parse arguments 36 | */ 37 | var args = require('yargs') 38 | .alias('e', 'emulate') 39 | .alias('b', 'build') 40 | .alias('r', 'run') 41 | // remove all debug messages (console.logs, alerts etc) from release build 42 | .alias('release', 'strip-debug') 43 | .default('build', false) 44 | .default('port', 9000) 45 | .default('strip-debug', false) 46 | .argv; 47 | var build = !!(args.build || args.emulate || args.run); 48 | var emulate = args.emulate; 49 | var run = args.run; 50 | var port = args.port; 51 | var stripDebug = !!args.stripDebug; 52 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 53 | 54 | var testFiles =[ 55 | 'app/scripts/**/*.js' 56 | ]; 57 | 58 | // global error handler 59 | var errorHandler = function (error) { 60 | if (build) { 61 | throw error; 62 | } else { 63 | /*beep(2, 170);*/ 64 | plugins.util.log(error); 65 | } 66 | }; 67 | 68 | gulp.task('test', function (done) { 69 | karma.start({ 70 | configFile: __dirname + '/../karma.conf.js', 71 | singleRun: true 72 | }, done); 73 | }); 74 | 75 | }()); 76 | -------------------------------------------------------------------------------- /app/templates/gulp/languages.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var beep = require('beepbeep'); 34 | /** 35 | * Parse arguments 36 | */ 37 | var args = require('yargs') 38 | .alias('e', 'emulate') 39 | .alias('b', 'build') 40 | .alias('r', 'run') 41 | // remove all debug messages (console.logs, alerts etc) from release build 42 | .alias('release', 'strip-debug') 43 | .default('build', false) 44 | .default('port', 9000) 45 | .default('strip-debug', false) 46 | .argv; 47 | var build = !!(args.build || args.emulate || args.run); 48 | var emulate = args.emulate; 49 | var run = args.run; 50 | var port = args.port; 51 | var stripDebug = !!args.stripDebug; 52 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 53 | 54 | // global error handler 55 | var errorHandler = function (error) { 56 | if (build) { 57 | throw error; 58 | } else { 59 | beep(2, 170); 60 | plugins.util.log(error); 61 | } 62 | }; 63 | 64 | // languages sources 65 | gulp.task('languages', function () { 66 | return gulp.src('app/languages/*.*') 67 | .pipe(gulp.dest(path.join(targetDir, 'languages'))) 68 | // .pipe(plugins.if(build, plugins.uglify())) 69 | // .pipe(plugins.if(build, plugins.rev())) 70 | .on('error', errorHandler); 71 | }); 72 | 73 | 74 | 75 | }()); 76 | -------------------------------------------------------------------------------- /app/templates/gulp/licenses.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var path = require('path'); 32 | /** 33 | * Parse arguments 34 | */ 35 | var args = require('yargs') 36 | .alias('e', 'emulate') 37 | .alias('b', 'build') 38 | .alias('r', 'run') 39 | // remove all debug messages (console.logs, alerts etc) from release build 40 | .alias('release', 'strip-debug') 41 | .default('build', false) 42 | .default('port', 9000) 43 | .default('strip-debug', false) 44 | .argv; 45 | var build = !!(args.build || args.emulate || args.run); 46 | var emulate = args.emulate; 47 | var run = args.run; 48 | var port = args.port; 49 | var stripDebug = !!args.stripDebug; 50 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 51 | 52 | // global error handler 53 | var errorHandler = function (error) { 54 | if (build) { 55 | throw error; 56 | } else { 57 | beep(2, 170); 58 | plugins.util.log(error); 59 | } 60 | }; 61 | 62 | // copy licenses 63 | gulp.task('licenses', function () { 64 | return gulp 65 | .src(['LICENSE', 'README.md','CONTRIBUTING.md']) 66 | .pipe(gulp.dest(path.join(targetDir))) 67 | .on('error', errorHandler); 68 | }); 69 | 70 | }()); 71 | -------------------------------------------------------------------------------- /app/templates/gulp/noop.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | 32 | // no-op = empty function 33 | gulp.task('noop', function () {}); 34 | 35 | }()); 36 | -------------------------------------------------------------------------------- /app/templates/gulp/plugins.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var exec = require('child_process').exec; 33 | var path = require('path'); 34 | var beep = require('beepbeep'); 35 | /** 36 | * Parse arguments 37 | */ 38 | var args = require('yargs') 39 | .alias('e', 'emulate') 40 | .alias('b', 'build') 41 | .alias('r', 'run') 42 | // remove all debug messages (console.logs, alerts etc) from release build 43 | .alias('release', 'strip-debug') 44 | .default('build', false) 45 | .default('port', 9000) 46 | .default('strip-debug', false) 47 | .argv; 48 | var build = !!(args.build || args.emulate || args.run); 49 | var emulate = args.emulate; 50 | var run = args.run; 51 | var port = args.port; 52 | var stripDebug = !!args.stripDebug; 53 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 54 | 55 | // global error handler 56 | var errorHandler = function (error) { 57 | if (build) { 58 | throw error; 59 | } else { 60 | beep(2, 170); 61 | plugins.util.log(error); 62 | } 63 | }; 64 | 65 | gulp.task('cordova-plugin-install', function() { 66 | require('../plugins.json').forEach(function(plugin) { 67 | exec('cordova plugin add ' + plugin, {async: false}, function(code, output) { 68 | console.log(output); 69 | }); 70 | }); 71 | }); 72 | 73 | }()); 74 | -------------------------------------------------------------------------------- /app/templates/gulp/ripple.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var beep = require('beepbeep'); 34 | var ripple = require('ripple-emulator'); 35 | /** 36 | * Parse arguments 37 | */ 38 | var args = require('yargs') 39 | .alias('e', 'emulate') 40 | .alias('b', 'build') 41 | .alias('r', 'run') 42 | // remove all debug messages (console.logs, alerts etc) from release build 43 | .alias('release', 'strip-debug') 44 | .default('build', false) 45 | .default('port', 9000) 46 | .default('strip-debug', false) 47 | .argv; 48 | var build = !!(args.build || args.emulate || args.run); 49 | var emulate = args.emulate; 50 | var run = args.run; 51 | var port = args.port; 52 | var stripDebug = !!args.stripDebug; 53 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 54 | 55 | 56 | // ripple emulator 57 | gulp.task('ripple', ['scripts', 'styles', 'watchers'], function () { 58 | 59 | var options = { 60 | keepAlive: false, 61 | open: true, 62 | port: 4400 63 | }; 64 | 65 | // Start the ripple server 66 | ripple.emulate.start(options); 67 | 68 | open('http://localhost:' + options.port + '?enableripple=true'); 69 | }); 70 | 71 | }()); 72 | -------------------------------------------------------------------------------- /app/templates/gulp/select.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var beep = require('beepbeep'); 34 | /** 35 | * Parse arguments 36 | */ 37 | var args = require('yargs') 38 | .alias('e', 'emulate') 39 | .alias('b', 'build') 40 | .alias('r', 'run') 41 | // remove all debug messages (console.logs, alerts etc) from release build 42 | .alias('release', 'strip-debug') 43 | .default('build', false) 44 | .default('port', 9000) 45 | .default('strip-debug', false) 46 | .argv; 47 | var build = !!(args.build || args.emulate || args.run); 48 | var emulate = args.emulate; 49 | var run = args.run; 50 | var port = args.port; 51 | var stripDebug = !!args.stripDebug; 52 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 53 | 54 | 55 | // select emulator device 56 | gulp.task('select', plugins.shell.task([ 57 | '../helpers/emulateios' 58 | ])); 59 | 60 | }()); 61 | -------------------------------------------------------------------------------- /app/templates/gulp/serve.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var express = require('express'); 34 | var livereload = require('connect-livereload'); 35 | var gutil = require('gulp-util'); 36 | var ascii = require('../ascii.js'); 37 | var open = require('open'); 38 | var beep = require('beepbeep'); 39 | var appName = '<%= appName %>'; 40 | /** 41 | * Parse arguments 42 | */ 43 | var args = require('yargs') 44 | .alias('e', 'emulate') 45 | .alias('b', 'build') 46 | .alias('r', 'run') 47 | // remove all debug messages (console.logs, alerts etc) from release build 48 | .alias('release', 'strip-debug') 49 | .default('build', false) 50 | .default('port', 9000) 51 | .default('strip-debug', false) 52 | .argv; 53 | var build = !!(args.build || args.emulate || args.run); 54 | var emulate = args.emulate; 55 | var run = args.run; 56 | var port = args.port; 57 | var stripDebug = !!args.stripDebug; 58 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 59 | 60 | // global error handler 61 | var errorHandler = function (error) { 62 | if (build) { 63 | throw error; 64 | } else { 65 | beep(2, 170); 66 | plugins.util.log(error); 67 | } 68 | }; 69 | 70 | // start local express server 71 | gulp.task('serve', function () { 72 | express() 73 | .use(!build ? livereload() : function () {}) 74 | .use(express.static(targetDir)) 75 | .listen(port); 76 | open('http://localhost:' + port + '/'); 77 | ascii.captain(); 78 | gutil.log(gutil.colors.white.bold('<%= appName %> is cleared to takeoff!\n')); 79 | ascii.crew(); 80 | gutil.log(gutil.colors.white.bold('\nAll right, it\’s time for final cabin check. For additional safety\ninformation, check out our website http://avionic.io.\nEnjoy your flight, and as always thank you for flying Avionic.\n')); 81 | ascii.plane(); 82 | gutil.log(gutil.colors.white.bold('Goodbye.')); 83 | }); 84 | 85 | 86 | }()); 87 | -------------------------------------------------------------------------------- /app/templates/gulp/styles.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var streamqueue = require('streamqueue'); 33 | var minifyCss = require('gulp-clean-css'); 34 | var replace = require('gulp-replace'); 35 | var path = require('path'); 36 | /** 37 | * Parse arguments 38 | */ 39 | var args = require('yargs') 40 | .alias('e', 'emulate') 41 | .alias('b', 'build') 42 | .alias('r', 'run') 43 | // remove all debug messages (console.logs, alerts etc) from release build 44 | .alias('release', 'strip-debug') 45 | .default('build', false) 46 | .default('port', 9000) 47 | .default('strip-debug', false) 48 | .argv; 49 | var build = !!(args.build || args.emulate || args.run); 50 | var emulate = args.emulate; 51 | var run = args.run; 52 | var port = args.port; 53 | var stripDebug = !!args.stripDebug; 54 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 55 | 56 | // global error handler 57 | var errorHandler = function (error) { 58 | if (build) { 59 | throw error; 60 | } else { 61 | beep(2, 170); 62 | plugins.util.log(error); 63 | } 64 | }; 65 | 66 | 67 | // precompile .scss and concat with ionic.css 68 | gulp.task('styles', function () { 69 | 70 | var options = build ? { style: 'compressed' } : { style: 'expanded' }; 71 | var sassStream = plugins.rubySass('app/styles/main.scss', options) 72 | .pipe(plugins.autoprefixer('last 1 Chrome version', 'last 3 iOS versions', 'last 3 Android versions')); 73 | 74 | var cssStream = gulp.src(targetDir+'/styles/_avionic.scss'); 75 | // console.log(targetDir+'/styles/avionic.css'); 76 | return streamqueue({ objectMode: true }, cssStream, sassStream) 77 | .pipe(plugins.concat('main.css')) 78 | .pipe(replace('/*!', '/*')) 79 | .pipe(plugins.if(build, plugins.stripCssComments())) 80 | .pipe(plugins.if(build, minifyCss())) 81 | .pipe(plugins.if(build && !emulate, plugins.rev())) 82 | .pipe(gulp.dest(path.join(targetDir, 'styles'))) 83 | .on('error', errorHandler); 84 | }); 85 | 86 | 87 | }()); 88 | -------------------------------------------------------------------------------- /app/templates/gulp/templates.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var path = require('path'); 32 | /** 33 | * Parse arguments 34 | */ 35 | var args = require('yargs') 36 | .alias('e', 'emulate') 37 | .alias('b', 'build') 38 | .alias('r', 'run') 39 | // remove all debug messages (console.logs, alerts etc) from release build 40 | .alias('release', 'strip-debug') 41 | .default('build', false) 42 | .default('port', 9000) 43 | .default('strip-debug', false) 44 | .argv; 45 | var build = !!(args.build || args.emulate || args.run); 46 | var emulate = args.emulate; 47 | var run = args.run; 48 | var port = args.port; 49 | var stripDebug = !!args.stripDebug; 50 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 51 | 52 | // global error handler 53 | var errorHandler = function (error) { 54 | if (build) { 55 | throw error; 56 | } else { 57 | beep(2, 170); 58 | plugins.util.log(error); 59 | } 60 | }; 61 | 62 | // copy templates 63 | gulp.task('templates', function () { 64 | return gulp.src('app/templates/**/*.*') 65 | .pipe(gulp.dest(path.join(targetDir, 'templates'))) 66 | .on('error', errorHandler); 67 | }); 68 | 69 | }()); 70 | -------------------------------------------------------------------------------- /app/templates/gulp/vendor.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var path = require('path'); 33 | var beep = require('beepbeep'); 34 | /** 35 | * Parse arguments 36 | */ 37 | var args = require('yargs') 38 | .alias('e', 'emulate') 39 | .alias('b', 'build') 40 | .alias('r', 'run') 41 | // remove all debug messages (console.logs, alerts etc) from release build 42 | .alias('release', 'strip-debug') 43 | .default('build', false) 44 | .default('port', 9000) 45 | .default('strip-debug', false) 46 | .argv; 47 | var build = !!(args.build || args.emulate || args.run); 48 | var emulate = args.emulate; 49 | var run = args.run; 50 | var port = args.port; 51 | var stripDebug = !!args.stripDebug; 52 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 53 | 54 | // global error handler 55 | var errorHandler = function (error) { 56 | if (build) { 57 | throw error; 58 | } else { 59 | beep(2, 170); 60 | plugins.util.log(error); 61 | } 62 | }; 63 | 64 | // concatenate and minify vendor sources 65 | gulp.task('vendor', function () { 66 | var vendorFiles = require('../vendor.json'); 67 | return gulp.src(vendorFiles) 68 | .pipe(plugins.concat('vendor.js')) 69 | .pipe(plugins.if(build, plugins.uglify())) 70 | .pipe(plugins.if(build, plugins.rev())) 71 | .pipe(gulp.dest(targetDir)) 72 | .on('error', errorHandler); 73 | }); 74 | 75 | 76 | }()); 77 | -------------------------------------------------------------------------------- /app/templates/gulp/watchers.task.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | var gulp = require('gulp'); 31 | var plugins = require('gulp-load-plugins')({lazy: true}); 32 | var livereload = require('connect-livereload'); 33 | var path = require('path'); 34 | var beep = require('beepbeep'); 35 | /** 36 | * Parse arguments 37 | */ 38 | var args = require('yargs') 39 | .alias('e', 'emulate') 40 | .alias('b', 'build') 41 | .alias('r', 'run') 42 | // remove all debug messages (console.logs, alerts etc) from release build 43 | .alias('release', 'strip-debug') 44 | .default('build', false) 45 | .default('port', 9000) 46 | .default('strip-debug', false) 47 | .argv; 48 | var build = !!(args.build || args.emulate || args.run); 49 | var emulate = args.emulate; 50 | var run = args.run; 51 | var port = args.port; 52 | var stripDebug = !!args.stripDebug; 53 | var targetDir = path.resolve(build ? 'www' : '.tmp'); 54 | 55 | // global error handler 56 | var errorHandler = function (error) { 57 | if (build) { 58 | throw error; 59 | } else { 60 | beep(2, 170); 61 | plugins.util.log(error); 62 | } 63 | }; 64 | 65 | // start watchers 66 | gulp.task('watchers', function () { 67 | plugins.livereload.listen(); 68 | gulp.watch('app/styles/**/*.scss', ['styles']); 69 | gulp.watch('app/fonts/**', ['fonts']); 70 | gulp.watch('app/icons/**', ['iconfont']); 71 | gulp.watch('app/images/**', ['images']); 72 | gulp.watch('app/favicon.ico', ['favicon']); 73 | gulp.watch('app/scripts/**/*.js', ['index']); 74 | gulp.watch('./vendor.json', ['vendor']); 75 | gulp.watch('app/languages/*.json', ['languages']); 76 | gulp.watch('app/LICENSE', ['licenses']); 77 | gulp.watch('app/*.md', ['licenses']); 78 | gulp.watch('app/templates/**/*.html', ['index']); 79 | gulp.watch('app/index.html', ['index']); 80 | gulp.watch(targetDir + '/**') 81 | .on('change', plugins.livereload.changed) 82 | .on('error', errorHandler); 83 | }); 84 | 85 | }()); 86 | -------------------------------------------------------------------------------- /app/templates/helpers/emulateios: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DEVICES=`ios-sim showdevicetypes 2>&1` 3 | export DEVICES=\"`echo $DEVICES | sed -e 's/ com./" "com./g' | sed -e 's/, /,~/g'`\" 4 | PS3='Please enter your choice: ' 5 | options=($DEVICES) 6 | curpath="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")" 7 | app="`find $curpath/platforms/ios/build/emulator -name *.app -print`" 8 | escaped_app="\"$app\"" 9 | 10 | echo $app 11 | select opt in "${options[@]}" 12 | do 13 | case $opt in 14 | *) echo ios-sim launch "$escaped_app" --devicetypeid "`echo $opt | sed -e "s/~/ /g"`" --stderr ./platforms/ios/cordova/console.log --stdout ./platforms/ios/cordova/console.log > tmp.run.file;chmod +x tmp.run.file;./tmp.run.file;rm tmp.run.file;exit; 15 | esac 16 | done 17 | -------------------------------------------------------------------------------- /app/templates/hooks/README.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | This directory may contain scripts used to customize cordova commands. This 24 | directory used to exist at `.cordova/hooks`, but has now been moved to the 25 | project root. Any scripts you add to these directories will be executed before 26 | and after the commands corresponding to the directory name. Useful for 27 | integrating your own build systems or integrating with version control systems. 28 | 29 | __Remember__: Make your scripts executable. 30 | 31 | ## Hook Directories 32 | The following subdirectories will be used for hooks: 33 | 34 | after_build/ 35 | after_compile/ 36 | after_docs/ 37 | after_emulate/ 38 | after_platform_add/ 39 | after_platform_rm/ 40 | after_platform_ls/ 41 | after_plugin_add/ 42 | after_plugin_ls/ 43 | after_plugin_rm/ 44 | after_plugin_search/ 45 | after_prepare/ 46 | after_run/ 47 | after_serve/ 48 | before_build/ 49 | before_compile/ 50 | before_docs/ 51 | before_emulate/ 52 | before_platform_add/ 53 | before_platform_rm/ 54 | before_platform_ls/ 55 | before_plugin_add/ 56 | before_plugin_ls/ 57 | before_plugin_rm/ 58 | before_plugin_search/ 59 | before_prepare/ 60 | before_run/ 61 | before_serve/ 62 | pre_package/ <-- Windows 8 and Windows Phone only. 63 | 64 | ## Script Interface 65 | 66 | All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables: 67 | 68 | * CORDOVA_VERSION - The version of the Cordova-CLI. 69 | * CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios). 70 | * CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer) 71 | * CORDOVA_HOOK - Path to the hook that is being executed. 72 | * CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate) 73 | 74 | If a script returns a non-zero exit code, then the parent cordova command will be aborted. 75 | 76 | 77 | ## Writing hooks 78 | 79 | We highly recommend writting your hooks using Node.js so that they are 80 | cross-platform. Some good examples are shown here: 81 | 82 | [http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) 83 | 84 | -------------------------------------------------------------------------------- /app/templates/hooks/after_prepare/010_add_platform_class.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Add Platform Class 4 | // v1.0 5 | // Automatically adds the platform class to the body tag 6 | // after the `prepare` command. By placing the platform CSS classes 7 | // directly in the HTML built for the platform, it speeds up 8 | // rendering the correct layout/style for the specific platform 9 | // instead of waiting for the JS to figure out the correct classes. 10 | 11 | var fs = require('fs'); 12 | var path = require('path'); 13 | 14 | var rootdir = process.argv[2]; 15 | 16 | function addPlatformBodyTag(indexPath, platform) { 17 | // add the platform class to the body tag 18 | try { 19 | var platformClass = 'platform-' + platform; 20 | var cordovaClass = 'platform-cordova platform-webview'; 21 | 22 | var html = fs.readFileSync(indexPath, 'utf8'); 23 | 24 | var bodyTag = findBodyTag(html); 25 | if(!bodyTag) return; // no opening body tag, something's wrong 26 | 27 | if(bodyTag.indexOf(platformClass) > -1) return; // already added 28 | 29 | var newBodyTag = bodyTag; 30 | 31 | var classAttr = findClassAttr(bodyTag); 32 | if(classAttr) { 33 | // body tag has existing class attribute, add the classname 34 | var endingQuote = classAttr.substring(classAttr.length-1); 35 | var newClassAttr = classAttr.substring(0, classAttr.length-1); 36 | newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote; 37 | newBodyTag = bodyTag.replace(classAttr, newClassAttr); 38 | 39 | } else { 40 | // add class attribute to the body tag 41 | newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">'); 42 | } 43 | 44 | html = html.replace(bodyTag, newBodyTag); 45 | 46 | fs.writeFileSync(indexPath, html, 'utf8'); 47 | 48 | process.stdout.write('add to body class: ' + platformClass + '\n'); 49 | } catch(e) { 50 | process.stdout.write(e); 51 | } 52 | } 53 | 54 | function findBodyTag(html) { 55 | // get the body tag 56 | try{ 57 | return html.match(/])(.*?)>/gi)[0]; 58 | }catch(e){} 59 | } 60 | 61 | function findClassAttr(bodyTag) { 62 | // get the body tag's class attribute 63 | try{ 64 | return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0]; 65 | }catch(e){} 66 | } 67 | 68 | if (rootdir) { 69 | 70 | // go through each of the platform directories that have been prepared 71 | var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []); 72 | 73 | for(var x=0; x 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <%= ngModulName %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/templates/jscsrc: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "excludeFiles": ["node_modules/**", "bower_components/**"], 4 | 5 | "requireCurlyBraces": [ 6 | "if", 7 | "else", 8 | "for", 9 | "while", 10 | "do", 11 | "try", 12 | "catch" 13 | ], 14 | "requireOperatorBeforeLineBreak": true, 15 | "requireCamelCaseOrUpperCaseIdentifiers": true, 16 | "maximumLineLength": { 17 | "value": 100, 18 | "allowComments": true, 19 | "allowRegex": true 20 | }, 21 | "validateIndentation": 4, 22 | "validateQuoteMarks": "'", 23 | 24 | "disallowMultipleLineStrings": true, 25 | "disallowMixedSpacesAndTabs": true, 26 | "disallowTrailingWhitespace": true, 27 | "disallowSpaceAfterPrefixUnaryOperators": true, 28 | "disallowMultipleVarDecl": null, 29 | 30 | "requireSpaceAfterKeywords": [ 31 | "if", 32 | "else", 33 | "for", 34 | "while", 35 | "do", 36 | "switch", 37 | "return", 38 | "try", 39 | "catch" 40 | ], 41 | "requireSpaceBeforeBinaryOperators": [ 42 | "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", 43 | "&=", "|=", "^=", "+=", 44 | 45 | "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", 46 | "|", "^", "&&", "||", "===", "==", ">=", 47 | "<=", "<", ">", "!=", "!==" 48 | ], 49 | "requireSpaceAfterBinaryOperators": true, 50 | "requireSpacesInConditionalExpression": true, 51 | "requireSpaceBeforeBlockStatements": true, 52 | "requireLineFeedAtFileEnd": true, 53 | "disallowSpacesInsideObjectBrackets": "all", 54 | "disallowSpacesInsideArrayBrackets": "all", 55 | "disallowSpacesInsideParentheses": true, 56 | 57 | "validateJSDoc": { 58 | "checkParamNames": true, 59 | "requireParamTypes": true 60 | }, 61 | 62 | "disallowMultipleLineBreaks": true, 63 | 64 | "disallowCommaBeforeLineBreak": null, 65 | "disallowDanglingUnderscores": null, 66 | "disallowEmptyBlocks": null, 67 | "disallowTrailingComma": null, 68 | "requireCommaBeforeLineBreak": null, 69 | "requireDotNotation": null, 70 | "requireMultipleVarDecl": null, 71 | "requireParenthesesAroundIIFE": true 72 | } 73 | -------------------------------------------------------------------------------- /app/templates/jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": false, 11 | "latedef": true, 12 | "newcap": true, 13 | "noarg": true, 14 | "quotmark": "single", 15 | "regexp": true, 16 | "undef": true, 17 | "unused": true, 18 | "strict": true, 19 | "trailing": true, 20 | "smarttabs": true, 21 | "globals": { 22 | "angular": false, 23 | "cordova": false, 24 | "StatusBar": false 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/templates/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Jun 26 2015 07:47:18 GMT+0100 (BST) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | 8 | // Continuous Integration mode 9 | // if true, Karma captures browsers, runs the tests and exits 10 | singleRun: true 11 | }); 12 | }; 13 | -------------------------------------------------------------------------------- /app/templates/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /app/templates/scripts/config/app.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | /** 30 | * @ngdoc constant 31 | * @name <%= ngModulName %>.CONFIG 32 | * @description 33 | * # CONFIG 34 | * Defines the API endpoint where our resources will make requests against. 35 | * Is used inside /services/api.service.js to generate correct endpoint dynamically 36 | */ 37 | 38 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 39 | 40 | // development 41 | <%= ngModulName %>.constant('CONFIG', { 42 | 'host': 'http://localhost', 43 | 'port': 3000, 44 | 'path': '', 45 | 'needsAuth': false 46 | }); 47 | 48 | <%= ngModulName %>.constant('facebookConfig', { 49 | 'FACEBOOK_ID': 'YOUR_FACEBOOK_ID' 50 | }); 51 | 52 | 53 | <%= ngModulName %>.constant('googleConfig', { 54 | 'GOOGLE_ID': 'YOUR_GOOGLE_ID' 55 | }); 56 | 57 | <%= ngModulName %>.constant('twitterConfig', { 58 | 'TWITTER_ID': 'YOUR_TWITTER_ID', 59 | 'TWITTER_SECRET': 'YOUR_TWITTER_SECRET' 60 | }); 61 | 62 | 63 | <%= ngModulName %>.constant('API_CREDENTIALS', { 64 | 'Access-Control-Allow-Origin': '*', 65 | 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS', 66 | 'Access-Control-Allow-Headers':'Cache-Control, Pragma, Origin, Authorization, Content-Type, X-Requested-With', 67 | 'APP_ID': 'YOUR_APP_ID', 68 | 'REST_API_KEY':'YOUR_REST_API_KEY' 69 | }); 70 | 71 | 72 | // live example with HTTP Basic Auth 73 | /* 74 | <%= ngModulName %>.constant('CONFIG', { 75 | host: 'http://yourserver.com', 76 | path: '/api/v2', 77 | needsAuth: true, 78 | username: 'whatever', 79 | password: 'foobar' 80 | }); 81 | */ 82 | 83 | })(); 84 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/editProductController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:EditProductController 32 | * @description 33 | * # EditProductController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('EditProductController', function($scope, $state, $stateParams, ExampleService) { 38 | 39 | console.log($stateParams); 40 | $scope.items={id:$stateParams.id,title:$stateParams.title}; 41 | $scope.edit=function(){ 42 | ExampleService.edit($scope.items.id,{title:$scope.items.title}).success(function(){ 43 | $state.go('app.products'); 44 | }); 45 | }; 46 | }); 47 | })(); 48 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/homeController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:HomeController 32 | * @description 33 | * # HomeController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('HomeController', function($scope, $timeout, ExampleService) { 38 | 39 | $scope.doRefresh = function() { 40 | ExampleService.getAll().success(function(data){ 41 | $scope.items=data.results; 42 | console.log(data.results); 43 | 44 | // close pull to refresh loader 45 | $scope.$broadcast('scroll.refreshComplete'); 46 | }); 47 | 48 | }; 49 | 50 | $scope.doRefresh(); 51 | 52 | $scope.onItemDelete=function(item){ 53 | ExampleService.delete(item.objectId); 54 | $scope.items.splice($scope.items.indexOf(item),1); 55 | }; 56 | }); 57 | })(); 58 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/introController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:IntroController 32 | * @description 33 | * # IntroController 34 | */ 35 | function IntroController($ionicPlatform, $scope, $state, $localstorage, $ionicSlideBoxDelegate, IntroSlideService) { 36 | 37 | // Called to navigate to the main app 38 | $scope.startApp = function () { 39 | $state.go('app.home'); 40 | $localstorage.set('firstTime', 'true'); 41 | }; 42 | 43 | $scope.next = function () { 44 | $ionicSlideBoxDelegate.next(); 45 | }; 46 | 47 | $scope.previous = function () { 48 | $ionicSlideBoxDelegate.previous(); 49 | }; 50 | 51 | $scope.disableSwipe = function() { 52 | $ionicSlideBoxDelegate.enableSlide(false); 53 | }; 54 | 55 | // Called each time the slide changes 56 | $scope.slideChanged = function (index) { 57 | $scope.slideIndex = index; 58 | }; 59 | 60 | $scope.currentSlide = IntroSlideService.index; 61 | 62 | } 63 | 64 | 65 | 66 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 67 | <%= ngModulName %>.factory('IntroSlideService', function () { 68 | var service = {}; 69 | service.index = 0; 70 | return service; 71 | }); 72 | <%= ngModulName %>.controller('IntroController', IntroController); 73 | 74 | IntroController.$inject = ['$ionicPlatform', '$scope', '$state', '$localstorage', '$ionicSlideBoxDelegate', 'IntroSlideService']; 75 | 76 | 77 | 78 | })(); 79 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/loginController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:LoginController 32 | * @description 33 | * # LoginController 34 | */ 35 | function LoginController($ionicPlatform, $scope, $location, $cordovaOauth, $localstorage, AuthService) { 36 | 37 | $scope.user = { 38 | username: '', 39 | password: '' 40 | }; 41 | 42 | $scope.loginUser = function(){ 43 | AuthService.loginUser($scope.user); 44 | }; 45 | 46 | $scope.loginFacebook = function() { 47 | AuthService.loginFacebook(); 48 | }; 49 | 50 | $scope.loginGoogle = function() { 51 | AuthService.loginGoogle(); 52 | }; 53 | 54 | $scope.loginTwitter = function() { 55 | AuthService.loginTwitter(); 56 | }; 57 | } 58 | 59 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 60 | 61 | <%= ngModulName %>.controller('LoginController', LoginController); 62 | 63 | LoginController.$inject = ['$ionicPlatform', '$scope', '$location', '$cordovaOauth', '$localstorage', 'AuthService']; 64 | 65 | })(); 66 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/mainController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:MainController 32 | * @description 33 | * # MainController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('MainController', function() { 38 | 39 | // do something with $scope 40 | 41 | }); 42 | })(); 43 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/newProductController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:NewProductController 32 | * @description 33 | * # NewProductController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('NewProductController', function($scope,$state, ExampleService) { 38 | 39 | $scope.item={}; 40 | 41 | $scope.create=function(){ 42 | ExampleService.create({title:$scope.item.title}).success(function(){ 43 | $state.go('app.products'); 44 | }); 45 | }; 46 | }); 47 | })(); 48 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/productController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:ProductController 32 | * @description 33 | * # ProductController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('ProductController', function($scope, $timeout, $state,$stateParams, ExampleService) { 38 | 39 | $scope.id = $stateParams.id; 40 | console.log('params',$scope.id); 41 | 42 | $scope.doRefresh = function() { 43 | 44 | ExampleService.getAll().success(function(data){ 45 | $scope.items = data.results; 46 | console.log($scope.items); 47 | 48 | // close pull to refresh loader 49 | $scope.$broadcast('scroll.refreshComplete'); 50 | }); 51 | 52 | }; 53 | $scope.doRefresh(); 54 | 55 | $scope.onItemDelete=function(item){ 56 | ExampleService.delete(item.objectId); 57 | $scope.items.splice($scope.items.indexOf(item),1); 58 | $state.go('app.products'); 59 | }; 60 | }); 61 | })(); 62 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/productsController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:ProductsController 32 | * @description 33 | * # ProductsController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('ProductsController', function($scope, $timeout, $state, ExampleService) { 38 | 39 | $scope.doRefresh = function() { 40 | ExampleService.getAll().success(function(data){ 41 | $scope.items=data.results; 42 | 43 | console.log(data.results); 44 | 45 | // close pull to refresh loader 46 | $scope.$broadcast('scroll.refreshComplete'); 47 | }); 48 | 49 | }; 50 | 51 | $scope.doRefresh(); 52 | 53 | $scope.onItemDelete=function(item){ 54 | ExampleService.delete(item.objectId); 55 | console.log(item.objectId); 56 | $scope.items.splice($scope.items.indexOf(item),1); 57 | }; 58 | 59 | $scope.create=function(){ 60 | $state.go('app.new'); 61 | }; 62 | }); 63 | })(); 64 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/settingsController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:SettingsController 32 | * @description 33 | * # SettingsController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('SettingsController', function() { 38 | 39 | // do something with $scope 40 | 41 | }); 42 | })(); 43 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/signupController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:SignUpController 32 | * @description 33 | * # SignUpController 34 | */ 35 | function SignUpController($ionicPlatform, $scope, $location, $cordovaOauth, $localstorage, AuthService) { 36 | 37 | $scope.user = { 38 | username: '', 39 | password: '' 40 | }; 41 | 42 | $scope.signupUser = function(){ 43 | console.log('signing up user ' + $scope.user.username); 44 | AuthService.signupUser($scope.user) 45 | .success(function(data){ 46 | console.log($scope.user.username + 'has been created! session id is ' + data.sessionToken); 47 | // console.log('/session/'+ data.sessionToken); 48 | $localstorage.set('sessionToken', data.sessionToken); 49 | if(data.$valid) { 50 | $location.path('/'+ data.sessionToken); 51 | } 52 | }); 53 | }; 54 | } 55 | 56 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 57 | 58 | <%= ngModulName %>.controller('SignUpController', SignUpController); 59 | 60 | SignUpController.$inject = ['$ionicPlatform', '$scope', '$location', '$cordovaOauth', '$localstorage', 'AuthService']; 61 | 62 | })(); 63 | -------------------------------------------------------------------------------- /app/templates/scripts/controllers/translateController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function() { 28 | 'use strict'; 29 | /** 30 | * @ngdoc function 31 | * @name <%= ngModulName %>.controller:TranslateController 32 | * @description 33 | * # TranslateController 34 | */ 35 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 36 | 37 | <%= ngModulName %>.controller('TranslateController', ['$translate', '$scope', function ($translate, $scope) { 38 | $scope.changeLanguage = function (langKey) { 39 | $translate.use(langKey); 40 | }; 41 | }]); 42 | })(); 43 | -------------------------------------------------------------------------------- /app/templates/scripts/services/api.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | /** 31 | * @ngdoc service 32 | * @name <%= ngModulName %>.ApiService 33 | * @description 34 | * # ApiService 35 | * Retrieves correct api to make requests against. 36 | * Uses settings from CONFIG defined in /config/<%= ngModulName %>.config.js 37 | * 38 | * Usage example: $http({ 39 | * url: ApiService.getEndPoint() + '/things', 40 | * method: 'GET' 41 | * }) 42 | * 43 | */ 44 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 45 | 46 | <%= ngModulName %>.factory('ApiService', function($window, $http, CONFIG) { 47 | 48 | var _api = CONFIG; 49 | var endpoint = _api.port ? (_api.host + ':' + _api.port + _api.path) : (_api.host + _api.path); 50 | 51 | // activate for basic auth 52 | if (_api.needsAuth) { 53 | $http.defaults.headers.common.Authorization = 'Basic ' + $window.btoa(_api.username + ':' + _api.password); 54 | } 55 | 56 | // public api 57 | return { 58 | getEndpoint: function() { return endpoint; } 59 | }; 60 | 61 | }); 62 | })(); 63 | -------------------------------------------------------------------------------- /app/templates/scripts/services/localstorage.service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | /** 31 | * @ngdoc function 32 | * @name <%= ngModulName %>.service:LocalStorageService 33 | * @description 34 | * # LocalStorageService 35 | */ 36 | function $localstorage($window) { 37 | return { 38 | set: function(key, value) { 39 | $window.localStorage[key] = value; 40 | }, 41 | get: function(key, defaultValue) { 42 | return $window.localStorage[key] || defaultValue; 43 | }, 44 | setObject: function(key, value) { 45 | $window.localStorage[key] = JSON.stringify(value); 46 | }, 47 | getObject: function(key) { 48 | return JSON.parse($window.localStorage[key] || '{}'); 49 | } 50 | }; 51 | } 52 | angular 53 | .module('<%= ngModulName %>') 54 | .factory('$localstorage', $localstorage); 55 | 56 | $localstorage.$inject = ['$window']; 57 | 58 | 59 | })(); 60 | -------------------------------------------------------------------------------- /app/templates/scripts/utils/lodash.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict'; 29 | 30 | /** 31 | * @ngdoc function 32 | * @name <%= ngModulName %>.util:lodash 33 | * @description 34 | * # Lo-Dash 35 | * Expose Lo-Dash through injectable factory, so we don't pollute / rely on global namespace 36 | * just inject lodash as _ 37 | */ 38 | 39 | var <%= ngModulName %> = angular.module('<%= ngModulName %>'); 40 | 41 | <%= ngModulName %>.factory('_', function($window) { 42 | return $window._; 43 | }); 44 | 45 | })(); 46 | -------------------------------------------------------------------------------- /app/templates/server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "Server App", 5 | "main": "server.js", 6 | "author": "Reedia Limited", 7 | "license": "MIT", 8 | "dependencies": { 9 | "express": "~4.4.1", 10 | "compression": "^1.1.0", 11 | "body-parser": "~1.3.0", 12 | "method-override": "~2.0.1" 13 | }, 14 | "scripts": { 15 | "start": "node server.js" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/templates/server/readme.md: -------------------------------------------------------------------------------- 1 | # Application Server for Avionic ✈ 2 | -------------------------------------------------------------------------------- /app/templates/server/routes/workouts.js: -------------------------------------------------------------------------------- 1 | var workouts = [ 2 | {id:0 , title:"Introduction to Ionic", youtubeId:"CHRISTOPHE COENRAETS", time:"9:40am", youtubeThumbnail:"Ballroom A", description: "In this session, you'll learn how to build a native-like mobile application using the Ionic Framework, AngularJS, and Cordova."}, 3 | {id:1 , title:"AngularJS in 50 Minutes", youtubeId:"LISA SMITH", time:"10:10am", youtubeThumbnail:"Ballroom B", description: "In this session, you'll learn everything you need to know to start building next-gen JavaScript applications using AngularJS."}, 4 | {id:2 , title:"Contributing to Apache Cordova", youtubeId:"JOHN SMITH", time:"11:10am", youtubeThumbnail:"Ballroom A", description: "In this session, John will tell you all you need to know to start contributing to Apache Cordova and become an Open Source Rock Star."}, 5 | {id:3 , title:"Mobile Performance Techniques", youtubeId:"JESSICA WONG", time:"3:10Pm", youtubeThumbnail:"Ballroom B", description: "In this session, you will learn performance techniques to speed up your mobile application."}, 6 | {id:4 , title:"Building Modular Applications", youtubeId:"LAURA TAYLOR", time:"2:00pm", youtubeThumbnail:"Ballroom A", description: "Join Laura to learn different approaches to build modular JavaScript applications."} 7 | ]; 8 | 9 | exports.findAll = function (req, res, next) { 10 | res.send(workouts); 11 | }; 12 | 13 | exports.findById = function (req, res, next) { 14 | var id = req.params.id; 15 | res.send(workouts[id]); 16 | }; 17 | -------------------------------------------------------------------------------- /app/templates/server/server.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * AVIONIC 4 | * Propelling World-class Cross-platform Hybrid Applications ✈ 5 | * 6 | * Copyright 2015 Reedia Limited. All rights reserved. 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | * 26 | */ 27 | (function () { 28 | 'use strict' 29 | /** 30 | * @ngdoc server 31 | * @name Avionic ✈ Server 32 | * @description 33 | * # Avionic ✈ Server 34 | */ 35 | 36 | // Avionic ✈ Server generates a new instance of an express server. 37 | var express = require('express') 38 | var http = require('http') 39 | var bodyParser = require('body-parser') 40 | var methodOverride = require('method-override') 41 | var compression = require('compression') 42 | app.use(compression()) 43 | var app = express() 44 | 45 | // Avionic ✈ Server CORS (Cross-Origin Resource Sharing) headers to support Cross-site HTTP requests and more. 46 | app.use(function (req, res, next) { 47 | res.header('Charset', 'utf8') 48 | res.setHeader('X-Powered-By', 'Avionic') 49 | res.header('Access-Control-Allow-Origin', '*') 50 | res.header('Access-Control-Allow-Headers', 'X-Requested-With') 51 | res.header('Cache-Control', 'private, no-cache, no-store, must-revalidate') 52 | res.header('Expires', '-1') 53 | res.header('Pragma', 'no-cache') 54 | 55 | next() 56 | }) 57 | 58 | // Pull information from html in POST 59 | app.use(bodyParser()) 60 | 61 | // Simulate DELETE and PUT 62 | app.use(methodOverride()) 63 | 64 | app.use(express.static('../.tmp')) 65 | 66 | // Avionic ✈ ServerJSON Services 67 | // app.get('/workouts', workouts.findAll) 68 | // app.get('/workouts/:id', workouts.findById) 69 | 70 | // Avionic ✈ Server 71 | app.set('host', process.env.HOST || '127.0.0.1') 72 | app.set('port', process.env.PORT || 5000) 73 | var server = http.createServer(app).listen(app.get('port'), app.get('host'), function () { 74 | var host = server.address().address 75 | var port = server.address().port 76 | console.log('Avionic ✈ Server listening at http://%s:%s', host, port) 77 | }) 78 | })() 79 | -------------------------------------------------------------------------------- /app/templates/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/splash.png -------------------------------------------------------------------------------- /app/templates/test/config/app.config.spec.js: -------------------------------------------------------------------------------- 1 | function Greeter(){ 2 | this.greeting = "Hello, Avionic ✈"; 3 | }; 4 | 5 | describe("Greeter", function(){ 6 | var greeter = new Greeter(); 7 | it("says Hello, Avionic ✈", function(){ 8 | expect(greeter.greeting).toBe("Hello, Avionic ✈") 9 | }) 10 | }); 11 | -------------------------------------------------------------------------------- /app/templates/test/controllers/editProductController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/editProductController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/homeController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/homeController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/introController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/introController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/loginController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/loginController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/mainController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/mainController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/newProductController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/newProductController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/productController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/productController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/settingsController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/settingsController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/signupController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/signupController.spec.js -------------------------------------------------------------------------------- /app/templates/test/controllers/translateController.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/controllers/translateController.spec.js -------------------------------------------------------------------------------- /app/templates/test/hello.spec.js: -------------------------------------------------------------------------------- 1 | function Greeter(){ 2 | this.greeting = "Hello, Avionic ✈"; 3 | }; 4 | 5 | describe("Greeter", function(){ 6 | var greeter = new Greeter(); 7 | it("says Hello, Avionic ✈", function(){ 8 | expect(greeter.greeting).toBe("Hello, Avionic ✈") 9 | }) 10 | }); 11 | -------------------------------------------------------------------------------- /app/templates/test/routes/app.routes.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/routes/app.routes.spec.js -------------------------------------------------------------------------------- /app/templates/test/services/api.service.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/services/api.service.spec.js -------------------------------------------------------------------------------- /app/templates/test/services/auth.service.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/services/auth.service.spec.js -------------------------------------------------------------------------------- /app/templates/test/services/example.service.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/services/example.service.spec.js -------------------------------------------------------------------------------- /app/templates/test/services/localstorage.service.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/services/localstorage.service.spec.js -------------------------------------------------------------------------------- /app/templates/test/services/user.service.spec.js: -------------------------------------------------------------------------------- 1 | describe('UserService Unit Tests', function(){ 2 | 3 | }); 4 | -------------------------------------------------------------------------------- /app/templates/test/translate/app.translate.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/translate/app.translate.spec.js -------------------------------------------------------------------------------- /app/templates/test/utils/lodash.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sebastienrousseau/generator-avionic/c6f7094eadc70b71779b1d0978c23300846acff8/app/templates/test/utils/lodash.spec.js -------------------------------------------------------------------------------- /app/utils/color.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | prompts: [{ 3 | type: 'checkbox', 4 | name: 'color', 5 | message: 'Enter the color scheme you\'d like to use:\n\n', 6 | choices: [{ 7 | value: '#b71c1c', 8 | name: 'Red', 9 | checked: false 10 | }, { 11 | value: '#880e4f', 12 | name: 'Pink', 13 | checked: false 14 | }, { 15 | value: '#4a148c', 16 | name: 'Purple', 17 | checked: false 18 | }, { 19 | value: '#311b92', 20 | name: 'Deep Purple', 21 | checked: false 22 | }, { 23 | value: '#1a237e', 24 | name: 'Indigo', 25 | checked: false 26 | }, { 27 | value: '#0d47a1', 28 | name: 'Blue', 29 | checked: false 30 | }, { 31 | value: '#01579b', 32 | name: 'Light Blue', 33 | checked: false 34 | }, { 35 | value: '#006064', 36 | name: 'Cyan', 37 | checked: false 38 | }, { 39 | value: '#004d40', 40 | name: 'Teal', 41 | checked: false 42 | }, { 43 | value: '#1b5e20', 44 | name: 'Green', 45 | checked: false 46 | }, { 47 | value: '#33691e', 48 | name: 'Light Green', 49 | checked: false 50 | }, { 51 | value: '#827717', 52 | name: 'Lime', 53 | checked: false 54 | }, { 55 | value: '#f57f17', 56 | name: 'Yellow', 57 | checked: false 58 | }, { 59 | value: '#ff6f00', 60 | name: 'Amber', 61 | checked: false 62 | }, { 63 | value: '#e65100', 64 | name: 'Orange', 65 | checked: false 66 | }, { 67 | value: '#bf360c', 68 | name: 'Deep Orange', 69 | checked: false 70 | }, { 71 | value: '#3e2723', 72 | name: 'Brown', 73 | checked: false 74 | }, { 75 | value: '#212121', 76 | name: 'Grey', 77 | checked: false 78 | }, { 79 | value: '#263238', 80 | name: 'Blue Grey', 81 | checked: false 82 | }, { 83 | value: '#000000', 84 | name: 'Avionic', 85 | checked: false 86 | }] 87 | }] 88 | }; 89 | -------------------------------------------------------------------------------- /app/utils/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: require('./plugins') 3 | }; 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-avionic", 3 | "version": "0.0.23", 4 | "description": "Propelling World-class Cross-platform Hybrid Applications ✈\nA Yeoman generator using AngularJS, Express, ngCordova, Gulp and Bower that helps you kickstart highly sophisticated Ionic projects to evolve and upgrade every aspect of your development to the next moonshot.", 5 | "main": "app/index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/reedia/generator-avionic.git" 9 | }, 10 | "author": "Reedia Limited (https://github.com/reedia)", 11 | "license": "MIT", 12 | "engines": { 13 | "node": ">= 0.9" 14 | }, 15 | "files": [ 16 | "app" 17 | ], 18 | "keywords": [ 19 | "avionic", 20 | "generator-avionic", 21 | "yeoman-generator", 22 | "ionic", 23 | "gulp", 24 | "ionic framework" 25 | ], 26 | "dependencies": { 27 | "chalk": "^0.5.0", 28 | "require-dir": "*", 29 | "cordova": "^5.0.0", 30 | "yeoman-generator": "^0.18.0", 31 | "yosay": "^0.3.0" 32 | }, 33 | "devDependencies": { 34 | "chalk": "^0.5.0", 35 | "cordova": "^5.0.0", 36 | "coveralls": "^2.11.4", 37 | "jasmine-core": "^2.3.4", 38 | "karma": "^0.13", 39 | "karma-jasmine": "^0.1", 40 | "lodash": "^3.8.0", 41 | "mocha": "*", 42 | "phantomjs": "^1.9.18", 43 | "semantic-release": "^4.3.5", 44 | "wiredep": "^2.2.2", 45 | "yeoman-generator": "^0.18.0", 46 | "yo": ">=1.0.0", 47 | "yosay": "^0.3.0" 48 | }, 49 | "bugs": { 50 | "url": "https://github.com/reedia/generator-avionic/issues" 51 | }, 52 | "homepage": "https://github.com/reedia/generator-avionic#readme", 53 | "scripts": { 54 | "lint": "jshint **.js", 55 | "test": "", 56 | "semantic-release": "semantic-release pre && npm publish && semantic-release post" 57 | } 58 | } 59 | --------------------------------------------------------------------------------