Skip to content

Canary fixes #2563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
May 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2061d97
wip
Mar 22, 2017
9ad165e
WIP
Awk34 Apr 21, 2017
43d3a86
Merge branch 'canary' into canary-fixes
Awk34 Apr 22, 2017
63f5c12
chore(gen:gulp): rm unused daux comand
Awk34 Apr 29, 2017
d93e0a7
refactor(client): refactor polyfills
Awk34 Apr 29, 2017
454923d
test(gen:expectedFiles): fix tests
Awk34 Apr 29, 2017
c16bd08
test(gen:endpoint): set filters if necessary
Awk34 Apr 29, 2017
89d28cd
chore(webpack): fix webpack config
Awk34 Apr 29, 2017
c5f7d8c
style(endpoint): lint fix endpoint
Awk34 Apr 29, 2017
966b48b
ch(circle): use node 6
Awk34 Apr 29, 2017
8634fb2
ci(circle): improve caching
Awk34 Apr 29, 2017
72d2de7
chore(package): bump webpack stuff
Awk34 Apr 29, 2017
186ee4f
refactor(gen): rm unused imports
Awk34 Apr 30, 2017
5d780fe
fix(client): fix loading css
Awk34 Apr 30, 2017
e086072
refactor(webpack): remove `console.log`s
Awk34 Apr 30, 2017
3244cbd
chore(client:ts): remove typings, use @types
Awk34 Apr 30, 2017
e7dbce1
test(client:oauth): enable first new client test
Awk34 Apr 30, 2017
640d5ff
refactor(server:express): rm unused `cors` import
Awk34 Apr 30, 2017
5535fe3
fix(client): fix a few client code errors
Awk34 Apr 30, 2017
4b37ed1
chore(package): bump rxjs
Awk34 Apr 30, 2017
d71f890
test(client:oauth): fix oauth button test
Awk34 Apr 30, 2017
bba765c
test(client): fix temporary test include
Awk34 Apr 30, 2017
9aad597
test(gen:expectedFiles): fix ts expectations
Awk34 Apr 30, 2017
e0d65f6
test(client): add shim test
Awk34 Apr 30, 2017
8e7040c
chore(ts): don't show errors for libs
Awk34 Apr 30, 2017
397ab7d
test(client): fix syntax
Awk34 May 1, 2017
ac86190
test(client:util): add simple util test
Awk34 May 1, 2017
61729de
test(gen:expectedFiles): add util test
Awk34 May 1, 2017
a37b6b0
test(client): fix mocha/jasmine in spec.js
Awk34 May 1, 2017
7394b01
Allow typescript to find or resolve module located on node_modules
stherrienaspnet May 8, 2017
703cdb4
Merge pull request #2558 from stherrienaspnet/canary-fixes
Awk34 May 9, 2017
ce445cf
Moved setting moduleResolution inside compilerOptions section
stherrienaspnet May 9, 2017
b382d88
Merge pull request #2559 from stherrienaspnet/canary-fixes
Awk34 May 9, 2017
c1cd12c
test(gen): rm oauth directive spec from expected
May 12, 2017
3f7e2b4
fix(webpack): fix CSS loader options
May 12, 2017
b0e01af
Merge branch 'canary' into canary-fixes
Awk34 May 12, 2017
049c0be
ci(circle): use CircleCI 2.0 beta
Awk34 May 12, 2017
91b920b
fix(client:main): fix add/delete things
Awk34 May 13, 2017
04300fc
Merge pull request #2567 from angular-fullstack/circle-2
Awk34 May 13, 2017
b272802
Merge pull request #2568 from angular-fullstack/fix/canary-things
Awk34 May 13, 2017
26b28ab
chore(client:ts): rm ts-helpers
Awk34 May 14, 2017
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
110 changes: 59 additions & 51 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
general:
branches:
ignore:
- gh-pages

## Customize the test machine
machine:
node:
version: 5.11.1
post:
- npm install -g gulp-cli

## Customize checkout
checkout:
post:
- git submodule sync
- git submodule update --init # use submodules

## Customize dependencies
dependencies:
# we automatically cache and restore many dependencies between
# builds. If you need to, you can add custom paths to cache:
cache_directories:
- "test/fixtures/node_modules"
# post:
# - wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz
# - tar -xzf sc-latest-linux.tar.gz

## Custom notifications
#notify:
notify:
webhooks:
# A list of hook hashes, containing the url field
# gitter hook
- url: https://webhooks.gitter.im/e/ac3980c61cb722b9e789

# deployment:
# docs:
# branch: master
# commands:
# - composer global require justinwalsh/daux.io
# - gulp docs

#test:
# pre:
# - cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready:
# background: true
# # Wait for tunnel to be ready
# - while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
# post:
# - killall --wait sc # wait for Sauce Connect to close the tunnel
version: 2
jobs:
build:
docker:
- image: node:7
- image: mongo
command: [mongod, --smallfiles]

working_directory: ~/generator-angular-fullstack

environment:
NODE_ENV: test

branches:
ignore:
- gh-pages

steps:
- checkout
- run: git submodule sync && git submodule update --init

# Global npm dependencies
- restore_cache:
keys:
- generator-angular-fullstack-npm-global-{{ .Branch }}
- generator-angular-fullstack-npm-global-
- run: npm install --global gulp-cli
- save_cache:
key: generator-angular-fullstack-npm-global-{{ .Branch }}
paths:
- /usr/local/lib/node_modules

# Generator npm dependencies
- restore_cache:
keys:
- generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }}
- generator-angular-fullstack-npm-{{ .Branch }}
- generator-angular-fullstack-npm-
- run: npm install --quiet
- save_cache:
key: generator-angular-fullstack-npm-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/generator-angular-fullstack/node_modules

# Test fixtures
- run: gulp updateFixtures:test
- restore_cache:
keys:
- generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }}
- generator-angular-fullstack-npm-fixtures-{{ .Branch }}
- generator-angular-fullstack-npm-fixtures-
- run: gulp installFixtures
- save_cache:
key: generator-angular-fullstack-npm-fixtures-{{ .Branch }}-{{ checksum "templates/app/_package.json" }}
paths:
- ~/generator-angular-fullstack/test/fixtures/node_modules

- run: gulp build
- run: gulp test
3 changes: 0 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ gulp.task('deps', () => console.log('TODO')); // updateFixtures, david
gulp.task('release', () => console.log('TODO'));
gulp.task('lint', () => console.log('TODO')); // ['gulpfile.js', 'src/**/*.js']

gulp.task('daux', () => {
return execAsync('daux');
});
gulp.task('copy_docs_images', () => {
return gulp.src('./media/svg/*')
.pipe(gulp.dest('./static/'));
Expand Down
9 changes: 3 additions & 6 deletions src/generators/app/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import fs from 'fs';
import path from 'path';
import Promise from 'bluebird';
import { runCmd } from '../util';
import chalk from 'chalk';
import { Base } from '../generator-base';
import insight from '../insight-init';
import { exec } from 'child_process';
import tap from 'gulp-tap';
import filter from 'gulp-filter';
import eslint from 'gulp-eslint';
Expand Down Expand Up @@ -505,7 +502,7 @@ export class Generator extends Base {
clientJsFilter,
codeshiftStream,
eslint({
fix: true,
fix: true,
configFile: path.join(genDir, 'templates/app/client/.eslintrc(babel)')
}),
clientJsFilter.restore
Expand Down Expand Up @@ -542,7 +539,7 @@ export class Generator extends Base {

// Convert HTML into Pug
if(this.filters.pug) {
let pugFilter = filter(['**/*.html'], {restore: true});
let pugFilter = filter(['**/*.html', '!client/_index.html'], {restore: true});
this.registerTransformStream([
pugFilter,
html2jade({
Expand All @@ -562,7 +559,7 @@ export class Generator extends Base {
this.registerTransformStream([
serverJsFilter,
eslint({
fix: true,
fix: true,
configFile: path.join(genDir, 'templates/app/server/.eslintrc')
}),
serverJsFilter.restore
Expand Down
1 change: 1 addition & 0 deletions src/generators/endpoint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class Generator extends NamedBase {
}

prompting() {
this.filters = this.filters || this.config.get('filters');
let promptCb = props => {
if(props.route.charAt(0) !== '/') {
props.route = `/${props.route}`;
Expand Down
1 change: 0 additions & 1 deletion src/generators/generator-base.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

import util from 'util';
import path from 'path';
import _ from 'lodash';
import s from 'underscore.string';
Expand Down
123 changes: 54 additions & 69 deletions src/test/get-expected-files.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
const mapping = {
stylesheet: {
sass: 'scss',
stylus: 'styl',
less: 'less',
css: 'css'
},
markup: {
pug: 'pug',
html: 'html'
},
script: {
js: 'js',
ts: 'ts'
}
};

/**
* Generate an array of OAuth files based on type
*
* @param {String} type - type of oauth
* @return {Array} - array of files
*
*/
var oauthFiles = type => ([
`server/auth/${type}/index.js`,
`server/auth/${type}/passport.js`,
]);

/**
* Generate an array of files to expect from a set of options
*
Expand All @@ -6,68 +35,37 @@
*
*/
export function app(options) {
var mapping = {
stylesheet: {
sass: 'scss',
stylus: 'styl',
less: 'less',
css: 'css'
},
markup: {
pug: 'pug',
html: 'html'
},
script: {
js: 'js',
ts: 'ts'
}
},
files = [];

/**
* Generate an array of OAuth files based on type
*
* @param {String} type - type of oauth
* @return {Array} - array of files
*
*/
var oauthFiles = function(type) {
return [
'server/auth/' + type + '/index.js',
'server/auth/' + type + '/passport.js',
];
};


var script = mapping.script[options.transpiler === 'ts' ? 'ts' : 'js'],
markup = mapping.markup[options.markup],
stylesheet = mapping.stylesheet[options.stylesheet],
models = options.models ? options.models : options.odms[0];
let script = mapping.script[options.transpiler === 'ts' ? 'ts' : 'js'];
let markup = mapping.markup[options.markup];
let stylesheet = mapping.stylesheet[options.stylesheet];
let models = options.models ? options.models : options.odms[0];

/* Core Files */
files = files.concat([
'client/.htaccess',
let files = [
'client/favicon.ico',
'client/robots.txt',
'client/_index.html',
`client/polyfills.${script}`,
'client/app/app.' + script,
'client/app/app.component.' + script,
'client/app/app.config.' + script,
'client/app/app.constants.' + script,
'client/app/app.module.' + script,
'client/app/app.' + stylesheet,
`client/app/polyfills.${script}`,
'client/app/main/main.component.' + script,
'client/app/main/main.component.spec.' + script,
'client/app/main/main.routes.' + script,
'client/app/main/main.module.' + script,
'client/app/main/main.' + markup,
'client/app/main/main.' + stylesheet,
'client/assets/images/yeoman.png',
'client/components/directives.module.' + script,
'client/components/util.' + script,
'client/components/util.spec.' + script,
'client/components/footer/footer.' + stylesheet,
'client/components/footer/footer.' + markup,
'client/components/footer/footer.component.' + script,
'client/components/navbar/navbar.' + markup,
'client/components/navbar/navbar.component.' + script,
'client/components/util/util.module.' + script,
'client/components/util/util.service.' + script,
'server/.eslintrc',
'server/app.js',
'server/index.js',
Expand Down Expand Up @@ -107,16 +105,16 @@ export function app(options) {
'spec.js',
'webpack.build.js',
'webpack.dev.js',
'webpack.make.js',
'webpack.test.js',
'webpack.make.js'
]);
'webpack.server.js'
];

/* TypeScript */
if (options.transpiler === 'ts') {
files = files.concat([
'tsconfig.client.test.json',
'tsconfig.client.json',
'typings.json',
'tsconfig.json',
'client/tslint.json'
]);
} else {
Expand All @@ -137,15 +135,6 @@ export function app(options) {
]);
}

/* Ui-Bootstrap */
if (options.uibootstrap) {
files = files.concat([
'client/components/modal/modal.' + markup,
'client/components/modal/modal.' + stylesheet,
'client/components/modal/modal.service.' + script
]);
}

/* Models - Mongoose or Sequelize */
if (models) {
files = files.concat([
Expand All @@ -165,21 +154,18 @@ export function app(options) {
/* Authentication */
if (options.auth) {
files = files.concat([
'client/app/account/index.' + script,
'client/app/account/account.module.' + script,
'client/app/account/account.routes.' + script,
'client/app/account/login/login.' + markup,
'client/app/account/login/index.' + script,
'client/app/account/login/login.controller.' + script,
'client/app/account/login/login.component.' + script,
'client/app/account/settings/settings.' + markup,
'client/app/account/settings/index.' + script,
'client/app/account/settings/settings.controller.' + script,
'client/app/account/settings/settings.component.' + script,
'client/app/account/signup/signup.' + markup,
'client/app/account/signup/index.' + script,
'client/app/account/signup/signup.controller.' + script,
'client/app/admin/index.' + script,
'client/app/account/signup/signup.component.' + script,
'client/app/admin/admin.' + markup,
'client/app/admin/admin.' + stylesheet,
'client/app/admin/admin.controller.' + script,
'client/app/admin/admin.component.' + script,
'client/app/admin/admin.module.' + script,
'client/app/admin/admin.routes.' + script,
'client/components/auth/auth.module.' + script,
'client/components/auth/auth.service.' + script,
Expand Down Expand Up @@ -208,17 +194,16 @@ export function app(options) {

if (options.oauth && options.oauth.length) {
/* OAuth (see oauthFiles function above) */
options.oauth.forEach(function(type, i) {
options.oauth.forEach(type => {
files = files.concat(oauthFiles(type.replace('Auth', '')));
});


files = files.concat([
'client/components/oauth-buttons/index.' + script,
'client/components/oauth-buttons/oauth-buttons.' + stylesheet,
'client/components/oauth-buttons/oauth-buttons.' + markup,
'client/components/oauth-buttons/oauth-buttons.controller.spec.' + script,
'client/components/oauth-buttons/oauth-buttons.directive.spec.' + script,
'client/components/oauth-buttons/oauth-buttons.component.' + script,
'client/components/oauth-buttons/oauth-buttons.component.spec.' + script,
'e2e/components/oauth-buttons/oauth-buttons.po.js'
]);
}
Expand Down
Loading