Skip to content
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

refactor(mobile): remove unused mobile code #4143

Merged
merged 2 commits into from
Jan 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CHROME_BIN=chromium-browser; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "--no-sandbox" > ~/.config/chromium-flags.conf; fi
- if [[ "$TARGET" == "mobile" ]]; then export MOBILE_TEST=true; fi
- npm install -g npm
- npm config set spin false
- npm config set progress false
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ with NPM 3 or higher.
* [Proxy To Backend](#proxy-to-backend)
* [Deploying the App via GitHub Pages](#deploying-the-app-via-github-pages)
* [Linting and formatting code](#linting-and-formatting-code)
* [Support for offline applications](#support-for-offline-applications)
* [Commands autocompletion](#commands-autocompletion)
* [Project assets](#project-assets)
* [Global styles](#global-styles)
Expand Down Expand Up @@ -277,12 +276,6 @@ This will use the `lint` npm script that in generated projects uses `tslint`.

You can modify the these scripts in `package.json` to run whatever tool you prefer.

### Support for offline applications

**The `--mobile` flag has been disabled temporarily. Sorry for the inconvenience.**

~~Angular-CLI includes support for offline applications via the `--` flag on `ng new`. Support is experimental, please see the angular/mobile-toolkit project and https://mobile.angular.io/ for documentation on how to make use of this functionality.~~

### Commands autocompletion

To turn on auto completion use the following commands:
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"test": "npm-run-all -c test:packages test:cli test:deps",
"e2e": "npm run test:e2e",
"e2e:nightly": "node tests/run_e2e.js --nightly",
"mobile_test": "mocha tests/e2e/e2e_workflow.spec.js",
"test:e2e": "node tests/run_e2e.js",
"test:cli": "node tests/runner",
"test:deps": "node scripts/publish/validate_dependencies.js",
Expand Down Expand Up @@ -82,7 +81,6 @@
"node-modules-path": "^1.0.0",
"node-sass": "^4.1.1",
"nopt": "^3.0.1",
"offline-plugin": "^3.4.1",
"opn": "4.0.1",
"ora": "^0.2.0",
"portfinder": "1.0.9",
Expand Down
3 changes: 0 additions & 3 deletions packages/@ngtools/json-schema/tests/serializer/schema3.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@
"prefix": {
"type": "string"
},
"mobile": {
"type": "boolean"
},
"styles": {
"description": "Global styles to be included in the build.",
"type": "array",
Expand Down
1 change: 0 additions & 1 deletion packages/@ngtools/json-schema/tests/serializer/value3.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "<%= prefix %>",
"mobile": true,
"styles": [
"styles.<%= styleExt %>"
],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions packages/angular-cli/blueprints/mobile/index.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component } from '@angular/core';<% if (isMobile) { %>
import { APP_SHELL_DIRECTIVES } from '@angular/app-shell';<% } %>
import { Component } from '@angular/core';

@Component({
selector: '<%= prefix %>-root',<% if (inlineTemplate) { %>
Expand Down
17 changes: 1 addition & 16 deletions packages/angular-cli/blueprints/ng2/files/__path__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,7 @@
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico"><% if (isMobile) { %>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="/manifest.webapp">
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon-180x180.png">
<link rel="apple-touch-startup-image" href="/icons/apple-touch-icon-180x180.png">
<% } %>
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<<%= prefix %>-root>Loading...</<%= prefix %>-root>
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/blueprints/ng2/files/angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "<%= prefix %>",
"mobile": <%= isMobile %>,
"styles": [
"styles.<%= styleExt %>"
],
Expand Down
14 changes: 0 additions & 14 deletions packages/angular-cli/blueprints/ng2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
{ name: 'source-dir', type: String, default: 'src', aliases: ['sd'] },
{ name: 'prefix', type: String, default: 'app', aliases: ['p'] },
{ name: 'style', type: String, default: 'css' },
{ name: 'mobile', type: Boolean, default: false },
{ name: 'routing', type: Boolean, default: false },
{ name: 'inline-style', type: Boolean, default: false, aliases: ['is'] },
{ name: 'inline-template', type: Boolean, default: false, aliases: ['it'] },
Expand All @@ -23,12 +22,6 @@ module.exports = {
}
},

afterInstall: function (options) {
if (options.mobile) {
return Blueprint.load(path.join(__dirname, '../mobile')).install(options);
}
},

locals: function(options) {
this.styleExt = options.style;
this.version = require(path.resolve(__dirname, '../../package.json')).version;
Expand All @@ -41,12 +34,6 @@ module.exports = {
.replace(/-(.)/g, (_, l) => ' ' + l.toUpperCase())
.replace(/^./, (l) => l.toUpperCase());

// For mobile projects, force inline styles and templates.
if (options.mobile) {
options.inlineStyle = true;
options.inlineTemplate = true;
}

return {
htmlComponentName: stringUtils.dasherize(options.entity.name),
jsComponentName: stringUtils.classify(options.entity.name),
Expand All @@ -56,7 +43,6 @@ module.exports = {
prefix: options.prefix,
styleExt: this.styleExt,
relativeRootPath: relativeRootPath,
isMobile: options.mobile,
routing: options.routing,
inlineStyle: options.inlineStyle,
inlineTemplate: options.inlineTemplate,
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const GenerateCommand = EmberGenerateCommand.extend({
const blueprints = blueprintList
.filter(bp => bp.indexOf('-test') === -1)
.filter(bp => bp !== 'ng2')
.filter(bp => bp !== 'mobile')
.map(bp => Blueprint.load(path.join(__dirname, '..', 'blueprints', bp)));

let output = '';
Expand Down
8 changes: 0 additions & 8 deletions packages/angular-cli/commands/init.run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default function initRun(commandOptions: any, rawArgs: string[]) {
sourceDir: commandOptions.sourceDir,
style: commandOptions.style,
prefix: commandOptions.prefix,
mobile: commandOptions.mobile,
routing: commandOptions.routing,
inlineStyle: commandOptions.inlineStyle,
inlineTemplate: commandOptions.inlineTemplate,
Expand All @@ -79,13 +78,6 @@ export default function initRun(commandOptions: any, rawArgs: string[]) {
new SilentError('We currently do not support a name of `' + packageName + '`.'));
}

if (commandOptions.mobile) {
return Promise.reject(new SilentError(
'The --mobile flag has been disabled temporarily while we await an update of ' +
'angular-universal for supporting NgModule. Sorry for the inconvenience.'
));
}

blueprintOpts.blueprint = normalizeBlueprint(blueprintOpts.blueprint);

return installBlueprint.run(blueprintOpts)
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const InitCommand: any = Command.extend({
{ name: 'source-dir', type: String, default: 'src', aliases: ['sd'] },
{ name: 'style', type: String, default: 'css' },
{ name: 'prefix', type: String, default: 'app', aliases: ['p'] },
{ name: 'mobile', type: Boolean, default: false },
{ name: 'routing', type: Boolean, default: false },
{ name: 'inline-style', type: Boolean, default: false, aliases: ['is'] },
{ name: 'inline-template', type: Boolean, default: false, aliases: ['it'] }
Expand Down
8 changes: 0 additions & 8 deletions packages/angular-cli/commands/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const NewCommand = Command.extend({
{ name: 'source-dir', type: String, default: 'src', aliases: ['sd'] },
{ name: 'style', type: String, default: 'css' },
{ name: 'prefix', type: String, default: 'app', aliases: ['p'] },
{ name: 'mobile', type: Boolean, default: false },
{ name: 'routing', type: Boolean, default: false },
{ name: 'inline-style', type: Boolean, default: false, aliases: ['is'] },
{ name: 'inline-template', type: Boolean, default: false, aliases: ['it'] }
Expand Down Expand Up @@ -84,13 +83,6 @@ const NewCommand = Command.extend({
new SilentError(`We currently do not support a name of "${packageName}".`));
}

if (commandOptions.mobile) {
return Promise.reject(new SilentError(
'The --mobile flag has been disabled temporarily while we await an update of ' +
'angular-universal for supporting NgModule. Sorry for the inconvenience.'
));
}

if (!commandOptions.directory) {
commandOptions.directory = packageName;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/angular-cli/lib/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"type": "string"
},
"mobile": {
"type": "boolean"
"type": "boolean",
"default": false
},
"styles": {
"description": "Global styles to be included in the build.",
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './webpack-build-common';
export * from './webpack-build-production';
export * from './webpack-build-development';
export * from './webpack-build-mobile';
export * from './webpack-build-utils';