npm install -g yo
https://github.com/Swiip/generator-gulp-angular
npm install -g gulp bower generator-gulp-angular
mkdir myapp && cd $_
yo gulp-angular
gulp serve
bower install --save angular
bower install --save angular-sanitize
bower install --save angular-messages
bower install --save angular-aria
bower install --save bootswatch
bower install --save font-awesome
bower install --save ng-formio
bower install --save ng-formio-helper
/src/app/index.module.js
(function() {
'use strict';
angular.module('groupselfie', [
'ngSanitize',
'ngMessages',
'ngAria',
'ui.router',
'ui.bootstrap',
'toastr',
'formio',
'ngFormioHelper'
]);
})();
Delete "overrides" from bower.json file
Don't exclude bootstrap.js
/gulp/conf.js
exports.wiredep = {
exclude: [/\/bootstrap-sass\/.*\.js/, /\/bootstrap\.css/],
directory: 'bower_components'
};
Change /app/index.scss to the following
Modify the fonts gulp task.
/gulp/build.js
gulp.task('fonts', function () {
return gulp.src([
'bower_components/bootstrap-sass/assets/fonts/**/*',
'bower_components/font-awesome/fonts/*',
])
.pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}'))
.pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/')));
});
Add the following routes to gulp/server.js
Add the navbar in index.html
and add "container" to ui-view/gulp/build.js
gulp.task('views', function() {
return gulp.src([
path.join(conf.paths.src, '/views/**/*')
]).pipe(gulp.dest(path.join(conf.paths.dist, '/views/')));
});
gulp.task('build', ['html', 'fonts', 'views', 'other']);
using Form.io
/src/views/user/auth.html
/src/views/user/login.html
/src/views/user/register.html
/src/app/index.config.js
/src/app/index.run.js
(function() {
'use strict';
angular.module('groupselfie').run(runBlock);
/** @ngInject */
function runBlock(FormioAuth) {
FormioAuth.init();
}
})();
Note: Your bucket will need to be called something else.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "UploadFile",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::551091399009:user/GroupSelfieUpload"
},
"Action": [
"s3:GetObject",
"s3:PutObjectAcl",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::files.groupselfie.us/*"
},
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::files.groupselfie.us/*"
},
{
"Sid": "crossdomainAccess",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::files.groupselfie.us/crossdomain.xml"
}
]
}
http://groupselfie.us
POST
GET
HEAD
3000
*
/src/app/index.config.js
/src/index.confg.js
/src/views/main.html
/src/app/index.route.js
/src/views/group/view.html
/src/views/group/find.html
/src/app/index.route.js
npm install --save gulp-s3
var s3 = require("gulp-s3");
gulp.task('deploy', ['build'], function () {
return gulp.src('./dist/**/*').pipe(s3(require('./aws.json')));
});
{
"key": "-- THE KEY FOR THE USER THAT HAS FULL S3 ACCESS --",
"secret": "-- THE SECRET FOR THE USER THAT HAS FULL S3 ACCESS --",
"bucket": "groupselfie.us",
"region": "us-east-1"
}
.gitignore
aws.json
node_modules/
bower_components/
coverage/
.sass-cache/
.idea/
.tmp/
dist/
gulp deploy