-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added support `webpack serve`, feature request #1 - added support require of a style directly in pug - added ansi styling by console output - improve performance - code optimisation
- Loading branch information
Showing
123 changed files
with
1,737 additions
and
398 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
The app example used `html-webpack-plugin` and `mini-css-extract-plugin`. | ||
|
||
## Install | ||
npm install | ||
|
||
## Start local app in browser | ||
npm run start | ||
|
||
## Build | ||
npm run build | ||
|
||
## Watch | ||
npm run watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "hello-world-mini-css", | ||
"version": "1.0.0", | ||
"description": "Simple web app", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "webpack serve", | ||
"build": "webpack --mode=production --progress", | ||
"watch": "webpack --mode=production --watch --progress" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@webdiscus/pug-loader": "^1.5.1", | ||
"css-loader": "^6.5.1", | ||
"html-webpack-plugin": "^5.5.0", | ||
"mini-css-extract-plugin": "^2.4.5", | ||
"sass": "^1.45.2", | ||
"sass-loader": "^12.4.0", | ||
"webpack": "^5.65.0", | ||
"webpack-cli": "^4.9.1", | ||
"webpack-dev-server": "^4.7.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//const html = require('./app.pug'); // for CommonJS syntax use the loader option `esModule: false` | ||
import html from './app.pug'; | ||
|
||
const appRootId = 'app-root'; | ||
|
||
export function app() { | ||
const appRootContainer = document.getElementById(appRootId); | ||
appRootContainer.innerHTML = html; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
h2 Simple web application. | ||
p Hello World! | ||
|
||
div Here is the content loaded from JavaScript application. | ||
div This supports `live reload` after edit. | ||
|
||
p Edit this content and save than the site will be live reloaded. | ||
|
||
img(src=require('Images/image.jpeg')) | ||
|
||
- var colors = require('App/colors.json') | ||
|
||
.colors | ||
each color in colors | ||
div(style=`background-color:${color.hex};`)= color.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"name": "rose", | ||
"hex": "#ff0080" | ||
}, | ||
{ | ||
"name": "violet", | ||
"hex": "#7f00ff" | ||
}, | ||
{ | ||
"name": "azure", | ||
"hex": "#0080ff" | ||
} | ||
] |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.about-css { | ||
color: yellowgreen; | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/hello-world-mini-css/src/assets/styles/common.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$color: #520000; | ||
|
||
body { | ||
color: $color; | ||
font-family: monospace; | ||
background-color: #0d1117; | ||
margin: 0; | ||
} | ||
|
||
h1, h2 { | ||
color: #555; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.faq-css { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
img { | ||
width: 120px; | ||
} | ||
|
||
#app-root { | ||
padding: 20px; | ||
background-color: #ffe280; | ||
} | ||
|
||
#static-content { | ||
padding: 20px; | ||
background-color: #7fffb8; | ||
} | ||
|
||
.main { | ||
color: darkgoldenrod; | ||
} | ||
|
||
.colors { | ||
width: 120px; | ||
color: yellow; | ||
text-align: center; | ||
} |
Oops, something went wrong.