Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3f38259
fix: move e2e tests to a single test script.
hansl Aug 30, 2016
1bce850
fix: move e2e tests to a single test script.
hansl Aug 30, 2016
5f3e937
.
hansl Sep 3, 2016
1c6a627
.
hansl Sep 3, 2016
8691e44
more e2e tests and utils
hansl Sep 3, 2016
e149067
more e2e tests and utils
hansl Sep 3, 2016
4de7e25
try to figure out that sourcemaps error
hansl Sep 5, 2016
155f034
More tests
hansl Sep 6, 2016
7eaf089
More tests
hansl Sep 6, 2016
a71e9a4
More tests
hansl Sep 6, 2016
9930dfe
linting
hansl Sep 6, 2016
960119e
more tests, more work
hansl Sep 6, 2016
c4676e0
refactor the bigger utils
hansl Sep 6, 2016
c31bace
all tests are implemented, working on lazy module next
hansl Sep 7, 2016
0c7643f
lazy loading test
hansl Sep 7, 2016
4e13350
linting and fixing
hansl Sep 7, 2016
e25445c
adding travis fold, fixing port call
hansl Sep 7, 2016
f39cfc4
path mapping test
hansl Sep 7, 2016
73b2e58
all tests are now implemented. woot
hansl Sep 7, 2016
23cf94e
finished all tests, added a nightly-angular option to e2e
hansl Sep 7, 2016
f890c02
fixes and linting
hansl Sep 7, 2016
f14d892
fixes
hansl Sep 8, 2016
e3c6c77
.
hansl Sep 8, 2016
790ffdc
add comments and gitClean
hansl Sep 8, 2016
953caf9
comments
hansl Sep 8, 2016
ec562ea
more
hansl Sep 8, 2016
b7954e1
moved tests to their own dir
hansl Sep 8, 2016
d71a2fd
silent git clean
hansl Sep 8, 2016
4844e7e
appveyor e2e
hansl Sep 8, 2016
90c19ef
appveyor e2e
hansl Sep 8, 2016
54fd703
appveyor e2e
hansl Sep 8, 2016
a442f63
appveyor e2e in windows
hansl Sep 8, 2016
0bbb08c
fixing travis configuration
hansl Sep 8, 2016
ab27daa
fixing e2e on windows
hansl Sep 8, 2016
c507cc8
'.'
hansl Sep 8, 2016
007b092
fixing e2e on windows
hansl Sep 8, 2016
96f572d
fixing e2e on windows
hansl Sep 8, 2016
2cd0950
'.'
hansl Sep 8, 2016
3a0f23c
.
hansl Sep 8, 2016
e19d916
.
hansl Sep 8, 2016
b5fabf0
.
hansl Sep 8, 2016
2bf4864
.
hansl Sep 8, 2016
2c32035
.
hansl Sep 8, 2016
5e187b6
.
hansl Sep 8, 2016
c445e39
.
hansl Sep 8, 2016
e09282a
.
hansl Sep 8, 2016
9e10218
.
hansl Sep 8, 2016
a573eaf
.
hansl Sep 8, 2016
a289920
'.'
hansl Sep 8, 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 .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ test_script:
- node --version
- npm --version
- npm test
- npm run test:e2e

build: off
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,22 @@ env:
matrix:
- SCRIPT=lint
# - SCRIPT=build
- SCRIPT=e2e
- SCRIPT=e2e:nightly
- SCRIPT=test
# - TARGET=mobile SCRIPT=mobile_test
matrix:
fast_finish: true
allow_failures:
- os: osx
- env: SCRIPT=e2e:nightly
exclude:
- node_js: "6"
env: SCRIPT=lint
- os: osx
env: SCRIPT=e2e:nightly
- node_js: "6"
env: SCRIPT=e2e:nightly
- os: osx
node_js: "5"
env: SCRIPT=lint
Expand Down
6 changes: 3 additions & 3 deletions addon/ng2/blueprints/component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var path = require('path');
var chalk = require('chalk');
var Blueprint = require('ember-cli/lib/models/blueprint');
var dynamicPathParser = require('../../utilities/dynamic-path-parser');
const findParentModule = require('../../utilities/find-parent-module');
const findParentModule = require('../../utilities/find-parent-module').default;
var getFiles = Blueprint.prototype.files;
const stringUtils = require('ember-cli-string-utils');
const astUtils = require('../../utilities/ast-utils');
Expand Down Expand Up @@ -111,12 +111,12 @@ module.exports = {
const returns = [];
const className = stringUtils.classify(`${options.entity.name}Component`);
const fileName = stringUtils.dasherize(`${options.entity.name}.component`);
const componentDir = path.relative(this.dynamicPath.appRoot, this.generatePath);
const componentDir = path.relative(path.dirname(this.pathToModule), this.generatePath);
const importPath = componentDir ? `./${componentDir}/${fileName}` : `./${fileName}`;

if (!options['skip-import']) {
returns.push(
astUtils.addComponentToModule(this.pathToModule, className, importPath)
astUtils.addDeclarationToModule(this.pathToModule, className, importPath)
.then(change => change.apply()));
}

Expand Down
4 changes: 2 additions & 2 deletions addon/ng2/blueprints/directive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var path = require('path');
var dynamicPathParser = require('../../utilities/dynamic-path-parser');
const stringUtils = require('ember-cli-string-utils');
const astUtils = require('../../utilities/ast-utils');
const findParentModule = require('../../utilities/find-parent-module');
const findParentModule = require('../../utilities/find-parent-module').default;

module.exports = {
description: '',
Expand Down Expand Up @@ -72,7 +72,7 @@ module.exports = {

if (!options['skip-import']) {
returns.push(
astUtils.addComponentToModule(this.pathToModule, className, importPath)
astUtils.addDeclarationToModule(this.pathToModule, className, importPath)
.then(change => change.apply()));
}

Expand Down
5 changes: 2 additions & 3 deletions addon/ng2/blueprints/ng2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {

locals: function(options) {
this.styleExt = options.style;
this.version = require(path.resolve(__dirname, '..', '..', '..', '..', 'package.json')).version;
this.version = require(path.resolve(__dirname, '../../../../package.json')).version;

// Join with / not path.sep as reference to typings require forward slashes.
const relativeRootPath = options.sourceDir.split(path.sep).map(() => '..').join('/');
Expand All @@ -44,12 +44,11 @@ module.exports = {

files: function() {
var fileList = getFiles.call(this);

if (this.options && this.options.mobile) {
fileList = fileList.filter(p => p.indexOf('__name__.component.html') < 0);
fileList = fileList.filter(p => p.indexOf('__name__.component.__styleext__') < 0);
}

return fileList;
},

Expand Down
4 changes: 2 additions & 2 deletions addon/ng2/blueprints/pipe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var path = require('path');
var dynamicPathParser = require('../../utilities/dynamic-path-parser');
const stringUtils = require('ember-cli-string-utils');
const astUtils = require('../../utilities/ast-utils');
const findParentModule = require('../../utilities/find-parent-module');
const findParentModule = require('../../utilities/find-parent-module').default;

module.exports = {
description: '',
Expand Down Expand Up @@ -60,7 +60,7 @@ module.exports = {

if (!options['skip-import']) {
returns.push(
astUtils.addComponentToModule(this.pathToModule, className, importPath)
astUtils.addDeclarationToModule(this.pathToModule, className, importPath)
.then(change => change.apply()));
}

Expand Down
2 changes: 0 additions & 2 deletions addon/ng2/commands/init.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

import LinkCli from '../tasks/link-cli';

const Command = require('ember-cli/lib/models/command');
Expand Down
5 changes: 4 additions & 1 deletion addon/ng2/models/find-lazy-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export function findLazyModules(projectRoot: any): string[] {
findLoadChildren(tsPath).forEach(moduleName => {
const fileName = path.resolve(path.dirname(tsPath), moduleName) + '.ts';
if (fs.existsSync(fileName)) {
result[moduleName] = true;
// Put the moduleName as relative to the main.ts.
const fullPath = path.resolve(path.dirname(tsPath), moduleName);
const name = `./${path.relative(projectRoot, fullPath)}.ts`;
result[name] = true;
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion addon/ng2/utilities/ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export {
insertAfterLastOccurrence,
getContentOfKeyLiteral,
getDecoratorMetadata,
addComponentToModule,
addDeclarationToModule,
addProviderToModule
} from '@angular-cli/ast-tools';
3 changes: 1 addition & 2 deletions addon/ng2/utilities/find-parent-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import * as fs from 'fs';
import * as path from 'path';
const SilentError = require('silent-error');

module.exports = function findParentModule(project: any, currentDir: string): string {

export default function findParentModule(project: any, currentDir: string): string {
const sourceRoot = path.join(project.root, project.ngConfig.apps[0].root, 'app');

// trim currentDir
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require.extensions['.ts'] = function(m, filename) {
const source = fs.readFileSync(filename).toString();

try {
const result = ts.transpile(source, compilerOptions);
const result = ts.transpile(source, compilerOptions['compilerOptions']);

// Send it to node to execute.
return m._compile(result, filename);
Expand Down
Loading