Skip to content

Commit 1b90c44

Browse files
author
darryl.snow
committed
feat(gen): Generate CSS from Stylus
Add Stylus support alongside Sass, Less, and raw CSS, including Bootstrap-Stylus.
1 parent 9d87a2c commit 1b90c44

File tree

5 files changed

+29
-28
lines changed

5 files changed

+29
-28
lines changed

Diff for: app/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var AngularFullstackGenerator = yeoman.generators.Base.extend({
7878
name: "stylesheet",
7979
default: 1,
8080
message: "What would you like to write stylesheets with?",
81-
choices: [ "CSS", "Stylus", "Sass", "Less"],
81+
choices: [ "CSS", "Sass", "Stylus", "Less"],
8282
filter: function( val ) { return val.toLowerCase(); }
8383
}, {
8484
type: "list",

Diff for: app/templates/Gruntfile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ module.exports = function (grunt) {
522522
'<%%= yeoman.client %>/bower_components',
523523
'<%%= yeoman.client %>/app',
524524
'<%%= yeoman.client %>/components'
525-
]
525+
],
526+
"include css": true
526527
},
527528
files: {
528529
'.tmp/app/app.css' : '<%%= yeoman.client %>/app/app.styl'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.trash
2-
color rgb(209, 91, 71)
2+
color rgb(209, 91, 71)

Diff for: app/templates/client/app/app(stylus).styl

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
$icon-font-path = "/bower_components/bootstrap-stylus/fonts"
2-
$fa-font-path = "/bower_components/font-awesome/fonts"
1+
$icon-font-path = "/bower_components/bootstrap/dist/fonts"
2+
$fa-font-path = "/bower_components/font-awesome/fonts"
33

4-
@import "bootstrap-stylus/stylus/bootstrap"
5-
@import "font-awesome/css/font-awesome.css"
4+
@import "bootstrap/dist/css/bootstrap.css"
5+
@import "font-awesome/css/font-awesome.css"
66

77
//
88
// App-wide Styles
99
//
1010

1111
.browsehappy
12-
background #ccc
13-
color #000
14-
margin 0.2em 0
15-
padding 0.2em 0
12+
background #ccc
13+
color #000
14+
margin 0.2em 0
15+
padding 0.2em 0
1616

1717
// Responsive: Portrait tablets and up
1818
@media screen and (min-width: 768px)
1919
.container
20-
max-width 730px
20+
max-width 730px
2121

2222
// Component styles are injected through grunt
2323
// injector

Diff for: app/templates/client/app/main/main(stylus).styl

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
.thing-form
2-
margin 20px 0
2+
margin 20px 0
33

44
#banner
5-
border-bottom none
6-
margin-top -20px
5+
border-bottom none
6+
margin-top -20px
77

88
#banner h1
9-
font-size 60px
10-
letter-spacing -1px
11-
line-height 1
9+
font-size 60px
10+
letter-spacing -1px
11+
line-height 1
1212

1313
.hero-unit
14-
background #4393B9
15-
color #F5F5F5
16-
padding 30px 15px
17-
position relative
18-
text-align center
19-
text-shadow 0 1px 0 rgba(0, 0, 0, 0.1)
14+
background #4393B9
15+
color #F5F5F5
16+
padding 30px 15px
17+
position relative
18+
text-align center
19+
text-shadow 0 1px 0 rgba(0, 0, 0, 0.1)
2020

2121
.footer
22-
border-top 1px solid #E5E5E5
23-
margin-top 70px
24-
padding 30px 0
25-
text-align center
22+
border-top 1px solid #E5E5E5
23+
margin-top 70px
24+
padding 30px 0
25+
text-align center

0 commit comments

Comments
 (0)