我试图从Java编译Angular5应用程序:
从“ package.json”中删除了很多依赖关系,以找出所涉及的依赖关系之后,这是“ @ angular / compiler-cli”:“ 5.2.1” 。 / p>
这是package.json文件:
{
"name": "example",
"version": "1.1.0",
"description": "This is an example",
"main": "lib/example.umd.js",
"module": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"****** BUILD ******": "",
"build": "npm run clean && npm test && npm run build:esm && npm run build:umd",
"build:esm": "gulp inline-templates && npm run ngc",
"build:umd": "webpack",
"****** CLEAN ******": "",
"clean": "npm run clean:test && npm run clean:tmp && npm run clean:lib",
"clean:all": "npm run clean && npm run clean:node_modules",
"clean:lib": "rimraf lib",
"clean:tmp": "rimraf tmp",
"clean:test": "rimraf coverage",
"clean:node_modules": "rimraf node_modules",
"****** TEST ******": "",
"test": "npm run clean:test && npm run test:karma",
"test:karma": "karma start ./karma/karma.config.js",
"****** COMPILE & PACKAGE ******": "",
"ngc": "ngc -p tsconfig-build.json",
"****** PUBLISHING ******": "",
"prepare": "npm run build",
"****** POSTINSTALL ******": "",
"postinstall": "node chromiumInstall.js"
},
"keywords": [],
"repository": {
"type": "git"
},
"author": "pakkk",
"chromium_revision": "514418",
"peerDependencies": {
"@angular/common": "5.2.1",
"@angular/compiler": "5.2.1",
"@angular/core": "5.2.1",
"@angular/http": "5.2.1",
"@angular/platform-browser": "5.2.1",
"@angular/platform-browser-dynamic": "5.2.1",
"@angular/platform-server": "5.2.1",
"core-js": "2.4.1",
"moment": "2.20.1",
"rxjs": "5.5.6",
"zone.js": "0.8.5"
},
"devDependencies": {
"@angular/common": "5.2.1",
"@angular/compiler": "5.2.1",
"@angular/compiler-cli": "5.2.1",
"@angular/core": "5.2.1",
"@angular/http": "5.2.1",
"@angular/platform-browser": "5.2.1",
"@angular/platform-browser-dynamic": "5.2.1",
"@angular/platform-server": "5.2.1",
"@types/jasmine": "2.8.3",
"@types/jasminewd2": "2.0.2",
"@types/node": "7.0.13",
"@types/tapable": "0.2.4",
"@types/webpack": "2.2.15",
"angular2-template-loader": "0.6.2",
"awesome-typescript-loader": "3.4.1",
"cash-cp": "0.2.0",
"codelyzer": "4.0.1",
"copy-webpack-plugin": "4.4.1",
"core-js": "2.4.1",
"cross-env": "5.0.0",
"css-loader": "0.28.9",
"exports-loader": "0.7.0",
"extract-zip": "1.6.6",
"file-loader": "1.1.5",
"gulp": "3.9.1",
"gulp-inline-ng2-template": "4.1.0",
"html-loader": "0.5.5",
"html-webpack-plugin": "2.29.0",
"istanbul-instrumenter-loader": "3.0.0",
"jasmine-core": "2.8.0",
"jquery": "3.2.1",
"karma": "2.0.0",
"karma-chrome-launcher": "2.0.0",
"karma-coverage": "1.1.1",
"karma-jasmine": "1.1.0",
"karma-remap-coverage": "0.1.5",
"karma-source-map-support": "1.2.0",
"karma-sourcemap-loader": "0.3.7",
"karma-spec-reporter": "0.0.32",
"karma-webpack": "2.0.9",
"moment": "2.20.1",
"node-sass": "4.5.3",
"progress": "2.0.0",
"raw-loader": "0.5.1",
"resolve-url-loader": "2.0.2",
"rimraf": "2.6.1",
"rxjs": "5.5.6",
"sass-loader": "6.0.6",
"source-map-loader": "0.2.3",
"source-map-support": "0.5.3",
"style-loader": "0.19.1",
"to-string-loader": "1.1.5",
"ts-node": "4.1.0",
"tslib": "1.9.0",
"tslint": "5.9.1",
"tslint-loader": "3.5.3",
"typescript": "2.5.3",
"url-loader": "0.6.2",
"webpack": "3.11.0",
"webpack-angular-externals": "1.0.2",
"webpack-rxjs-externals": "1.1.0",
"zone.js": "0.8.5"
}
}
我不确定是否需要从“ tsconfig-build.json”中更改/添加任何属性值...
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"stripInternal": true,
"removeComments": false,
"sourceMap": true,
"noImplicitAny": false,
"inlineSources": true,
"declaration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipLibCheck": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"pretty": true,
"outDir": "lib",
"rootDir": "./tmp/src-inlined",
"lib": [
"dom",
"es6"
],
"typeRoots": [
"node_modules/@types"
]
},
"exclude": [
"node_modules",
"lib"
],
"files": [
"./tmp/src-inlined/index.ts"
],
"angularCompilerOptions": {
"genDir": "lib",
"debug": false,
"skipMetadataEmit": false,
"skipTemplateCodegen": true,
"strictMetadataEmit": true
},
"compileOnSave": false
}
...或者当我从Java启动时,可能是“ ngc”命令中的错误...
你能帮我吗?
非常感谢。
关于, 帕科。