Skip to content

Commit 20465cb

Browse files
fix: replace .css with .scss
1 parent 1e62f9a commit 20465cb

File tree

12 files changed

+165
-181
lines changed

12 files changed

+165
-181
lines changed

package-lock.json

Lines changed: 40 additions & 167 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@types/favicons": "^5.1.0",
4141
"@types/iltorb": "^2.0.1",
4242
"@types/inquirer": "^0.0.42",
43+
"@types/node-sass": "^3.10.32",
4344
"@types/npm": "^2.0.29",
4445
"@types/sinon": "^5.0.1",
4546
"@types/yargs": "^11.0.0",
@@ -51,16 +52,16 @@
5152
"prettier": "^1.13.7",
5253
"pretty-quick": "^1.6.0",
5354
"semantic-release": "^15.6.3",
54-
"sinon": "^6.1.0",
55+
"sinon": "^6.1.2",
5556
"tslint-immutable": "^4.6.0",
5657
"validate-commit-msg": "^2.14.0"
5758
},
5859
"dependencies": {
5960
"@angular/animations": "^6.1.0-beta.3",
6061
"@angular/common": "^6.1.0-beta.3",
61-
"@angular/core": "^6.1.0-beta.3",
6262
"@angular/compiler": "^6.1.0-beta.3",
6363
"@angular/compiler-cli": "^6.1.0-beta.3",
64+
"@angular/core": "^6.1.0-beta.3",
6465
"@angular/http": "^6.1.0-beta.3",
6566
"@angular/platform-browser": "^6.1.0-beta.3",
6667
"@angular/platform-browser-dynamic": "^6.1.0-beta.3",
@@ -71,7 +72,7 @@
7172
"@types/cookie-parser": "^1.4.1",
7273
"@types/express": "^4.16.0",
7374
"@types/jest": "^23.1.4",
74-
"@types/node": "^10.3.3",
75+
"@types/node": "^10.5.2",
7576
"ajv": "^6.5.2",
7677
"chalk": "^2.4.1",
7778
"consolidate": "^0.15.1",
@@ -87,6 +88,7 @@
8788
"jest-preset-angular": "^5.2.3",
8889
"jest-zone-patch": "0.0.8",
8990
"ng2-fused": "^0.5.1",
91+
"node-sass": "^4.9.1",
9092
"npm": "^6.1.0",
9193
"pug": "^2.0.3",
9294
"reload": "^2.3.0",

src/commands/serve.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
EnvPlugin,
1111
WebIndexPlugin
1212
} from 'fuse-box'
13+
import { exec, task, watch } from 'fuse-box/sparky'
1314
import { resolve } from 'path'
1415
import { NgProdPlugin } from '../fusebox/ng.prod.plugin'
1516
import { NgPolyfillPlugin } from '../fusebox/ng.polyfill.plugin'
@@ -19,6 +20,8 @@ import { NgAotFactoryPlugin } from '../fusebox/ng.aot-factory.plugin'
1920
import { main as ngc } from '@angular/compiler-cli/src/main'
2021
import { CompressionPlugin } from '../fusebox/compression.plugin'
2122
import { appEnvironmentVariables } from '../utilities/environment-variables'
23+
import { renderSingleSass } from '../utilities/sass'
24+
import { SparkyFile } from 'fuse-box/sparky/SparkyFile'
2225
import clearTerminal from '../utilities/clear'
2326
import readConfig_ from '../utilities/read-config'
2427

@@ -178,7 +181,16 @@ function serve(isProdBuild = false) {
178181
.instructions(` !> [${browserModule}]`)
179182
.splitConfig({ dest: '../js/modules' })
180183

184+
task('test', () =>
185+
watch('src/**/**.*').file('*.scss', (f: SparkyFile) => {
186+
f.homePath && renderSingleSass(f.homePath)
187+
})
188+
)
189+
190+
exec('test')
191+
181192
logInfo('Bundling your application, this may take some time...')
182-
fuseBrowser.run()
193+
194+
fuseBrowser.run({ chokidar: { ignored: /.scss/g } })
183195
})
184196
}

src/generators/angular-core.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function generateCoreAngularApp(projectDir: string, universal = true) {
5757
appRoutingModuleTemplate
5858
),
5959
writeFile_(`${baseDir}/app.component.ts`, appComponentTemplate),
60-
writeFile_(`${baseDir}/app.component.css`, appComponentCssTemplate), // TODO: write component generator function instead
60+
writeFile_(`${baseDir}/app.component.scss`, appComponentCssTemplate), // TODO: write component generator function instead
6161
writeFile_(`${baseDir}/app.component.html`, appComponentHtmlTemplate),
6262
writeFile_(`${baseDir}/index.pug`, appIndex)
6363
])

0 commit comments

Comments
 (0)