Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mooncode610 committed Oct 25, 2021
1 parent 507ee5b commit 647cb2f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Angular Logo](./logo-angular.jpg)](https://angular.io/) [![Electron Logo](./logo-electron.jpg)](https://electron.atom.io/)


[![Travis Build Status][build-badge]][build]
[![Dependencies Status][dependencyci-badge]][dependencyci]
[![Make a pull request][prs-badge]][prs]
Expand All @@ -16,10 +15,10 @@ Bootstrap and package your project with Angular 5(+) and Electron (Typescript +

Currently runs with:

- Angular v5.0.1
- Angular-CLI v1.5.0
- Electron v1.7.6
- Electron Packager v9.0.1
- Angular v5.2.0
- Angular-CLI v1.6.4
- Electron v1.7.8
- Electron Builder v19.45.4

With this sample, you can :

Expand Down
10 changes: 10 additions & 0 deletions src/app/directives/webview.directive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Directive } from '@angular/core';

@Directive({
selector: 'webview'
})
export class WebviewDirective {

constructor() { }

}
10 changes: 6 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const postcssUrl = require('postcss-url');
const customProperties = require('postcss-custom-properties');

const { NoEmitOnErrorsPlugin, SourceMapDevToolPlugin, DefinePlugin, NamedModulesPlugin } = require('webpack');
const { BaseHrefWebpackPlugin, NamedLazyChunksWebpackPlugin, InsertConcatAssetsWebpackPlugin } = require('@angular/cli/plugins/webpack');
const { BaseHrefWebpackPlugin, NamedLazyChunksWebpackPlugin, ScriptsWebpackPlugin } = require('@angular/cli/plugins/webpack');
const { CommonsChunkPlugin } = require('webpack').optimize;
const { AngularCompilerPlugin } = require('@ngtools/webpack');
const ConcatPlugin = require('webpack-concat-plugin');
Expand Down Expand Up @@ -93,9 +93,11 @@ function getPlugins() {
"fileName": "[name].bundle.js",
"filesToConcat": scripts
}));
plugins.push(new InsertConcatAssetsWebpackPlugin([
"scripts"
]));
plugins.push(new ScriptsWebpackPlugin({
name: "scripts",
sourceMap: true,
scripts: scripts
}));
}

plugins.push(new CopyWebpackPlugin([
Expand Down

0 comments on commit 647cb2f

Please sign in to comment.