Skip to content

Commit

Permalink
feat(generator): update Confit and generated-project dependencies (#125)
Browse files Browse the repository at this point in the history
* feat(generator): update Confit and generated-project dependencies

BREAKING CHANGE:
Most project dependencies have changed since v11+. Major changes are Angular 2.x -> 4.1, Angular
1.6.1 -> 1.6.4, BackstopJS 1.3.5 -> 2.7.0, ESLint 3.19.0 (and related ESLint configs), SASSLoader
4.1.1 -> 6.0.3, StylusLoader 3.0.1, TSLint 5.1.0, TypeScript 2.3.2

The `npm run test:system` command has also changed. You no longer need to start a web server in a separate process.
  • Loading branch information
uglow authored May 17, 2017
1 parent fc71732 commit 94c2dea
Show file tree
Hide file tree
Showing 31 changed files with 132 additions and 385 deletions.
4 changes: 2 additions & 2 deletions lib/buildTool/npm/npmResources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ release:
- <<: *pkg_corp-semantic-release
tasks:
- name: semantic-release
tasks: ['corp-semantic-release --changelogpreset angular-bitbucket']
tasks: ['corp-semantic-release --changelogpreset angular-bitbucket --post-success "npm publish"']
- name: release
tasks: ['verify', 'test:coverage', 'build', '<% if (config.testSystem) { %>test:system<% }%>', 'semantic-release']
description: Create production version of software, verify code, run unit tests then if everything is ok, release the package
Expand All @@ -224,7 +224,7 @@ release:
- <<: *pkg_corp-semantic-release
tasks:
- name: semantic-release
tasks: ['corp-semantic-release']
tasks: ['corp-semantic-release --post-success "npm publish"']
- name: release
tasks: ['verify', 'test:coverage', 'build', '<% if (config.testSystem) { %>test:system<% }%>', 'semantic-release']
description: Create production version of software, verify code, run unit tests then if everything is ok, release the package
Expand Down
10 changes: 10 additions & 0 deletions lib/buildTool/protractor/protractorResources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ testSystem:
tasks:
- name: test:system
tasks: ['npm-run-all -p -r build:dev "test:protractor -- --baseUrl=<%= serverDev.protocol %>://<%= serverDev.hostname %>:<%= serverDev.port %>/"']
description: Starts the development web server and runs Protractor tests
features:

- name: test:system:prod
tasks: ['npm-run-all build -p -r serve:prod test:protractor']
description: Builds the production site, starts the production web server and runs Protractor tests
features:

- name: test:protractor
tasks: ['cross-env NODE_ENV=test protractor <%= paths.config.configDir + resources.testSystem.configSubDir %>protractor.conf.js']
description: Run browser tests against the *development* web server (the development server **must** be running)
features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var config = {
framework: 'jasmine',

// The default Base URL. This can be overridden on the command line: --baseUrl=https://hostname:port/path
baseUrl: '<%= serverDev.protocol %>://<%= serverDev.hostname %>:<%= serverDev.port %>/',
baseUrl: '<%= serverProd.protocol %>://<%= serverProd.hostname %>:<%= serverProd.port %>/',

// Selector for the element housing the angular app
rootElement: 'html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
cssLoader = {
test: helpers.pathRegEx(/\.(<%= cssExtensions %>)$/),
loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader!postcss-loader' + helpers.getLoaderQueryStr('<%- cssLoaderName %>', cssLoaderOptions),
fallback: 'style-loader',
use: 'css-loader!postcss-loader' + helpers.getLoaderQueryStr('<%- cssLoaderName %>', cssLoaderOptions),
publicPath: '../' // This is relative to 'extractCSSTextPlugin.filename' below.
})
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
*
* See: https://github.com/s-panferov/awesome-typescript-loader#forkchecker-boolean-defaultfalse
*/
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
config.plugins.push(new ForkCheckerPlugin());
const CheckerPlugin = require('awesome-typescript-loader').CheckerPlugin;
config.plugins.push(new CheckerPlugin());

<%
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod.factory('demoService', function () {
};
});

export default mod.name;
export default (mod as any).name;



Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as angular from 'angular';
import demoModule from '../demoModule';
import 'angular-mocks';

describe('Basic unit test', function () {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Injectable } from '@angular/core';
export class DemoService {
demo(param) {
window.console.log('Message from demoService.demo():' + param);
};
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Angular 2
// rc2 workaround
import { enableDebugTools, disableDebugTools } from '@angular/platform-browser';
import { enableDebugTools/*, disableDebugTools*/ } from '@angular/platform-browser';
import { enableProdMode, ApplicationRef } from '@angular/core';

// Environment Providers
Expand All @@ -17,7 +17,7 @@ let _decorateModuleRef = function identity<T>(value: T): T { return value; };

if ('production' === ENV) {
// Production
disableDebugTools();
// disableDebugTools(); // https://github.com/qdouble/angular-webpack2-starter/issues/263
enableProdMode();

PROVIDERS = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ function stateChangeHandler(event) {
if (event.state && event.state.isPushState) {
demoModule.gotoPage(event.state.url, false);
}
};
}

export default demoModule;
Loading

0 comments on commit 94c2dea

Please sign in to comment.