Skip to content
This repository was archived by the owner on Dec 21, 2018. It is now read-only.

Commit 4fb0d25

Browse files
committed
SASS + LESS support
1 parent 41db54d commit 4fb0d25

File tree

8 files changed

+35
-10
lines changed

8 files changed

+35
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Get that prototype out!
1616

1717
## Running
1818
```bash
19-
npm run prototype
19+
npm run proto
2020
```
2121

2222

config/webpack.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,21 @@ var webpackConfig = {
2424
'./index.js'
2525
]
2626
},
27+
2728
output: {
2829
path: distPath,
2930
filename: 'index.js',
3031
publicPath: publicPath
3132
},
32-
loaders: [
33-
{test: /\.css$/, loaders: ['style', 'css']},
34-
],
33+
34+
module: {
35+
loaders: [
36+
{test: /\.css$/, loaders: ['style', 'css']},
37+
{test: /\.scss$/, loaders: ["style", "css", "sass"]},
38+
{test: /\.less$/, loaders: ["style", "css", "less"]}
39+
]
40+
},
41+
3542
plugins: [
3643
new HtmlWebpackPlugin({
3744
title: "Prototype that thing like there's no tomorrow"

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Yet another attempt to make some kind of framework-thing to prototype other things.",
55
"main": "index.js",
66
"scripts": {
7-
"proto": "node config/webpack.js --hot --inline"
7+
"proto": "node config/webpack.js"
88
},
99
"repository": {
1010
"type": "git",
@@ -23,7 +23,11 @@
2323
"homepage": "https://github.com/danmindru/politically-correct-dumb-prototype-boiler#readme",
2424
"devDependencies": {
2525
"clean-webpack-plugin": "^0.1.6",
26+
"less": "^2.5.3",
27+
"less-loader": "^2.2.2",
28+
"node-sass": "^3.4.2",
2629
"postcss-loader": "^0.8.0",
30+
"sass-loader": "^3.1.2",
2731
"webpack": "^1.12.12",
2832
"webpack-dev-server": "^1.14.1",
2933
"webpack-hot-middleware": "^2.6.4"

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
console.log('Whatnot');
2-
require('style!css!./style.css');
1+
console.log('Hello world');

src/style.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/styles/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
* Feeling nostalgic? Use CSS, it just works™
3+
* Don't need this file? Delete this file or don't care about it.
4+
* Remember to `require` this file to use it in a module.
5+
*
6+
*/

src/styles/style.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
* LESS support is here 🚀
3+
* Don't use LESS? Delete this file or don't care about it.
4+
* Using LESS? Remember to `require` this file to use it in a module.
5+
*
6+
*/

src/styles/style.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
* SASS support is here 🚀
3+
* Don't use SASS? Delete this file or don't care about it.
4+
* Using SASS? Remember to `require` this file to use it in a module.
5+
*
6+
*/

0 commit comments

Comments
 (0)