vyakymenko / angular-seed-express

[DEPRECATED, Please use https://github.com/vyakymenko/angular-express] Extensible, reliable and modular starter project for Angular 7 with statically typed build AoT compilation, Express server and PM2 Daemon.

Home Page:https://github.com/vyakymenko/angular-seed-express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to build SCSS in angular-seed-express 4.2.3?

Collaborator3 opened this issue · comments

I'm submitting a ... (check one with "x")

Error: ENOENT: no such file or directory, open 'D:\test_repo\c-next\dist\tmp\app\framework\dashboard\dashboard.component.css'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at getFileData (D:\test_repo\c-next\node_modules\gulp-inline-ng2-template\parser.js:284:17)
    at D:\test_repo\c-next\node_modules\gulp-inline-ng2-template\parser.js:248:22
    at D:\test_repo\c-next\node_modules\async\dist\async.js:3853:24
    at replenish (D:\test_repo\c-next\node_modules\async\dist\async.js:946:17)
    at D:\test_repo\c-next\node_modules\async\dist\async.js:950:9
    at eachOfLimit (D:\test_repo\c-next\node_modules\async\dist\async.js:975:24)
    at D:\test_repo\c-next\node_modules\async\dist\async.js:980:16


**Current behavior**
Component Structure is as follows:
home.component.ts
home.component.html
home.component,sccs
home.component.spec.ts

**Expected behavior**
<!-- Describe what the behavior would be without the bug. -->

**Minimal reproduction of the problem with instructions**
I am unable to build and use SCSS files in angular-seed-express 4.2.3.
I want you help me to sort out this issue.

**What is the motivation / use case for changing the behavior?**
import { EnvConfig } from './env-config.interface';

const ProdConfig: EnvConfig = {
  ENV: 'PROD',
  API: '',
  ENABLE_SCSS: true
};

export = ProdConfig;

and

// Feel free to extend this interface
// depending on your app specific config.
export interface EnvConfig {
  API?: string;
  ENV?: string;
  VERSION?: string;
  ENABLE_SCSS: boolean;
}

I have added  ENABLE_SCSS. But It  didn's get expected result.
**Please tell us about your environment:**
 Operating system: Windows 8, 
IDE: WebStrom

* **Angular Seed Version:** 
4.2.3

* **Node:** `node --version` = v6.9.4

Hi @AbhijeetGiram ,

Actually, revert all changes that you made, and open tools/config/project.config.ts

Then inside constructor():

...
constructor() {
    super();
   
    this.ENABLE_SCSS = true;
....

Then, change all of your .css files to .scss files, but for components, it's still must be:

@Component({
...
styleUrls: ['my-component.component.css'],
...

Then, npm run start.

@vyakymenko Okay. I will try this. Thanks.