Ver código fonte

Optimized stylus import

soyjavi 13 anos atrás
pai
commit
32d7728be6

+ 16 - 6
GruntFile.coffee

@@ -64,10 +64,16 @@ module.exports = (grunt) ->
       engine: files: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.js': '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.debug.js'
 
     stylus:
-      core:  files: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.css': '<%=source.stylus%>'
-      theme: files: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.theme.css': '<%=source.theme%>'
-      icons: files: '<%=meta.packages%>/<%=meta.file%>.icon/<%=meta.file%>.icon.css': '<%=source.icons%>'
-      calendar: files: 'packages/lungo.calendar/lungo.calendar.css': '<%=source.calendar.stylus%>'
+      core:
+        options: compress: false, import: [ '__init']
+        files: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.css': '<%=source.stylus%>'
+      theme:
+        options: compress: false, banner: "<%= meta.banner %>"
+        files: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.theme.css': '<%=source.theme%>'
+      icons:
+        files: '<%=meta.packages%>/<%=meta.file%>.icon/<%=meta.file%>.icon.css': '<%=source.icons%>'
+      calendar:
+        files: 'packages/lungo.calendar/lungo.calendar.css': '<%=source.calendar.stylus%>'
 
     copy:
       theme:
@@ -78,8 +84,12 @@ module.exports = (grunt) ->
         files: ['<%= source.coffee %>']
         tasks: ["coffee:core"]
       stylus:
-        files: ['<%= source.stylus %>', '<%= source.theme %>']
-        tasks: ["stylus:core", "stylus:theme"]
+        files: ['<%= source.stylus %>']
+        tasks: ["stylus:core"]
+      theme:
+        files: ['<%= source.theme %>']
+        tasks: ["stylus:theme"]
+
       calendar:
         files: ['<%= source.calendar.coffee %>','<%= source.calendar.stylus %>']
         tasks: ["coffee:calendar", "stylus:calendar"]

+ 0 - 2
src/stylesheets/lungo.base.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 a,
 abbr,
 address,

+ 0 - 2
src/stylesheets/lungo.layout.list.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 .list
   & li
     list-style-type: none

+ 0 - 2
src/stylesheets/lungo.layout.nav.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 HEADER_GROUPBAR_HEIGHT = 32px
 
 nav

+ 0 - 2
src/stylesheets/lungo.layout.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 body, html
   height: 100%
   width: 100%

+ 0 - 1
src/stylesheets/lungo.media.phone.styl

@@ -1,4 +1,3 @@
-@import "__init.styl"
 
 /* ==== Any phone ==== */
 @media only screen and (max-width: 767px)

+ 0 - 2
src/stylesheets/lungo.widget.button.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 .button, button
   display: inline-block
   border: none

+ 0 - 2
src/stylesheets/lungo.widget.form.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 form, .form
 
   & label:not(.select)

+ 0 - 2
src/stylesheets/lungo.widget.loading.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 .loading
   position: relative
   left: 50%

+ 0 - 2
src/stylesheets/lungo.widget.notification.styl

@@ -7,8 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
 LOADING = 104px
 WINDOW_WIDTH = 280px
 

+ 0 - 3
src/stylesheets/lungo.widget.styl

@@ -7,9 +7,6 @@
  * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  */
 
-@import "__init.styl"
-
-
 /* ================================  CLASSES  ================================ */
 .hidden
   display: none