Skip to content

Commit

Permalink
feat(hybrid): rename npm package to @uirouter/angular-hybrid. Update …
Browse files Browse the repository at this point in the history
…project to use latest @uirouter scoped packages

BREAKING CHANGE:
Project name switched from `ui-router-ng1-to-ng2` to `@uirouter/angular-hybrid`

bundle moved to `_bundles/ui-router-angular-hybrid.js`
  • Loading branch information
christopherthielen committed May 8, 2017
1 parent abfbe9e commit 6b06e86
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 145 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*.ipr
*.iml
*.iws
.*
stats.html

# Logs
logs
Expand Down
53 changes: 30 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,56 @@
{
"name": "ui-router-ng1-to-ng2",
"name": "@uirouter/angular-hybrid",
"version": "2.0.0",
"scripts": {
"all": "npm run clean && npm run build && npm run bundle",
"clean": "rm -rf ng1-to-ng2.d.ts ng1-to-ng2*.js ng1-to-ng2*.js.map build",
"build": "npm run clean && npm run tsc",
"bundle": "webpack",
"tsc": "tsc",
"tsc:w": "tsc -w",
"prepublish": "npm run all"
"clean": "shx rm -rf lib lib-esm _bundles",
"build": "npm run clean && tsc && tsc -m es6 --outDir lib-esm",
"package": "npm run build && rollup -c && rollup -c --environment MINIFY",
"prepare": "npm run package"
},
"license": "MIT",
"dependencies": {
"@uirouter/angular": "git://github.com/ui-router/angular#1.0.0-beta.6+hybrid-2.0.0",
"@uirouter/angularjs": "git://github.com/angular-ui/ui-router#1.0.3+hybrid-2.0.0",
"@uirouter/core": "=5.0.3"
},
"peerDependencies": {
"@angular/core": "^2.0.1",
"@angular/upgrade": "^2.0.1",
"@angular/core": "^4.0.0",
"@angular/upgrade": "^4.0.0",
"angular": "^1.5.0",
"rxjs": "^5.0.0",
"zone.js": "~0.6.21"
"zone.js": "^0.8.0"
},
"devDependencies": {
"@angular/common": "~2.0.1",
"@angular/compiler": "~2.0.1",
"@angular/core": "~2.0.1",
"@angular/platform-browser": "~2.0.1",
"@angular/platform-browser-dynamic": "~2.0.1",
"@angular/upgrade": "~2.0.1",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/upgrade": "^4.0.0",
"@types/angular": "~1.6.1",
"@types/jquery": "^1.10.31",
"angular": "~1.6.1",
"angular-ui-router": "angular-ui/ui-router#1.0.0-rc.1-artifacts",
"awesome-typescript-loader": "^3.0.0",
"readline-sync": "^1.4.7",
"rollup": "^0.41.6",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-progress": "^0.2.1",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-uglify": "^1.0.2",
"rollup-plugin-visualizer": "^0.2.1",
"rxjs": "^5.0.0",
"shx": "^0.2.2",
"systemjs": "0.19.25",
"typescript": "^2.1.5",
"ui-router-core": "=5.0.0-pre.1",
"ui-router-ng2": "ui-router/ng2#1.0.0-beta.5-artifacts",
"webpack": "^1.13.1",
"zone.js": "~0.6.21"
},
"main": "ng1-to-ng2.min.js",
"typings": "ng1-to-ng2.d.ts",
"main": "lib/index.js",
"module": "lib-esm/index.js",
"typings": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/ui-router/ng1-to-ng2.git"
"url": "https://github.com/ui-router/angular-hybrid.git"
}
}
8 changes: 4 additions & 4 deletions ng1-to-ng2.ts → src/angular-hybrid.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as angular from 'angular';

import { $InjectorLike, Ng1ViewConfig, StateObject, StateProvider } from 'angular-ui-router';
import { $InjectorLike, Ng1ViewConfig, StateObject, StateProvider } from '@uirouter/angularjs';

import {
_UIROUTER_SERVICE_PROVIDERS, applyModuleConfig, forEach, NATIVE_INJECTOR_TOKEN, Ng2ViewConfig, Ng2ViewDeclaration,
ParentUIViewInject, PathNode, Resolvable, StateRegistry, StatesModule, UIRouter, UIROUTER_MODULE_TOKEN,
UIROUTER_ROOT_MODULE, UIRouterModule, UIView, ViewConfig, ViewService, ng2LazyLoadBuilder
} from 'ui-router-ng2';
} from '@uirouter/angular';

import { UIRouterRx } from "ui-router-rx";
import { UIRouterRx } from "@uirouter/rx";

import { Component, ElementRef, Inject, Injector, Input, NgModule } from '@angular/core';
import { UpgradeAdapter } from '@angular/upgrade';
Expand Down Expand Up @@ -62,7 +62,7 @@ export let ng1InitModule = angular.module('ui.router.init');
* <div ui-view> <!-- custom template references the downgraded component -->
* <ui-view-ng-upgrade> <!-- ng2 component adapter downgraded to ng1-->
* <ui-view> <!-- pure ng2 ui-view -->
* </ui-view>
* </ui-view>
* </ui-view-ng-upgrade>
* </div>
* ```
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './angular-hybrid';
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
Expand All @@ -15,5 +17,5 @@
"suppressExcessPropertyErrors": true,
"suppressImplicitAnyIndexErrors": true
},
"exclude": [ "node_modules" ]
"files": [ "src/index.ts" ]
}
Loading

1 comment on commit 6b06e86

@claudiuconstantin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will the new @uirouter/angular-hybrid be available on npm?

Please sign in to comment.