GithubHelp home page GithubHelp logo

lbassin / electron-angular-webpack Goto Github PK

View Code? Open in Web Editor NEW
60.0 13.0 14.0 3.19 MB

A simple kit for Electron, Angular 6 and Webpack 4 including a live reload system for Angular.

License: MIT License

TypeScript 25.47% HTML 2.51% JavaScript 68.99% CSS 3.03%
electron webpack angular boilerplate live-reload skeleton kit

electron-angular-webpack's People

Contributors

lbassin avatar nphias avatar vunb avatar w-raken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-angular-webpack's Issues

npm run prod: electron.js 'exports' undefined

Hi @lbassin

npm run dev (all ok!)

..omissis...

Entrypoint undefined = index.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs 833 bytes {0} [built]
[1] ./node_modules/underscore-template-loader/file-loader.js?url=global.scss!./src/global.scss 67 bytes {0} [built]

「wdm」: Compiled successfully.

ALL OK!

but ...

npm run prod

[7] ./src/main.ts 302 bytes {1} [built]
[213] ./src/app/app.module.ts 7.46 KiB {1} [built]
[223] ./src/app/app.component.ts 1.77 KiB {1} [built]
[224] ./src/app/providers/electron.service.ts 1.93 KiB {1} [built]
[227] ./src/app/app.icons.module.ts 1.25 KiB {1} [built]
[232] ./src/app/services/app.service.ts 15.6 KiB {1} [built]
[235] ./src/app/batch/batch.component.ts 11.4 KiB {1} [built]
[236] ./src/app/services/report.service.ts 24.4 KiB {1} [built]
[365] ./src/app/services/data.service.ts 20.2 KiB {1} [built]
[469] ./src/app/formly/typeahead-type.component.ts 3.09 KiB {1} [built]
+ 538 hidden modules
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
global.0c971e08a5.css 148 KiB [emitted]
+ 1 hidden asset
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs 833 bytes {0} [built]
[1] ./node_modules/underscore-template-loader/file-loader.js?url=global.scss!./src/global.scss 67 bytes {0} [built]

webpack-error

Dialog Box Error:

D:\PROGETTI\electron-angular-webpack\electron.js
Row: 2
'exports' undefined
Code : 800A1391

Thanks!

Exclude src folder after created package installer

Hi @lbassin

I want to create installer with only packed and minified code in dist folder. But when install application, it contains and extracts the source code src of project.

I dont want distribute the original code to customer. How can i exclude the src folder?
Here below is my application after installation.

electron

Thank you.

Failed to run after package updates

'cross-env' is not recognized as an internal or external command, operable program or batch file
Error: Cannot find module 'webpack'
Error: Cannot find module 'webpack-cli/bin/config-yargs'
Error: Cannot find module 'neo-async'

2018-05-14T04_21_32_767Z-debug.log
2018-05-14T04_23_18_003Z-debug.log
2018-05-14T04_03_13_894Z-debug.log
2018-05-14T04_10_42_183Z-debug.log
2018-05-14T04_08_18_245Z-debug.log
2018-05-14T04_01_44_831Z-debug.log
2018-05-14T04_24_09_445Z-debug.log

Error not working

I only : clone, instal & run dev :/

Executing task: npm run dev <

[email protected] dev C:\electron\electron-angular-webpack
tsc electron.ts --outDir . && cross-env NODE_ENV=dev webpack-dev-server --port=4200

i 「wds」: Project is running at http://localhost:4200/
i 「wds」: webpack output is served from /
i 「wds」: 404s will fallback to /index.html
i 「wdm」: wait until bundle finished: /
× 「wdm」: Hash: fd6da217c01f71056371
Version: webpack 4.16.5
Time: 13119ms
Built at: 2018-08-20 13:18:15
Asset Size Chunks Chunk Names
index.html 2.33 KiB [emitted]
logo.14a6bdb2e1.png 81.3 KiB [emitted]
app.component.96c13c7ca7.html 99 bytes [emitted]
electron.js 697 KiB 0 [emitted] electron
corejs.js 1.27 MiB 1 [emitted] corejs
zonejs.js 1010 KiB 2 [emitted] zonejs
app.js 7.22 MiB 3 [emitted] app
package.json 2.71 KiB [emitted]
Entrypoint electron = electron.js
Entrypoint corejs = corejs.js
Entrypoint zonejs = zonejs.js
Entrypoint app = app.js
[1] multi (webpack)-dev-server/client?http://localhost:4200 ./electron 40 bytes {0} [built]
[2] (webpack)-dev-server/client?http://localhost:4200 7.78 KiB {0} {1} {2} {3} [built]
[4] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} {3} [built]
[6] ./node_modules/loglevel/lib/loglevel.js 7.68 KiB {0} {1} {2} {3} [built]
[17] (webpack)/hot/emitter.js 75 bytes {0} {1} {2} {3} [built]
[19] ./electron.ts 4.35 KiB {0} [built]
[21] external "path" 42 bytes {0} [built]
[23] multi (webpack)-dev-server/client?http://localhost:4200 core-js/client/shim 40 bytes {1} [built]
[24] ./node_modules/core-js/client/shim.js 233 KiB {1} [built]
[25] multi (webpack)-dev-server/client?http://localhost:4200 zone.js/dist/zone 40 bytes {2} [built]
[26] ./node_modules/zone.js/dist/zone.js 127 KiB {2} [built]
[27] multi (webpack)-dev-server/client?http://localhost:4200 ./src/main.ts 40 bytes {3} [built]
[28] ./src/main.ts 302 bytes {3} [built]
[29] ./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js 20.2 KiB {3} [built]
[234] ./src/app/app.module.ts 1.25 KiB {3} [built]
+ 223 hidden modules

ERROR in ./src/app/app.component.scss
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Cannot find module 'autoprefixer'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (C:\electron\electron-angular-webpack\postcss.config.js:3:9)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at requireFromString (C:\electron\electron-angular-webpack\node_modules\require-from-string\index.js:28:4)
at parseJsFile (C:\electron\electron-angular-webpack\node_modules\cosmiconfig\dist\loadJs.js:15:15)
@ ./src/app/app.component.ts 17:24-55
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://localhost:4200 ./src/main.ts

ERROR in Error: Child compilation failed:
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Cannot find module 'autoprefixer'

  • loader.js:581 Function.Module._resolveFilename
    internal/modules/cjs/loader.js:581:15

  • loader.js:507 Function.Module._load
    internal/modules/cjs/loader.js:507:25

  • loader.js:637 Module.require
    internal/modules/cjs/loader.js:637:17

  • helpers.js:20 require
    internal/modules/cjs/helpers.js:20:18

  • postcss.config.js:3 Object.
    C:/electron/electron-angular-webpack/postcss.config.js:3:9

  • loader.js:689 Module._compile
    internal/modules/cjs/loader.js:689:30

  • index.js:28 requireFromString
    [electron-angular-webpack]/[require-from-string]/index.js:28:4

  • Error: Cannot find module 'autoprefixer'

  • compiler.js:79 childCompiler.runAsChild
    [electron-angular-webpack]/[html-webpack-plugin]/lib/compiler.js:79:16

  • Compiler.js:296 compile
    [electron-angular-webpack]/[webpack]/lib/Compiler.js:296:11

  • Compiler.js:553 hooks.afterCompile.callAsync.err
    [electron-angular-webpack]/[webpack]/lib/Compiler.js:553:14

  • Hook.js:35 AsyncSeriesHook.lazyCompileHook [as _callAsync]
    [electron-angular-webpack]/[tapable]/lib/Hook.js:35:21

  • Compiler.js:550 compilation.seal.err
    [electron-angular-webpack]/[webpack]/lib/Compiler.js:550:30

  • Hook.js:35 AsyncSeriesHook.lazyCompileHook [as _callAsync]
    [electron-angular-webpack]/[tapable]/lib/Hook.js:35:21

  • Compilation.js:1294 hooks.optimizeAssets.callAsync.err
    [electron-angular-webpack]/[webpack]/lib/Compilation.js:1294:35

  • Hook.js:35 AsyncSeriesHook.lazyCompileHook [as _callAsync]
    [electron-angular-webpack]/[tapable]/lib/Hook.js:35:21

  • Compilation.js:1285 hooks.optimizeChunkAssets.callAsync.err
    [electron-angular-webpack]/[webpack]/lib/Compilation.js:1285:32

  • Hook.js:35 AsyncSeriesHook.lazyCompileHook [as _callAsync]
    [electron-angular-webpack]/[tapable]/lib/Hook.js:35:21

  • Compilation.js:1280 hooks.additionalAssets.callAsync.err
    [electron-angular-webpack]/[webpack]/lib/Compilation.js:1280:36

Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs 678 bytes {0} [built]
[1] ./node_modules/underscore-template-loader/file-loader.js?url=global.scss!./src/global.scss 785 bytes {0} [built] [failed] [1 error]

ERROR in ./src/global.scss (./node_modules/underscore-template-loader/file-loader.js?url=global.scss!./src/global.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Cannot find module 'autoprefixer'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\electron\electron-angular-webpack\postcss.config.js:3:9)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at requireFromString (C:\electron\electron-angular-webpack\node_modules\require-from-string\index.js:28:4)
    at parseJsFile (C:\electron\electron-angular-webpack\node_modules\cosmiconfig\dist\loadJs.js:15:15)
 @ ./src/index.hbs (./node_modules/html-webpack-plugin/lib/loader.js!./src/index.hbs) 7:93-230

i 「wdm」: Failed to compile

Cannot generate new components

When I try to generate a new component in the project, I get this error:

Local workspace file ('angular.json') could not be found.

Where do I get the angular.json file?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.