Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ed8feac
chore(npm): add `.idea` to .npmignore
Awk34 Jan 20, 2016
d3b4c54
docs(readme): show options for endpoint --models flag
Awk34 Jan 26, 2016
6c4e926
fix(npm): make sure to include mocha for server tests
Awk34 Jan 28, 2016
f4e590f
fix(grunt): exclude constant file from jshint:all
Awk34 Jan 28, 2016
103db11
fix(gulp): exclude constant file from lint:scripts:client
Awk34 Jan 28, 2016
885438f
fix(grunt:babel): don't try to transpile JSON files
Awk34 Jan 28, 2016
c0c988f
Merge pull request #1589 from angular-fullstack/fix/jshint-exclude-co…
kingcody Jan 31, 2016
be5a1f4
fix(grunt:build): don't copy local.env.sample
Awk34 Jan 28, 2016
3080d0a
Merge pull request #1590 from angular-fullstack/fix/grunt-build-exclu…
kingcody Jan 31, 2016
e5fd945
Merge pull request #1588 from angular-fullstack/fix/grunt-babel-json
kingcody Jan 31, 2016
009b789
3.3.0
Awk34 Feb 2, 2016
18412a7
fix(gulp:watch): re-compile jade to .tmp
Awk34 Feb 5, 2016
978e07e
fix(gulp): add inject:tsconfig, change script watcher
Awk34 Feb 7, 2016
24f1fc1
Merge pull request #1611 from angular-fullstack/fix/gulp-watch-jade
Awk34 Feb 9, 2016
3d061cc
chore(bower): upgrade angular-bootstrap to ~1.1.2
Awk34 Feb 18, 2016
8b7941d
Merge pull request #1616 from angular-fullstack/fix/gulp-ts-things
Awk34 Feb 19, 2016
8a1e9c3
Merge pull request #1643 from angular-fullstack/chore/ng-bootstrap-1
Awk34 Feb 19, 2016
37d6c46
fix(gen): fix Stylus & Sass extensions
maslowivan Feb 4, 2016
02da4c5
refactor(client): remove no-longer-present login stylesheet imports
Awk34 Feb 19, 2016
e4305e8
docs(readme): tell users to also install grunt-cli/gulp-cli globally
javidrashid Feb 12, 2016
d7cd347
fix(tslint): fix no-trailing-comma
Awk34 Feb 20, 2016
221f7a4
fix(server:oauth): fix sequelize syntax
Feb 25, 2016
56f6ac1
Update readme.md
comoss Mar 1, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
angular-fullstack-deps
test
.idea
2 changes: 1 addition & 1 deletion angular-fullstack-deps
4 changes: 3 additions & 1 deletion app/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ export default class Generator extends Base {

this.scriptExt = answers.transpiler === 'ts' ? 'ts' : 'js';
this.templateExt = answers.markup;
this.styleExt = answers.stylesheet === 'sass' ? 'scss' : answers.stylesheet;

var styleExt = {sass: 'scss', stylus: 'styl'}[answers.stylesheet];
this.styleExt = styleExt ? styleExt : answers.stylesheet;

cb();
}.bind(this));
Expand Down
7 changes: 4 additions & 3 deletions app/templates/Gruntfile(grunt).js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ module.exports = function (grunt) {
},
src: ['<%%= yeoman.server %>/**/*.{spec,integration}.js']
},
all: ['<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock).js'],
all: ['<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock|app.constant).js'],
test: {
src: ['<%%= yeoman.client %>/{app,components}/**/*.{spec,mock}.js']
}
Expand Down Expand Up @@ -424,7 +424,8 @@ module.exports = function (grunt) {
dest: '<%%= yeoman.dist %>',
src: [
'package.json',
'<%%= yeoman.server %>/**/*'
'<%%= yeoman.server %>/**/*',
'!<%%= yeoman.server %>/config/local.env.sample.js'
]
}]
},
Expand Down Expand Up @@ -636,7 +637,7 @@ module.exports = function (grunt) {
files: [{
expand: true,
cwd: '<%%= yeoman.server %>',
src: ['**/*.{js,json}'],
src: ['**/*.js'],
dest: '<%%= yeoman.dist %>/<%%= yeoman.server %>'
}]
}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"angular-cookies": "~1.4.0",
"angular-sanitize": "~1.4.0",<% if (filters.ngroute) { %>
"angular-route": "~1.4.0",<% } if (filters.uibootstrap) { %>
"angular-bootstrap": "~0.13.0",<% } %>
"angular-bootstrap": "~1.1.2",<% } %>
"font-awesome": ">=4.1.0",
"lodash": "~2.4.1"<% if(filters.socketio) { %>,
"angular-socket-io": "~0.7.0"<% } if (filters.uirouter) { %>,
Expand Down
4 changes: 2 additions & 2 deletions app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
"karma-ng-jade2js-preprocessor": "^0.2.0",<% } else { %>
"karma-ng-html2js-preprocessor": "~0.2.0",<% } %>
"karma-spec-reporter": "~0.0.20",
"sinon-chai": "^2.8.0",<% if (filters.mocha) { %>
"mocha": "^2.2.5",
"sinon-chai": "^2.8.0",
"mocha": "^2.2.5",<% if (filters.mocha) { %>
"karma-mocha": "^0.2.0",
"karma-chai-plugins": "^0.6.0",<% } if (filters.jasmine) { %>
"jasmine-core": "^2.3.4",
Expand Down
1 change: 0 additions & 1 deletion app/templates/client/app/app(less).less
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
}
<% } %>
// injector
@import 'account/login/login.less';
@import 'admin/admin.less';
@import 'main/main.less';
// endinjector
1 change: 0 additions & 1 deletion app/templates/client/app/app(sass).scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<% } %>
// Component styles are injected through grunt
// injector
@import 'account/login/login.scss';
@import 'admin/admin.scss';
@import 'main/main.scss';
// endinjector
1 change: 0 additions & 1 deletion app/templates/client/app/app(stylus).styl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<% } %>
// Component styles are injected through grunt
// injector
@import "account/login/login"
@import "admin/admin"
@import "main/main"
// endinjector
2 changes: 1 addition & 1 deletion app/templates/client/app/main/main(html).html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>'Allo, 'Allo!</h1>
<div class="col-lg-12">
<h1 class="page-header">Features:</h1>
<ul class="nav nav-tabs nav-stacked col-md-4 col-lg-4 col-sm-6" ng-repeat="thing in main.awesomeThings">
<li><a href="#" tooltip="{{thing.info}}">{{thing.name}}<% if (filters.socketio) { %><button type="button" class="close" ng-click="main.deleteThing(thing)">&times;</button><% } %></a></li>
<li><a href="#" uib-tooltip="{{thing.info}}">{{thing.name}}<% if (filters.socketio) { %><button type="button" class="close" ng-click="main.deleteThing(thing)">&times;</button><% } %></a></li>
</ul>
</div>
</div><% if (filters.socketio) { %>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/client/app/main/main(jade).jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ header#banner.hero-unit
h1.page-header Features:
ul.nav.nav-tabs.nav-stacked.col-md-4.col-lg-4.col-sm-6(ng-repeat='thing in main.awesomeThings')
li
a(href='#', tooltip='{{thing.info}}')
a(href='#', uib-tooltip='{{thing.info}}')
| {{thing.name}}<% if (filters.socketio) { %>
button.close(type='button', ng-click='main.deleteThing(thing)') &times;<% } %><% if (filters.socketio) { %>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
'use strict';

angular.module('<%= scriptAppName %>')
.factory('Modal', function($rootScope, $modal) {
.factory('Modal', function($rootScope, $uibModal) {
/**
* Opens a modal
* @param {Object} scope - an object to be merged with modal's scope
* @param {String} modalClass - (optional) class(es) to be applied to the modal
* @return {Object} - the instance $modal.open() returns
* @return {Object} - the instance $uibModal.open() returns
*/
function openModal(scope = {}, modalClass = 'modal-default') {
var modalScope = $rootScope.$new();

angular.extend(modalScope, scope);

return $modal.open({
return $uibModal.open({
templateUrl: 'components/modal/modal.html',
windowClass: modalClass,
scope: modalScope
Expand Down
2 changes: 1 addition & 1 deletion app/templates/client/components/navbar/navbar(html).html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</button>
<a href="/" class="navbar-brand"><%= lodash.slugify(lodash.humanize(appname)) %></a>
</div>
<div collapse="nav.isCollapsed" class="navbar-collapse collapse" id="navbar-main">
<div uib-collapse="nav.isCollapsed" class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav">
<li ng-repeat="item in nav.menu" <% if (filters.uirouter) { %>ui-sref-active="active"<% } else { %>ng-class="{active: nav.isActive(item.link)}"<% } %>>
<a <% if (filters.uirouter) { %>ui-sref="{{item.state}}"<% } else { %>ng-href="{{item.link}}"<% } %>>{{item.title}}</a>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/client/components/navbar/navbar(jade).jade
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ div.navbar.navbar-default.navbar-static-top(ng-controller='NavbarController')
span.icon-bar
a.navbar-brand(href='/') <%= lodash.slugify(lodash.humanize(appname)) %>

div#navbar-main.navbar-collapse.collapse(collapse='nav.isCollapsed')
div#navbar-main.navbar-collapse.collapse(uib-collapse='nav.isCollapsed')
ul.nav.navbar-nav
li(ng-repeat='item in nav.menu', <% if (filters.uirouter) { %>ui-sref-active='active'<% } else { %>ng-class='{active: nav.isActive(item.link)}'<% } %>)
a(<% if (filters.uirouter) { %>ui-sref='{{item.state}}'<% } else { %>ng-href='{{item.link}}'<% } %>) {{item.title}}<% if (filters.auth) { %>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/client/tslint.json(ts)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"no-shadowed-variable": true,
"no-string-literal": true,
"no-switch-case-fall-through": true,
"no-trailing-comma": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-unused-variable": true,
Expand All @@ -42,6 +41,7 @@
"quotemark": [true, "single"],
"radix": true,
"semicolon": true,
"trailing-comma": false,
"triple-equals": [true, "allow-null-check"],
"typedef-whitespace": [true, {
"call-signature": "nospace",
Expand Down
41 changes: 34 additions & 7 deletions app/templates/gulpfile.babel(gulp).js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,26 @@ gulp.task('inject:js', () => {
transform: (filepath) => '<script src="' + filepath.replace(`/${clientPath}/`, '')<% if(filters.ts) { %>.replace('.ts', '.js')<% } %> + '"></script>'
}))
.pipe(gulp.dest(clientPath));
});
});<% if(filters.ts) { %>

gulp.task('inject:tsconfig', () => {
let src = gulp.src([
`${clientPath}/**/!(*.spec|*.mock).ts`,
`!${clientPath}/bower_components/**/*`,
`${clientPath}/typings/**/*.d.ts`
], {read: false})
.pipe(plugins.sort());

return gulp.src('./tsconfig.client.json')
.pipe(plugins.inject(src, {
starttag: '"files": [',
endtag: ']',
transform: (filepath, file, i, length) => {
return `"${filepath.substr(1)}"${i + 1 < length ? ',' : ''}`;
}
}))
.pipe(gulp.dest('./'));
});<% } %>

gulp.task('inject:css', () => {
return gulp.src(paths.client.mainView)
Expand Down Expand Up @@ -280,7 +299,7 @@ gulp.task('copy:constant', () => {
})

let tsProject = plugins.typescript.createProject('./tsconfig.client.json');
gulp.task('transpile:client', ['constant', 'copy:constant'], () => {
gulp.task('transpile:client', ['inject:tsconfig', 'constant', 'copy:constant'], () => {
return tsProject.src()
.pipe(plugins.sourcemaps.init())
.pipe(plugins.typescript(tsProject)).js
Expand Down Expand Up @@ -312,7 +331,11 @@ gulp.task('transpile:server', () => {
gulp.task('lint:scripts', cb => runSequence(['lint:scripts:client', 'lint:scripts:server'], cb));

gulp.task('lint:scripts:client', () => {
return gulp.src(_.union(paths.client.scripts, _.map(paths.client.test, blob => '!' + blob)))
return gulp.src(_.union(
paths.client.scripts,
_.map(paths.client.test, blob => '!' + blob),
[`!${clientPath}/app/app.constant.<%= scriptExt %>`]
))
.pipe(lintClientScripts());
});

Expand Down Expand Up @@ -373,15 +396,19 @@ gulp.task('watch', () => {
.pipe(plugins.livereload());
});

plugins.watch(paths.client.views)
plugins.watch(paths.client.views)<% if(filters.jade) { %>
.pipe(plugins.jade())
.pipe(gulp.dest('.tmp'))<% } %>
.pipe(plugins.plumber())
.pipe(plugins.livereload());
.pipe(plugins.livereload());<% if(filters.babel) { %>

plugins.watch(paths.client.scripts) //['inject:js']
.pipe(plugins.plumber())
.pipe(transpileClient())
.pipe(gulp.dest('.tmp'))
.pipe(plugins.livereload());
.pipe(plugins.livereload());<% } %><% if(filters.ts) { %>

gulp.watch(paths.client.scripts, ['inject:tsconfig', 'lint:scripts:client', 'transpile:client']);<% } %>

plugins.watch(_.union(paths.server.scripts, testFiles))
.pipe(plugins.plumber())
Expand All @@ -393,7 +420,7 @@ gulp.task('watch', () => {

gulp.task('serve', cb => {
runSequence(['clean:tmp', 'constant'<% if(filters.ts) { %>, 'tsd'<% } %>],
['lint:scripts', 'inject'<% if(filters.jade) { %>, 'jade'<% } %>],
['lint:scripts', 'inject'<% if(filters.jade) { %>, 'jade'<% } %><% if(filters.ts) { %>, 'inject:tsconfig'<% } %>],
['wiredep:client'],
['transpile:client', 'styles'],
['start:server', 'start:client'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ module.exports = function(sequelize, DataTypes) {
},
provider: DataTypes.STRING,
salt: DataTypes.STRING<% if (filters.oauth) { %>,<% if (filters.facebookAuth) { %>
facebook: DataTypes.TEXT,<% } %><% if (filters.twitterAuth) { %>
twitter: DataTypes.TEXT,<% } %><% if (filters.googleAuth) { %>
google: DataTypes.TEXT,<% } %>
github: DataTypes.TEXT<% } %>
facebook: DataTypes.JSON,<% } %><% if (filters.twitterAuth) { %>
twitter: DataTypes.JSON,<% } %><% if (filters.googleAuth) { %>
google: DataTypes.JSON,<% } %>
github: DataTypes.JSON<% } %>

}, {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export function setup(User, config) {
},
function(accessToken, refreshToken, profile, done) {
<% if (filters.mongooseModels) { %>User.findOneAsync({<% }
if (filters.sequelizeModels) { %>User.find({<% } %>
if (filters.sequelizeModels) { %>User.find({where:{<% } %>
'facebook.id': profile.id
})
<% if (filters.sequelizeModels) { %>}<% } %>})
.then(user => {
if (user) {
return done(null, user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export function setup(User, config) {
},
function(accessToken, refreshToken, profile, done) {
<% if (filters.mongooseModels) { %>User.findOneAsync({<% }
if (filters.sequelizeModels) { %>User.find({<% } %>
if (filters.sequelizeModels) { %>User.find({where:{<% } %>
'google.id': profile.id
})
<% if (filters.sequelizeModels) { %>}<% } %>})
.then(user => {
if (user) {
return done(null, user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export function setup(User, config) {
},
function(token, tokenSecret, profile, done) {
<% if (filters.mongooseModels) { %>User.findOneAsync({<% }
if (filters.sequelizeModels) { %>User.find({<% } %>
'twitter.id_str': profile.id
})
if (filters.sequelizeModels) { %>User.find({where:{<% } %>
'twitter.id': profile.id
<% if (filters.sequelizeModels) { %>}<% } %>})
.then(user => {
if (user) {
return done(null, user);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-angular-fullstack",
"version": "3.3.0-beta.0",
"version": "3.3.0",
"description": "Yeoman generator for creating MEAN stack applications, using MongoDB, Express, AngularJS, and Node",
"keywords": [
"yeoman-generator",
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Source code: https://github.com/DaftMonk/fullstack-demo

## Usage

Install `yo`, `grunt-cli`, `bower`, and `generator-angular-fullstack`:
Install `yo`, `grunt-cli`/`gulp-cli`, `bower`, and `generator-angular-fullstack`:
```
npm install -g yo grunt-cli bower generator-angular-fullstack
npm install -g yo grunt-cli gulp-cli bower generator-angular-fullstack
```

Make a new directory, and `cd` into it:
Expand Down Expand Up @@ -135,7 +135,7 @@ Options:
-h, --help # Print the generator's options and usage
--skip-cache # Do not remember prompt answers Default: false
--route # URL for the endpoint
--models # Specify which model(s) to use
--models # Specify which model(s) to use Options: mongoose, sequelize
--endpointDirectory # Parent directory for enpoints

Arguments:
Expand Down Expand Up @@ -297,7 +297,7 @@ To make your deployment process easier consider using [grunt-build-control](http

**Pushing Updates**

grunt
grunt build

Commit and push the resulting build, located in your dist folder:

Expand Down