parent
e27cfd6236
commit
0b68a35ff2
|
@ -1 +0,0 @@
|
|||
hello remote world!
|
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
var HelloWorldComponent = ng.core.Component({
|
||||
selector: 'hello-world',
|
||||
//template: 'hello world!!!'
|
||||
templateUrl: 'hello-world.html'
|
||||
}).Class({
|
||||
constructor: function() {}
|
||||
});
|
||||
|
||||
|
||||
|
||||
ng.platformBrowserDynamic.bootstrap(HelloWorldComponent);
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, NgModule} from '@angular/core';
|
||||
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
|
||||
@Component({selector: 'hello-world', template: 'hello world!!!'})
|
||||
class HelloWorldComponent {
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [HelloWorldComponent],
|
||||
bootstrap: [HelloWorldComponent],
|
||||
imports: [BrowserModule]
|
||||
})
|
||||
class ExampleModule {}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(ExampleModule);
|
|
@ -1,16 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<hello-world>loading..</hello-world>
|
||||
|
||||
<script src="./node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="https://code.angularjs.org/2.0.0-beta.9/Rx.umd.js"></script>
|
||||
<script src="./node_modules/reflect-metadata/Reflect.js"></script>
|
||||
<script src="dist/core.umd.js"></script>
|
||||
<script src="dist/common.umd.js"></script>
|
||||
<script src="dist/compiler.umd.js"></script>
|
||||
<script src="dist/platform-browser.umd.js"></script>
|
||||
<!--<script src="https://code.angularjs.org/2.0.0-beta.9/angular2-all.umd.js"></script>-->
|
||||
<script src="./hello_world.js"></script>
|
||||
</html>
|
|
@ -1,31 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<hello-world>loading..</hello-world>
|
||||
|
||||
<script src="./node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="./node_modules/reflect-metadata/Reflect.js"></script>
|
||||
<script src="https://code.angularjs.org/tools/system.js"></script>
|
||||
<script src="https://code.angularjs.org/2.0.0-beta.16/Rx.js"></script>
|
||||
<script>
|
||||
System.config({
|
||||
// meta: {
|
||||
// 'rxjs/*': {
|
||||
// main: 'http://localhost:8000/dist/Rx.umd.js',
|
||||
// format: 'umd'
|
||||
// }
|
||||
// },
|
||||
map: {
|
||||
"@angular/core": "http://localhost:8000/dist/core.umd.js",
|
||||
"@angular/common": "http://localhost:8000/dist/common.umd.js",
|
||||
"@angular/compiler": "http://localhost:8000/dist/compiler.umd.js",
|
||||
"@angular/platform-browser": "http://localhost:8000/dist/platform-browser.umd.js"
|
||||
}
|
||||
|
||||
});
|
||||
System.import('./dist/hello_world.js');
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<hello-world>loading..</hello-world>
|
||||
|
||||
<script src="./node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="./node_modules/reflect-metadata/Reflect.js"></script>
|
||||
<script src="./dist/bundle.min.js"></script>
|
||||
</html>
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"name": "rollup-test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"compile": "tsc -p tsconfig.json",
|
||||
"compile-system": "tsc -p tsconfig-system.json",
|
||||
"bundle": "rollup -f iife -c rollup.config.js -o dist/bundle.es2015.js",
|
||||
"es5": "tsc --out dist/bundle.js --target es5 --allowJs dist/bundle.es2015.js",
|
||||
"minify": "uglifyjs --screw-ie8 --compress --mangle --in-source-map ./dist/bundle.js.map --source-map ./dist/bindle.min.js.map --source-map-include-sources --output ./dist/bundle.min.js ./dist/bundle.js",
|
||||
"build": "npm run compile && npm run bundle && npm run es5 && npm run minify",
|
||||
"serve": "python -m SimpleHTTPServer 8000"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@igorminar/md-button": "^1.1.0",
|
||||
"@igorminar/platform-browser": "^0.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rollup": "^0.26.0",
|
||||
"rollup-plugin-node-resolve": "^1.5.0",
|
||||
"rollup-plugin-typescript": "^0.7.3",
|
||||
"rollup-plugin-uglify": "^0.3.1",
|
||||
"rxjs-es": "^5.0.0-rc.4",
|
||||
"typescript": "^1.9.0-dev.20160423",
|
||||
"uglify-js": "^2.6.2"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.git"
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// import typescript from 'rollup-plugin-typescript';
|
||||
// import tsc from 'typescript'
|
||||
|
||||
import nodeResolve from 'rollup-plugin-node-resolve';
|
||||
|
||||
class RollupNG2 {
|
||||
constructor(options){
|
||||
this.options = options;
|
||||
}
|
||||
resolveId(id, from){
|
||||
//console.log(id, from);
|
||||
// if(id.startsWith('angular2/')){
|
||||
// return `${__dirname}/vendor/angular2/${id.split('angular2/').pop()}.js`;
|
||||
// }
|
||||
if(id.startsWith('rxjs/')){
|
||||
return `${__dirname}/node_modules/rxjs-es/${id.replace('rxjs/', '')}.js`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const rollupNG2 = (config) => new RollupNG2(config);
|
||||
|
||||
|
||||
export default {
|
||||
entry: 'dist/hello_world.js',
|
||||
//entry: 'hello_world.ts',
|
||||
sourceMap: true,
|
||||
plugins: [
|
||||
//typescript({typescript: tsc, target: 'es5', declaration: false}),
|
||||
rollupNG2(),
|
||||
nodeResolve({ jsnext: true, main: true }),
|
||||
]
|
||||
};
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "system",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "./dist/",
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"sourceRoot": ".",
|
||||
"target": "es5"
|
||||
},
|
||||
"files": [
|
||||
"hello_world.ts",
|
||||
"../@angular/typings/es6-collections/es6-collections.d.ts",
|
||||
"../@angular/typings/es6-promise/es6-promise.d.ts"
|
||||
]
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "./dist/",
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"sourceRoot": ".",
|
||||
"target": "es2015"
|
||||
},
|
||||
"files": [
|
||||
"hello_world.ts"
|
||||
]
|
||||
}
|
|
@ -28,8 +28,7 @@
|
|||
"benchmarks/src/old",
|
||||
"benchmarks/src/**/index_aot.ts",
|
||||
"benchmarks_external",
|
||||
"payload_tests",
|
||||
"rollup-test"
|
||||
"payload_tests"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true
|
||||
|
|
Loading…
Reference in New Issue