-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Russian
committed
Nov 24, 2015
0 parents
commit 1b49e77
Showing
46 changed files
with
875 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"node": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 2, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": true, | ||
"strict": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- 'iojs' | ||
- '0.12' | ||
- '0.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"generator-generator": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# generator-miojo | ||
|
||
A super app generator. Ready in 3 minutes :D | ||
|
||
## Getting Started | ||
|
||
To install generator-miojo from npm, run: | ||
|
||
```bash | ||
npm install -g generator-miojo | ||
``` | ||
|
||
To scaffold initial project structure: | ||
|
||
```bash | ||
yo miojo | ||
``` | ||
|
||
To generate a component: | ||
|
||
```bash | ||
yo miojo:component <component_name> | ||
``` | ||
|
||
To generate a shared module: | ||
|
||
```bash | ||
yo miojo:module <module_name> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
'use strict'; | ||
var yeoman = require('yeoman-generator'); | ||
var chalk = require('chalk'); | ||
var yosay = require('yosay'); | ||
var _ = require("underscore"); | ||
var mkdirp = require('mkdirp'); | ||
|
||
module.exports = yeoman.generators.Base.extend({ | ||
prompting: function () { | ||
var done = this.async(); | ||
|
||
this.log(yosay( | ||
'Welcome to the wonderful ' + chalk.yellow('Miojo') + ' generator!' | ||
)); | ||
|
||
var prompts = [ | ||
{ | ||
name: 'app_name', | ||
message: 'What the name of your app?', | ||
default: 'app' | ||
}, | ||
{ | ||
name: 'app_description', | ||
message: 'Type the description of your app.', | ||
default: 'An awesome app!' | ||
}, | ||
{ | ||
name: 'app_site', | ||
message: 'Your app have a site?', | ||
default: 'example.com' | ||
}, | ||
{ | ||
name: 'author_name', | ||
message: 'What\'s your name?', | ||
default: 'Gandalf' | ||
}, | ||
{ | ||
name: 'author_email', | ||
message: 'What\'s your email?', | ||
default: '[email protected]' | ||
}, | ||
{ | ||
name: 'package_name', | ||
message: 'Set the app package name.', | ||
default: 'com.example.app' | ||
}, | ||
]; | ||
|
||
this.prompt(prompts, function (props) { | ||
this.app_name = props.app_name; | ||
this.app_description = props.app_description; | ||
this.app_site = props.app_site; | ||
this.author_name = props.author_name; | ||
this.author_email = props.author_email; | ||
this.package_name = props.package_name; | ||
done(); | ||
}.bind(this)); | ||
}, | ||
|
||
writing: { | ||
projectfiles: function () { | ||
this.template('_package.json', 'package.json'); | ||
this.template('editorconfig', '.editorconfig'); | ||
this.template('jshintrc', '.jshintrc'); | ||
this.template('_bower.json', 'bower.json'); | ||
this.template('gulpfile.js', 'gulpfile.js'); | ||
this.template('_config.xml', 'config.xml'); | ||
this.template('.bowerrc', '.bowerrc'); | ||
this.template('_ionic.project', '.ionic.project'); | ||
this.template('.gitignore', '.gitignore'); | ||
}, | ||
|
||
app: function () { | ||
|
||
mkdirp('source'); | ||
mkdirp('source/assets'); | ||
mkdirp('source/assets/fonts'); | ||
mkdirp('source/assets/images'); | ||
mkdirp('source/assets/styles'); | ||
|
||
this.fs.copy( | ||
this.templatePath('./source'), | ||
this.destinationPath('./source') | ||
); | ||
|
||
this.fs.copy( | ||
this.templatePath('./gulp_tasks'), | ||
this.destinationPath('./gulp_tasks') | ||
); | ||
|
||
this.template('_index.jade', './source/index.jade'); | ||
|
||
}, | ||
|
||
}, | ||
|
||
install: function () { | ||
// this.installDependencies(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "bower_components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Specifies intentionally untracked files to ignore when using Git | ||
# http://git-scm.com/docs/gitignore | ||
|
||
bower_components/ | ||
node_modules/ | ||
platforms/ | ||
plugins/ | ||
www/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "<%= app_name %>", | ||
"version": "0.0.0", | ||
"private": "true", | ||
"dependencies": { | ||
"ionic": "driftyco/ionic-bower#1.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<widget id="<%= package_name %>" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name><%= app_name %></name> | ||
<description> | ||
An Ionic Framework and Cordova project. | ||
</description> | ||
<author email="<%= author_email %>" href="<%= app_site %>"> | ||
<%= author_name %> | ||
</author> | ||
<content src="index.html"/> | ||
<access origin="*"/> | ||
<preference name="webviewbounce" value="false"/> | ||
<preference name="UIWebViewBounce" value="false"/> | ||
<preference name="DisallowOverscroll" value="true"/> | ||
<preference name="android-minSdkVersion" value="16"/> | ||
<preference name="BackupWebStorage" value="none"/> | ||
<feature name="StatusBar"> | ||
<param name="ios-package" value="CDVStatusBar" onload="true"/> | ||
</feature> | ||
</widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
doctype html | ||
html | ||
head | ||
meta(charset='utf-8') | ||
meta(name='viewport', content='initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width') | ||
|
||
title <%= app_name %> | ||
|
||
link(rel="stylesheet" href="application.min.css") | ||
|
||
// bower:css | ||
// endbower | ||
// inject:css | ||
// endinject | ||
body(ng-app='app') | ||
ion-nav-view | ||
|
||
script(src='cordova.js') | ||
|
||
// bower:js | ||
// endbower | ||
// inject:js | ||
// endinject | ||
script(src='application.js') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "<%= app_name %>", | ||
"app_id": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "<%= app_name %>", | ||
"version": "0.0.0", | ||
"description": "<%= app_description %>", | ||
"devDependencies": { | ||
"gulp": "^3.5.6", | ||
"gulp-sass": "^2.0.4", | ||
"gulp-concat": "^2.2.0", | ||
"gulp-minify-css": "^0.3.0", | ||
"gulp-rename": "^1.2.0", | ||
"bower": "^1.3.3", | ||
"browser-sync": "^2.9.12", | ||
"gulp-flatten": "^0.2.0", | ||
"gulp-jade": "^1.1.0", | ||
"gulp-minify-css": "^0.3.13", | ||
"gulp-ng-annotate": "^1.1.0", | ||
"gulp-plumber": "^1.0.1", | ||
"gulp-sass": "^2.1.0", | ||
"gulp-scss": "^1.3.15", | ||
"gulp-sync": "^0.1.4", | ||
"gulp-util": "^2.2.14", | ||
"gulp-watch": "^4.3.5", | ||
"main-bower-files": "^2.9.0", | ||
"minimist": "^1.2.0", | ||
"require-dir": "^0.3.0", | ||
"shelljs": "^0.3.0", | ||
"wiredep": "^2.2.2" | ||
}, | ||
"cordovaPlugins": [ | ||
"cordova-plugin-device", | ||
"cordova-plugin-console", | ||
"cordova-plugin-whitelist", | ||
"cordova-plugin-splashscreen", | ||
"cordova-plugin-statusbar", | ||
"ionic-plugin-keyboard" | ||
], | ||
"cordovaPlatforms": [ | ||
"ios" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var gulp = require('gulp'), | ||
reload = require('browser-sync').get('app').reload; | ||
|
||
gulp.task('images', function() { | ||
gulp.src(gulp.paths.images) | ||
.pipe(gulp.dest(gulp.paths.dist)) | ||
.pipe(reload({stream:true})); | ||
}); | ||
|
||
gulp.task('fonts', function() { | ||
gulp.src(gulp.paths.fonts) | ||
.pipe(gulp.dest(gulp.paths.dist)) | ||
.pipe(reload({stream:true})); | ||
}); | ||
|
||
gulp.task('assets', ['images','fonts']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var gulp = require('gulp'), | ||
concat = require('gulp-concat'), | ||
bowerFiles = require('main-bower-files') | ||
reload = require('browser-sync').get('app').reload;; | ||
|
||
gulp.task('bower-files', function() { | ||
gulp.src(bowerFiles(), {base: 'bower_components'}) | ||
.pipe(gulp.dest(gulp.paths.dist+'/libs')) | ||
.pipe(reload({stream:true})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var gulp = require('gulp'), | ||
browserSync = require('browser-sync'), | ||
watch = require('gulp-watch'); | ||
|
||
gulp.task('browsersync', function () { | ||
|
||
browserSync.get('app').init({ | ||
server: { | ||
baseDir: "./"+gulp.paths.dist | ||
} | ||
}); | ||
|
||
watch('source/index.jade', function () { return gulp.start('index'); }); | ||
watch('source/**/*.js', function () { return gulp.start('concat'); }); | ||
watch('source/**/*.jade', function (file) { return gulp.jadeTask(file.history); }); | ||
watch('source/**/*.scss', function () { return gulp.start('sass'); }); | ||
watch('bower_components/**', function () { return gulp.start('bower-files'); }); | ||
watch('source/assets/images/**/*', function () { return gulp.start('images'); }); | ||
watch('source/assets/fonts/**/*', function () { return gulp.start('fonts'); }); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
var gulp = require('gulp'), | ||
plumber = require('gulp-plumber'), | ||
concat = require('gulp-concat') | ||
ngAnnotate = require('gulp-ng-annotate'); | ||
reload = require('browser-sync').get('app').reload; | ||
|
||
gulp.task('concat', function() { | ||
return gulp.src(gulp.paths.scripts) | ||
.pipe(plumber()) | ||
.pipe(concat('application.js')) | ||
.pipe(ngAnnotate()) | ||
.pipe(gulp.dest(gulp.paths.dist)) | ||
.pipe(reload({stream:true})); | ||
}); |
Oops, something went wrong.