chore: module build + export services

This commit is contained in:
Roman Hotsiy 2017-04-01 15:12:23 +03:00
parent 303b49e918
commit 3f48357e39
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
4 changed files with 32 additions and 17 deletions

View File

@ -49,18 +49,18 @@ const config = webpackMerge(commonConfig({
minimize: true,
debug: false
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
screw_ie8: true,
negate_iife: false // for lazy v8
},
mangle: { screw_ie8 : true },
output: {
comments: false
},
sourceMap: true
}),
// new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false,
// screw_ie8: true,
// negate_iife: false // for lazy v8
// },
// mangle: { screw_ie8 : true },
// output: {
// comments: false
// },
// sourceMap: true
// }),
new webpack.BannerPlugin(BANNER)
]
})

View File

@ -17,6 +17,7 @@ import {
ComponentParser,
ContentProjector,
Marker,
SchemaHelper,
SearchService,
COMPONENT_PARSER_ALLOWED } from './services/';
@ -39,9 +40,20 @@ import { SpecManager } from './utils/spec-manager';
{ provide: ErrorHandler, useClass: CustomErrorHandler },
{ provide: COMPONENT_PARSER_ALLOWED, useValue: { 'security-definitions': SecurityDefinitions} }
],
exports: [Redoc]
exports: [Redoc, REDOC_DIRECTIVES, REDOC_COMMON_DIRECTIVES, REDOC_PIPES]
})
export class RedocModule {
}
export { Redoc, SpecManager };
export { Redoc, SpecManager, ScrollService,
Hash,
WarningsService,
OptionsService,
AppStateService,
ComponentParser,
ContentProjector,
MenuService,
SearchService,
SchemaHelper,
LazyTasksService,
Marker };

View File

@ -10,7 +10,7 @@
"node": ">=6.9",
"npm": ">=3.0.0"
},
"main": "dist/redoc.min.js",
"main": "dist/redoc-module.js",
"scripts": {
"test": "npm run lint && node ./build/run_tests.js",
"branch-release": "git reset --hard && branch-release",
@ -33,7 +33,9 @@
"webdriver": "webdriver-manager update",
"serve:prod": "NODE_ENV=production npm start",
"protractor": "protractor",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"build:prod-module": "npm run build:sass && npm run ngc && npm run webpack:prod && IS_MODULE=true npm run webpack:prod",
"build:module": "npm run build:sass && npm run ngc && IS_MODULE=true npm run webpack:prod"
},
"keywords": [
"OpenAPI",

View File

@ -13,10 +13,11 @@
"should",
"webpack"
],
"outDir": "dist",
"lib": [
"DOM", "ES2016", "DOM.Iterable"
],
"noEmitHelpers": true
"noEmitHelpers": false
},
"compileOnSave": false,
"exclude": [