Skip to content

Commit ee2df56

Browse files
committed
chore: cleanup of new files
1 parent 05b5ca3 commit ee2df56

20 files changed

+52
-219
lines changed

addon/ng2/blueprints/ng2/files/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app w
77

88
## Code scaffolding
99

10-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/route/class`.
10+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class`.
1111

1212
## Build
1313

addon/ng2/blueprints/ng2/files/__path__/app/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// The file for the current environment will overwrite this one during build
2-
// Different environments can be found in config/environment.{dev|prod}.ts
2+
// Different environments can be found in ./environment.{dev|prod}.ts
33
// The build system defaults to the dev environment
44

55
export const environment = {

addon/ng2/blueprints/ng2/files/__path__/tsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
"declaration": false,
55
"emitDecoratorMetadata": true,
66
"experimentalDecorators": true,
7+
"mapRoot": "./",
78
"module": "es6",
89
"moduleResolution": "node",
9-
"outDir": "./dist/",
10-
"rootDir": ".",
1110
"sourceMap": true,
12-
"target": "es5",
13-
"mapRoot": "/"
11+
"target": "es5"
1412
},
1513
"compileOnSave": false,
1614
"buildOnSave": false,

addon/ng2/blueprints/ng2/files/e2e/tsconfig.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
"experimentalDecorators": true,
77
"module": "commonjs",
88
"moduleResolution": "node",
9-
"noEmitOnError": true,
10-
"noImplicitAny": false,
11-
"rootDir": ".",
129
"sourceMap": true,
1310
"target": "es5"
1411
}

addon/ng2/commands/build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const Command = require('ember-cli/lib/models/command');
2-
const WebpackBuild = require('../tasks/build-webpack');
3-
const WebpackBuildWatch = require('../tasks/build-webpack-watch');
1+
import * as Command from "ember-cli/lib/models/command";
2+
import * as WebpackBuild from "../tasks/build-webpack";
3+
import * as WebpackBuildWatch from "../tasks/build-webpack-watch";
44

55
interface BuildOptions {
66
environment?: string;

addon/ng2/commands/serve.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
const assign = require('lodash/assign');
2-
const Command = require('ember-cli/lib/models/command');
3-
const Promise = require('ember-cli/lib/ext/promise');
4-
const SilentError = require('silent-error');
5-
const PortFinder = require('portfinder');
6-
const EOL = require('os').EOL;
1+
import * as assign from "lodash/assign";
2+
import * as Command from "ember-cli/lib/models/command";
3+
import * as Promise from "ember-cli/lib/ext/promise";
4+
import * as SilentError from "silent-error";
5+
import * as PortFinder from "portfinder";
6+
import * as EOL from "os";
7+
import * as ServeWebpackTask from "../tasks/serve-webpack.ts";
78

89
PortFinder.basePort = 49152;
910

@@ -53,7 +54,6 @@ module.exports = Command.extend({
5354

5455
run: function(commandOptions: ServeTaskOptions) {
5556

56-
5757
commandOptions.liveReloadHost = commandOptions.liveReloadHost || commandOptions.host;
5858

5959
return this._checkExpressPort(commandOptions)
@@ -71,8 +71,6 @@ module.exports = Command.extend({
7171
}
7272
}
7373

74-
const ServeWebpackTask = (require('../tasks/serve-webpack.ts'))
75-
7674
var serve = new ServeWebpackTask({
7775
ui: this.ui,
7876
analytics: this.analytics,

addon/ng2/commands/test.js renamed to addon/ng2/commands/test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
'use strict';
2-
3-
const TestCommand = require('ember-cli/lib/commands/test');
4-
const config = require('../models/config');
5-
const TestTask = require('../tasks/test');
1+
import * as TestCommand from "ember-cli/lib/commands/test";
2+
import * as config from "../models/config";
3+
import * as TestTask from "../tasks/test";
64

75
module.exports = TestCommand.extend({
86
availableOptions: [

addon/ng2/models/config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const schema = require(schemaPath);
77
export const CLI_CONFIG_FILE_NAME = 'angular-cli.json';
88
export const ARRAY_METHODS = ['push', 'splice', 'sort', 'reverse', 'pop', 'shift'];
99

10-
1110
function _findUp(name: string, from: string) {
1211
let currentDir = from;
1312
while (currentDir && currentDir !== path.parse(currentDir).root) {

addon/ng2/models/webpack-build-common.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
import * as path from "path";
2+
import * as CopyWebpackPlugin from "copy-webpack-plugin";
3+
import * as HtmlWebpackPlugin from "html-webpack-plugin";
14
import * as webpack from 'webpack';
2-
import {LoaderConfig, PathsPlugin} from '../utilities/ts-path-mappings-webpack-plugin';
5+
import { ForkCheckerPlugin } from "awesome-typescript-loader";
6+
import { LoaderConfig, PathsPlugin } from '../utilities/ts-path-mappings-webpack-plugin';
37
import { CliConfig } from './config';
48

5-
const path = require('path');
6-
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
7-
const CopyWebpackPlugin = require('copy-webpack-plugin');
8-
const HtmlWebpackPlugin = require('html-webpack-plugin');
9-
109
export function getWebpackCommonConfig(projectRoot: string, sourceDir: string) {
1110
const awesomeTypescriptLoaderConfig: LoaderConfig | any = {
1211
useWebpackText: true,

addon/ng2/models/webpack-build-production.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1+
import * as path from "path";
2+
import * as webpackMerge from "webpack-merge"; // used to merge webpack configs
3+
import * as WebpackMd5Hash from "webpack-md5-hash";
4+
import * as CompressionPlugin from "compression-webpack-plugin";
15
import * as webpack from 'webpack';
26
import { CliConfig } from './config';
37

4-
const path = require('path');
5-
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
6-
const WebpackMd5Hash = require('webpack-md5-hash');
7-
const CompressionPlugin = require("compression-webpack-plugin");
8-
98
export const getWebpackProdConfigPartial = function(projectRoot: string, sourceDir: string) {
109
return {
1110
debug: false,

0 commit comments

Comments
 (0)