From f689679bbb92b7b41aa066260a439a1dc636971c Mon Sep 17 00:00:00 2001 From: javajohnhub Date: Sun, 21 Jan 2018 19:44:36 -0500 Subject: [PATCH] primeNG styles now working --- .angular-cli.json | 5 +--- README.md | 51 ---------------------------------------- package.json | 27 ++++++++++----------- src/app/app.component.ts | 1 + src/styles.scss | 3 +++ 5 files changed, 18 insertions(+), 69 deletions(-) diff --git a/.angular-cli.json b/.angular-cli.json index a798c7b..793a55c 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -20,10 +20,7 @@ "testTsconfig": "tsconfig.spec.json", "prefix": "app", "styles": [ - "styles.scss", - "../node_modules/font-awesome/css/font-awesome.min.css", - "../node_modules/primeng/resources/themes/omega/theme.css", - "../node_modules/primeng/resources/primeng.min.css" + "styles.scss" ], "scripts": [ ], diff --git a/README.md b/README.md index 80b7f82..7a3e23c 100644 --- a/README.md +++ b/README.md @@ -80,54 +80,3 @@ Your built files are in the /dist folder. |`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems | |`npm run electron:mac`| On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac | -**Your application is optimised. Only the files of /dist folder are included in the executable.** - -## Use NodeJS Native libraries - -Actually Angular-Cli doesn't seem to be able to import nodeJS native libs or electron libs at compile time (Webpack error). This is (one of) the reason why webpack.config was ejected of ng-cli. -If you need to use NodeJS native libraries, you **MUST** add it manually in the file `webpack.config.js` in root folder : - -```javascript - "externals": { - "electron": 'require(\'electron\')', - "child_process": 'require(\'child_process\')', - "fs": 'require(\'fs\')' - ... - }, -``` - -Notice that all NodeJS v7 native libs are already added in this sample. Feel free to remove those you don't need. - -## Browser mode - -Maybe you want to execute the application in the browser (WITHOUT HOT RELOAD ACTUALLY...) ? You can do it with `npm run start:web`. -Note that you can't use Electron or NodeJS native libraries in this case. Please check `providers/electron.service.ts` to watch how conditional import of electron/Native libraries is done. - -## Execute E2E tests - -You can find end-to-end tests in /e2e folder. - -You can run tests with the command lines below : -- **in a terminal window** -> First, start a web server on port 4200 : `npm run start:web` -- **in another terminal window** -> Then, launch Protractor (E2E framework): `npm run e2e` - -# Contributors - -[Maxime GRIS](https://github.com/maximegris) | -:---: -|[Maxime GRIS](https://github.com/maximegris)| - -[build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master -[build]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master -[dependencyci-badge]: https://dependencyci.com/github/maximegris/angular-electron/badge -[dependencyci]: https://dependencyci.com/github/maximegris/angular-electron -[license-badge]: https://img.shields.io/badge/license-Apache2-blue.svg?style=flat -[license]: https://github.com/maximegris/angular-electron/blob/master/LICENSE.md -[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square -[prs]: http://makeapullrequest.com -[github-watch-badge]: https://img.shields.io/github/watchers/maximegris/angular-electron.svg?style=social -[github-watch]: https://github.com/maximegris/angular-electron/watchers -[github-star-badge]: https://img.shields.io/github/stars/maximegris/angular-electron.svg?style=social -[github-star]: https://github.com/maximegris/angular-electron/stargazers -[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20angular-electron!%20https://github.com/maximegris/angular-electron%20%F0%9F%91%8D -[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/maximegris/angular-electron.svg?style=social diff --git a/package.json b/package.json index 6489b7c..fb6374b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "angular-electron", + "name": "btfg-monitor-desktop", "version": "2.5.0", "description": "Angular 5 with Electron (Typescript + SASS + Hot Reload)", "homepage": "https://github.com/maximegris/angular-electron", @@ -36,28 +36,21 @@ "pree2e": "webdriver-manager update --standalone false --gecko false --quiet && npm run build", "e2e": "protractor ./protractor.conf.js" }, - "dependencies": { - "font-awesome": "^4.7.0", - "primeng": "^5.2.0-rc.1" - }, + "dependencies": {}, "devDependencies": { + "@angular/cli": "1.6.4", "@angular/common": "5.2.0", "@angular/compiler": "5.2.0", + "@angular/compiler-cli": "5.2.0", "@angular/core": "5.2.0", "@angular/forms": "5.2.0", "@angular/http": "5.2.0", + "@angular/language-service": "5.2.0", "@angular/platform-browser": "5.2.0", "@angular/platform-browser-dynamic": "5.2.0", "@angular/router": "5.2.0", "@ngx-translate/core": "9.0.1", "@ngx-translate/http-loader": "2.0.0", - "core-js": "2.4.1", - "enhanced-resolve": "3.3.0", - "rxjs": "5.5.2", - "zone.js": "0.8.17", - "@angular/cli": "1.6.4", - "@angular/compiler-cli": "5.2.0", - "@angular/language-service": "5.2.0", "@types/core-js": "0.9.36", "@types/jasmine": "2.5.54", "@types/jasminewd2": "2.0.2", @@ -67,14 +60,17 @@ "codelyzer": "3.2.0", "copy-webpack-plugin": "4.1.1", "copyfiles": "1.2.0", + "core-js": "2.4.1", "cross-env": "5.0.5", "css-loader": "0.28.7", "cssnano": "3.10.0", "electron": "1.7.8", "electron-builder": "19.45.4", "electron-reload": "1.2.1", + "enhanced-resolve": "3.3.0", "exports-loader": "0.6.4", "file-loader": "1.1.5", + "font-awesome": "^4.7.0", "html-loader": "0.5.1", "html-webpack-plugin": "2.29.0", "istanbul-instrumenter-loader": "3.0.0", @@ -93,11 +89,13 @@ "mkdirp": "0.5.1", "npm-run-all": "4.1.1", "npx": "9.7.1", + "postcss-custom-properties": "6.2.0", "postcss-loader": "2.0.6", "postcss-url": "7.1.2", - "postcss-custom-properties": "6.2.0", + "primeng": "^5.2.0-rc.1", "protractor": "5.1.2", "raw-loader": "0.5.1", + "rxjs": "5.5.2", "sass-loader": "6.0.6", "script-loader": "0.7.1", "source-map-loader": "0.2.1", @@ -111,7 +109,8 @@ "webdriver-manager": "12.0.6", "webpack": "3.8.1", "webpack-concat-plugin": "1.4.0", - "webpack-dev-server": "2.9.3" + "webpack-dev-server": "2.9.3", + "zone.js": "0.8.17" }, "license": "SEE LICENSE IN LICENSE.md" } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 83487c8..3bdf9f9 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -2,6 +2,7 @@ import { Component } from '@angular/core'; import { ElectronService } from './providers/electron.service'; import { TranslateService } from '@ngx-translate/core'; + @Component({ selector: 'app-root', templateUrl: './app.component.html', diff --git a/src/styles.scss b/src/styles.scss index 5d43284..ccec012 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,4 +1,7 @@ /* You can add global styles to this file, and also import other style files */ +@import '../node_modules/primeng/resources/themes/omega/theme.css'; +@import '../node_modules/primeng/resources/primeng.min.css'; +@import '../node_modules/font-awesome/css/font-awesome.min.css'; html, body { margin: 0; padding: 0;